提交 ea401685 编写于 作者: C Colin Ian King 提交者: David S. Miller

net: hns: fix unsigned comparison to less than zero

Currently mskid is unsigned and hence comparisons with negative
error return values are always false. Fix this by making mskid an
int.

Fixes: f058e468 ("net: hns: fix ICMP6 neighbor solicitation messages discard problem")
Addresses-Coverity: ("Operands don't affect result")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NMukesh Ojha <mojha@codeaurora.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 afdb3df2
...@@ -2769,7 +2769,7 @@ static void set_promisc_tcam_enable(struct dsaf_device *dsaf_dev, u32 port) ...@@ -2769,7 +2769,7 @@ static void set_promisc_tcam_enable(struct dsaf_device *dsaf_dev, u32 port)
struct hns_mac_cb *mac_cb; struct hns_mac_cb *mac_cb;
u8 addr[ETH_ALEN] = {0}; u8 addr[ETH_ALEN] = {0};
u8 port_num; u8 port_num;
u16 mskid; int mskid;
/* promisc use vague table match with vlanid = 0 & macaddr = 0 */ /* promisc use vague table match with vlanid = 0 & macaddr = 0 */
hns_dsaf_set_mac_key(dsaf_dev, &mac_key, 0x00, port, addr); hns_dsaf_set_mac_key(dsaf_dev, &mac_key, 0x00, port, addr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册