Compiling with GCC 12.3.1(openEuler 12.3.1-19.oe2403) using defconfig generates a number of "Comparison always evaluates to True" warnings in hinic_hwdev.c.
Zhou Shuai (1): net/hinic: Fix several compilation warnings with aarch64-openEuler-linux toolchain
drivers/net/ethernet/huawei/hinic/hinic_hwdev.c | 6 ------ 1 file changed, 6 deletions(-)
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9FAIF?from=project-issue CVE: NA
--------------------------------
Compiling with GCC 12.3.1(openEuler 12.3.1-19.oe2403) using defconfig generates a number of "Comparison always evaluates to True" warnings in hinic_hwdev.c.
Signed-off-by: Zhou Shuai zhoushuai28@huawei.com --- drivers/net/ethernet/huawei/hinic/hinic_hwdev.c | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hwdev.c b/drivers/net/ethernet/huawei/hinic/hinic_hwdev.c index a7e3d2cf691e..cbadbbdaaabf 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_hwdev.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_hwdev.c @@ -3716,9 +3716,6 @@ static void port_sfp_info_event(struct hinic_hwdev *hwdev, void *buf_in, return; }
- if (!chip_node->rt_cmd) - return; - rt_cmd = &chip_node->rt_cmd[sfp_info->port_id]; mutex_lock(&chip_node->sfp_mutex); memcpy(&rt_cmd->sfp_info, sfp_info, sizeof(rt_cmd->sfp_info)); @@ -3745,9 +3742,6 @@ static void port_sfp_abs_event(struct hinic_hwdev *hwdev, void *buf_in, return; }
- if (!chip_node->rt_cmd) - return; - rt_cmd = &chip_node->rt_cmd[sfp_abs->port_id]; mutex_lock(&chip_node->sfp_mutex); memcpy(&rt_cmd->abs, sfp_abs, sizeof(rt_cmd->abs));
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/5891 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/V...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/5891 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/V...