mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mukesh Ojha <mojha@codeaurora.org>
To: Colin King <colin.king@canonical.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>,
	Salil Mehta <salil.mehta@huawei.com>,
	"David S . Miller" <davem@davemloft.net>,
	Yonglong Liu <liuyonglong@huawei.com>,
	netdev@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] net: hns: fix unsigned comparison to less than zero
Date: Fri, 5 Apr 2019 19:40:32 +0530	[thread overview]
Message-ID: <ec5863a5-ab4a-7dca-0188-adb8a1dc4889@codeaurora.org> (raw)
In-Reply-To: <20190405135916.1621-1-colin.king@canonical.com>


On 4/5/2019 7:29 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently mskid is unsigned and hence comparisons with negative
> error return values are always false. Fix this by making mskid an
> int.
>
> Fixes: f058e46855dc ("net: hns: fix ICMP6 neighbor solicitation messages discard problem")
> Addresses-Coverity: ("Operands don't affect result")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh
> ---
>   drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
> index 61eea6ac846f..e05d2095d09b 100644
> --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
> @@ -2769,7 +2769,7 @@ static void set_promisc_tcam_enable(struct dsaf_device *dsaf_dev, u32 port)
>   	struct hns_mac_cb *mac_cb;
>   	u8 addr[ETH_ALEN] = {0};
>   	u8 port_num;
> -	u16 mskid;
> +	int mskid;
>   
>   	/* promisc use vague table match with vlanid = 0 & macaddr = 0 */
>   	hns_dsaf_set_mac_key(dsaf_dev, &mac_key, 0x00, port, addr);

  reply	other threads:[~2019-04-05 14:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 13:59 Colin King
2019-04-05 14:10 ` Mukesh Ojha [this message]
2019-04-07  1:29 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec5863a5-ab4a-7dca-0188-adb8a1dc4889@codeaurora.org \
    --to=mojha@codeaurora.org \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyonglong@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome