Re: [PATCH net-next] net: hns3: add some link modes for hisilicon device

From: Jijie Shao
Date: Mon Oct 23 2023 - 23:08:33 EST



on 2023/10/23 16:55, Drewek, Wojciech wrote:


}

+static const struct hclge_link_mode_bit_map hclge_sr_link_mode_bit_map[8] = {
Names of those arrays are a bit too long. I know this is a standard here but I'm not sure if
"bit_map" at the end is necessary.

"bit_map" will change to "bmap" in v2 patch,and the structure name will be changed together.

+ {HCLGE_SUPPORT_10G_BIT, ETHTOOL_LINK_MODE_10000baseSR_Full_BIT},
+ {HCLGE_SUPPORT_25G_BIT, ETHTOOL_LINK_MODE_25000baseSR_Full_BIT},
+ {HCLGE_SUPPORT_40G_BIT, ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT},
+ {HCLGE_SUPPORT_50G_R2_BIT, ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT},
+ if (speed_ability & hclge_sr_link_mode_bit_map[i].support_bit)
+ linkmode_set_bit(
Checkpatch complains about wrong wrapping (here and in the next 3 functions):
CHECK: Lines should not end with a '('

+ hclge_sr_link_mode_bit_map[i].link_mode,
+ link_mode);
+ }
}

this wrong wrapping will disappear if "bit_map" change to "bmap".

Thanks.