From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1211773539313360397==" MIME-Version: 1.0 From: Coly Li To: kbuild-all@lists.01.org Subject: Re: [kbuild] [bcache:for-next 8/19] drivers/md/bcache/nvm-pages.c:159:4: warning: Either the condition '!extents' is redundant or there is possible null pointer dereference: extents. Date: Wed, 10 Feb 2021 21:43:42 +0800 Message-ID: <7c2afc0a-79d2-35f0-10da-53b6bbd2462e@suse.de> In-Reply-To: <20210210131629.GX20820@kadam> List-Id: --===============1211773539313360397== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 2/10/21 9:16 PM, Dan Carpenter wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcac= he.git for-next > head: 78729af1b480ca5a3edb9547b97b59ed3dd72440 > commit: 384227b99f413137d2b0548c364153690be8cbd1 [8/19] bcache: initializ= e the nvm pages allocator > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > = > = > cppcheck possible warnings: (new ones prefixed by >>, may not real proble= ms) > = > In file included from drivers/md/bcache/nvm-pages.c: >>> drivers/md/bcache/nvm-pages.c:159:4: warning: Either the condition '!ex= tents' is redundant or there is possible null pointer dereference: extents.= [nullPointerRedundantCheck] > extents->ns =3D only_set->nss[j]; > ^ > drivers/md/bcache/nvm-pages.c:169:10: note: Assuming that condition '!= extents' is not redundant > if (!extents) { > ^ > drivers/md/bcache/nvm-pages.c:159:4: note: Null pointer dereference > extents->ns =3D only_set->nss[j]; > ^ > = Thanks, this fix will be in 2nd wave patches for 5.12-rc1/rc2. Coly Li [snipped] --===============1211773539313360397==--