All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Michael Chan <mchan@broadcom.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org, Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH net 4/5] bnxt_en: Fix comparison of u16 sw_id against negative value.
Date: Fri, 6 Nov 2015 14:57:54 +0300	[thread overview]
Message-ID: <563C95C2.6060606@cogentembedded.com> (raw)
In-Reply-To: <1446758751-27999-5-git-send-email-mchan@broadcom.com>

Hello.

On 11/6/2015 12:25 AM, Michael Chan wrote:

> Assign the return value from bitmap_find_free_region() to an integer
> variable and check for negative error codes first, before assigning
> the bit ID to the unsigned sw_id field.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Cc: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
> ---
>   drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index a62deff..db15c5e 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -5307,7 +5307,7 @@ static int bnxt_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
>   	struct bnxt_ntuple_filter *fltr, *new_fltr;
>   	struct flow_keys *fkeys;
>   	struct ethhdr *eth = (struct ethhdr *)skb_mac_header(skb);
> -	int rc = 0, idx;
> +	int rc = 0, idx, bit_id;

    I'd use the already declared 'rc' variable.

[...]

MBR, Sergei

  reply	other threads:[~2015-11-06 11:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 21:25 [PATCH net 0/5] bnxt_en: Bug fixes Michael Chan
2015-11-05 21:25 ` [PATCH net 1/5] bnxt_en: Change sp events definitions to represent bit position Michael Chan
2015-11-05 21:25 ` [PATCH net 2/5] bnxt_en: Determine tcp/ipv6 RSS hash type correctly Michael Chan
2015-11-05 21:25 ` [PATCH net 3/5] bnxt_en: map CAG_REG_LEGACY_INT_STATUS_MASK to GRC window #4 Michael Chan
2015-11-05 21:25 ` [PATCH net 4/5] bnxt_en: Fix comparison of u16 sw_id against negative value Michael Chan
2015-11-06 11:57   ` Sergei Shtylyov [this message]
2015-11-06 17:55     ` Michael Chan
2015-11-05 21:25 ` [PATCH net 5/5] bnxt_en: More robust SRIOV cleanup sequence Michael Chan
2015-11-05 21:35 ` [PATCH net 0/5] bnxt_en: Bug fixes 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=563C95C2.6060606@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.