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));