From: kernel test robot <lkp@intel.com>
To: Sam Ravnborg <sam@ravnborg.org>,
David S Miller <davem@davemloft.net>,
sparclinux@vger.kernel.org, Andreas Larsson <andreas@gaisler.com>,
Arnd Bergmann <arnd@kernel.org>
Cc: kbuild-all@lists.01.org, Alexey Dobriyan <adobriyan@gmail.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Arvind Sankar <nivedita@alum.mit.edu>
Subject: [PATCH] sparc32: fix badzero.cocci warnings
Date: Wed, 30 Dec 2020 14:26:07 +0800 [thread overview]
Message-ID: <20201230062607.GA28938@9652415528d2> (raw)
In-Reply-To: <20201218184347.2180772-12-sam@ravnborg.org>
From: kernel test robot <lkp@intel.com>
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 == 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 <sam@ravnborg.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
url: https://github.com/0day-ci/linux/commits/Sam-Ravnborg/sparc32-sunset-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 = pte_alloc_one_kernel(mm)) == 0)
+ if ((ptep = pte_alloc_one_kernel(mm)) == NULL)
return NULL;
page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT);
spin_lock(&mm->page_table_lock);
prev parent reply other threads:[~2020-12-30 6:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201218184347.2180772-12-sam@ravnborg.org>
2020-12-30 6:26 ` [PATCH v1 11/13] sparc32: Drop unused mmu models kernel test robot
2020-12-30 6:26 ` kernel test robot [this message]
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=20201230062607.GA28938@9652415528d2 \
--to=lkp@intel.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andreas@gaisler.com \
--cc=anshuman.khandual@arm.com \
--cc=arnd@kernel.org \
--cc=davem@davemloft.net \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=nivedita@alum.mit.edu \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).