From: Andrew Morton <akpm@linux-foundation.org>
To: kbuild test robot <lkp@intel.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>,
kbuild-all@01.org, Guo Ren <ren_guo@c-sky.com>,
Juergen Gross <jgross@suse.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [linux-next:master 8266/8290] arch/xtensa/mm/kasan_init.c:49:35: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'long unsigned int'
Date: Fri, 15 Feb 2019 10:49:07 -0800 [thread overview]
Message-ID: <20190215104907.9ec4f0a5277703ce05d278a4@linux-foundation.org> (raw)
In-Reply-To: <201902150710.iERneFPC%fengguang.wu@intel.com>
On Fri, 15 Feb 2019 07:26:21 +0800 kbuild test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: c4f3ef3eb53fd7e8cbfe200d5ff6dba2b08526b5
> commit: 5107c1e0490f01323cf3296f758271b06d9bb0f9 [8266/8290] treewide: add checks for the return value of memblock_alloc*()
> config: xtensa-allyesconfig (attached as .config)
> compiler: xtensa-linux-gcc (GCC) 8.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 5107c1e0490f01323cf3296f758271b06d9bb0f9
> # save the attached .config to linux build tree
> GCC_VERSION=8.2.0 make.cross ARCH=xtensa
>
> All warnings (new ones prefixed by >>):
>
> arch/xtensa/mm/kasan_init.c: In function 'populate':
> >> arch/xtensa/mm/kasan_init.c:49:35: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'long unsigned int' [-Wformat=]
> panic("%s: Failed to allocate %zu bytes align=0x%lx\n",
> ~~^
> %lu
> __func__, n_pages * sizeof(pte_t), PAGE_SIZE);
> ~~~~~~~~~~~~~~~~~~~~~~~
OK, thanks. UL * size_t = UL.
--- a/arch/xtensa/mm/kasan_init.c~treewide-add-checks-for-the-return-value-of-memblock_alloc-fix-3-fix
+++ a/arch/xtensa/mm/kasan_init.c
@@ -46,7 +46,7 @@ static void __init populate(void *start,
pte_t *pte = memblock_alloc(n_pages * sizeof(pte_t), PAGE_SIZE);
if (!pte)
- panic("%s: Failed to allocate %zu bytes align=0x%lx\n",
+ panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
__func__, n_pages * sizeof(pte_t), PAGE_SIZE);
pr_debug("%s: %p - %p\n", __func__, start, end);
_
prev parent reply other threads:[~2019-02-15 18:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 23:26 kbuild test robot
2019-02-15 18:49 ` Andrew Morton [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=20190215104907.9ec4f0a5277703ce05d278a4@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=jgross@suse.com \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=ren_guo@c-sky.com \
--cc=rppt@linux.ibm.com \
/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