[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b0cca1c-1208-c5b3-914b-314dcb484209@huawei.com>
Date: Tue, 15 Dec 2020 09:34:45 +0800
From: Huazhong Tan <tanhuazhong@...wei.com>
To: Colin King <colin.king@...onical.com>,
Yisen Zhuang <yisen.zhuang@...wei.com>,
Salil Mehta <salil.mehta@...wei.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jian Shen <shenjian15@...wei.com>, <netdev@...r.kernel.org>
CC: <kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] net: hns3: fix expression that is currently always
true
On 2020/12/15 8:00, Colin King wrote:
> From: Colin Ian King<colin.king@...onical.com>
>
> The || condition in hdev->fd_active_type != HCLGE_FD_ARFS_ACTIVE ||
> hdev->fd_active_type != HCLGE_FD_RULE_NONE will always be true because
> hdev->fd_active_type cannot be equal to two different values at the same
> time. The expression is always true which is not correct. Fix this by
> replacing || with && to correct the logic in the expression.
>
> Addresses-Coverity: ("Constant expression result")
> Fixes: 0205ec041ec6 ("net: hns3: add support for hw tc offload of tc flower")
> Signed-off-by: Colin Ian King<colin.king@...onical.com>
Reviewed-by: Huazhong Tan <tanhuazhong@...wei.com>
Thanks.
Powered by blists - more mailing lists