From: Shay Agroskin <shayagr@amazon.com>
To: Joe Perches <joe@perches.com>
Cc: Wang Hai <wanghai38@huawei.com>, <gtzalik@amazon.com>,
<saeedb@amazon.com>, <zorik@amazon.com>, <davem@davemloft.net>,
<kuba@kernel.org>, <sameehj@amazon.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2] net: ena: Fix using plain integer as NULL pointer in ena_init_napi_in_range
Date: Mon, 20 Jul 2020 09:38:26 +0300 [thread overview]
Message-ID: <pj41zllfjebsil.fsf@ua97a68a4e7db56.ant.amazon.com> (raw)
In-Reply-To: <f31ec3e646c9ba73c09f821a173c20110346deab.camel@perches.com>
Joe Perches <joe@perches.com> writes:
> On Mon, 2020-07-20 at 10:53 +0800, Wang Hai wrote:
>> Fix sparse build warning:
>>
>> drivers/net/ethernet/amazon/ena/ena_netdev.c:2193:34: warning:
>> Using plain integer as NULL pointer
> []
>> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c
>> b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> []
>> @@ -2190,11 +2190,10 @@ static void
>> ena_del_napi_in_range(struct ena_adapter *adapter,
>> static void ena_init_napi_in_range(struct ena_adapter
>> *adapter,
>> int first_index, int count)
>> {
>> - struct ena_napi *napi = {0};
>> int i;
>>
>> for (i = first_index; i < first_index + count; i++) {
>> - napi = &adapter->ena_napi[i];
>> + struct ena_napi *napi = &adapter->ena_napi[i];
>>
>> netif_napi_add(adapter->netdev,
>> &adapter->ena_napi[i].napi,
>
> Another possible change is to this statement:
>
> netif_napi_add(adapter->netdev,
> &napi->napi,
> etc...);
Yup, missed that myself. Wang, if you don't mind please apply
Joe's change as well.
Thanks, Shay
next prev parent reply other threads:[~2020-07-20 6:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 2:53 [PATCH net-next v2] net: ena: Fix using plain integer as NULL pointer in ena_init_napi_in_range Wang Hai
2020-07-20 3:15 ` Joe Perches
2020-07-20 6:38 ` Shay Agroskin [this message]
2020-07-20 7:08 ` wanghai (M)
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=pj41zllfjebsil.fsf@ua97a68a4e7db56.ant.amazon.com \
--to=shayagr@amazon.com \
--cc=davem@davemloft.net \
--cc=gtzalik@amazon.com \
--cc=joe@perches.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedb@amazon.com \
--cc=sameehj@amazon.com \
--cc=wanghai38@huawei.com \
--cc=zorik@amazon.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