Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1433876ybh; Sun, 19 Jul 2020 20:16:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR/4z89ZxjKXWYowOj9sopf2QgkSzQmsFuYf74oPTT65AAQ/ZeUB+rKGth03qjoGfZV1BL X-Received: by 2002:a05:6402:1ef:: with SMTP id i15mr19638105edy.378.1595214980757; Sun, 19 Jul 2020 20:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595214980; cv=none; d=google.com; s=arc-20160816; b=0jdSfxBb6L8/q0xVDmNPg5ArIkOTZ3G1w2/+bLS63Mu/FBoZSTAElSLAUzkG7dif1m vxxAE4TOucGhkmJ11DepUTisIZvpMxUz0r38K0ahgwcIWyjZZ6XBDhQd7AJTKccXdL2Y 6uMy5q84ax6DgJSY9S9PBZS1PS8R5fm51EPh6Oho80T0/8NhsTgOGK2/akYnU4QmJbKE VdV6gSuyMYDTU0uDXv0XIPaLSxFnDShBTUx2DlC8da8GYVWRxw38pOEnyesF3fvys1bz 1yu3us/3oJAWou1+GYt7Cdju3se2vNCGgqfHUgPcBYYcZnKhmstxpa5Mlxq7TgF51S3C i4zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=WfiA6jyUNS03wb1tWM8UoS4LsactOrq6qHJA//1rxXo=; b=cWyf7UB5w9OIsNwjL3IBM4V/izAtiXKLENBienrRkM21hi6baxeeKWgc7FrGvG0P+7 nTnhqoEVyielMubTnqaAAJBIrGoiY1yjowJ+wvDZUPTBWMGR2asaLxN2xp6Iyc6cW2h5 9hGRAr5UsdtTgTiTaBRrPBJ76/QTpqY7gaZHeUzxsduXye0F5QB3gaOLL0W331A7l0Vr Ja88zTk2gAJO/A96irhU1ssG6ryA9YaAzb6CKYSo1OesOTxKUc/OMOEbIZr2TfviRzyp P1E3uXPVHG8mFUAvkACi9+zsoAsL+ou2Q3MyaFtCdljqEXLX21MnUYifwUiW5ii8RndQ UgeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ot18si9423978ejb.303.2020.07.19.20.15.57; Sun, 19 Jul 2020 20:16:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726755AbgGTDPp (ORCPT + 99 others); Sun, 19 Jul 2020 23:15:45 -0400 Received: from smtprelay0210.hostedemail.com ([216.40.44.210]:48634 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726510AbgGTDPp (ORCPT ); Sun, 19 Jul 2020 23:15:45 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 711A61800709C; Mon, 20 Jul 2020 03:15:44 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3351:3622:3867:3871:4250:4321:4605:5007:10004:10400:10848:11026:11232:11657:11658:11914:12043:12048:12114:12296:12297:12438:12740:12760:12895:13019:13069:13255:13311:13357:13439:14659:14721:21080:21451:21627:22047:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: fire30_270f2ac26f21 X-Filterd-Recvd-Size: 1856 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA; Mon, 20 Jul 2020 03:15:42 +0000 (UTC) Message-ID: Subject: Re: [PATCH net-next v2] net: ena: Fix using plain integer as NULL pointer in ena_init_napi_in_range From: Joe Perches To: Wang Hai , gtzalik@amazon.com, saeedb@amazon.com, zorik@amazon.com, davem@davemloft.net, kuba@kernel.org, sameehj@amazon.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 19 Jul 2020 20:15:41 -0700 In-Reply-To: <20200720025309.18597-1-wanghai38@huawei.com> References: <20200720025309.18597-1-wanghai38@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.3-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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...);