Content-Type: multipart/mixed; boundary="===============8300877353331913573==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] sparc32: fix badzero.cocci warnings Date: Wed, 30 Dec 2020 14:26:07 +0800 Message-ID: <20201230062607.GA28938@9652415528d2> In-Reply-To: <20201218184347.2180772-12-sam@ravnborg.org> List-Id: --===============8300877353331913573== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot arch/sparc/mm/srmmu.c:317:42-43: WARNING comparing pointer to 0 arch/sparc/mm/srmmu.c:317:42-43: WARNING comparing pointer to 0 Compare pointer-typed values to NULL rather than 0 Semantic patch information: This makes an effort to choose between !x and x =3D=3D NULL. !x is used if it has previously been used with the function used to initialize x. This relies on type information. More type information can be obtained using the option -all_includes and the option -I to specify an include path. Generated by: scripts/coccinelle/null/badzero.cocci CC: Sam Ravnborg Reported-by: kernel test robot Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/Sam-Ravnborg/sparc32-sunse= t-sun4m-and-sun4d/20201219-025354 base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next srmmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -314,7 +314,7 @@ pgtable_t pte_alloc_one(struct mm_struct pte_t *ptep; struct page *page; = - if ((ptep =3D pte_alloc_one_kernel(mm)) =3D=3D 0) + if ((ptep =3D pte_alloc_one_kernel(mm)) =3D=3D NULL) return NULL; page =3D pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT); spin_lock(&mm->page_table_lock); --===============8300877353331913573==--