lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <pj41zlimeibkvr.fsf@ua97a68a4e7db56.ant.amazon.com>
Date:   Mon, 20 Jul 2020 12:23:20 +0300
From:   Shay Agroskin <shayagr@...zon.com>
To:     Wang Hai <wanghai38@...wei.com>
CC:     <joe@...ches.com>, <gtzalik@...zon.com>, <saeedb@...zon.com>,
        <zorik@...zon.com>, <davem@...emloft.net>, <kuba@...nel.org>,
        <sameehj@...zon.com>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v3] net: ena: Fix using plain integer as NULL pointer in ena_init_napi_in_range


Wang Hai <wanghai38@...wei.com> writes:

> Fix sparse build warning:
>
> drivers/net/ethernet/amazon/ena/ena_netdev.c:2193:34: warning:
>  Using plain integer as NULL pointer
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Wang Hai <wanghai38@...wei.com>
> Suggested-by: Joe Perches <joe@...ches.com>
> Acked-by: Shay Agroskin <shayagr@...zon.com>
> ---
> v1->v2:
>  Improve code readability based on Joe Perches's suggestion 
> v2->v3:
>  Simplify code based on Joe Perches's suggestion
>  drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c 
> b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> index 91be3ffa1c5c..3eb63b12dd68 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> @@ -2190,14 +2190,13 @@ 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,
> +			       &napi->napi,
>  			       ENA_IS_XDP_INDEX(adapter, i) ? 
>  ena_xdp_io_poll : ena_io_poll,
>  			       ENA_NAPI_BUDGET);

Acked-by: Shay Agroskin <shayagr@...zon.com>

Thanks a lot for your work

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ