On Thu, 3 Dec 2020 20:18:55 +0800 Huazhong Tan wrote: > @@ -224,6 +224,7 @@ static int hclge_map_unmap_ring_to_vf_vector(struct > hclge_vport *vport, bool en, > static int hclge_set_vf_promisc_mode(struct hclge_vport *vport, > struct hclge_mbx_vf_to_pf_cmd *req) > { > + struct hnae3_handle *handle = &vport->nic; > bool en_bc = req->msg.en_bc ? true : false; > bool en_uc = req->msg.en_uc ? true : false; > bool en_mc = req->msg.en_mc ? true : false;
Please order variable lines longest to shortest. > @@ -1154,6 +1158,8 @@ static int hclgevf_cmd_set_promisc_mode(struct > hclgevf_dev *hdev, > send_msg.en_bc = en_bc_pmc ? 1 : 0; > send_msg.en_uc = en_uc_pmc ? 1 : 0; > send_msg.en_mc = en_mc_pmc ? 1 : 0; > + send_msg.en_limit_promisc = > + test_bit(HNAE3_PFLAG_LIMIT_PROMISC_ENABLE, &handle->priv_flags) ? 1 : 0; The continuation line should be indented more than the first line. I suggest you rename HNAE3_PFLAG_LIMIT_PROMISC_ENABLE to HNAE3_PFLAG_LIMIT_PROMISC, the _ENABLE doesn't add much to the meaning. That way the lines will get shorter.