linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Qian Cai <cai@lca.pw>
Cc: akpm@linux-foundation.org, jgg@mellanox.com, arnd@arndb.de,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/debug: add a cast to u64 for atomic64_read()
Date: Sun, 10 Mar 2019 20:58:15 -0700	[thread overview]
Message-ID: <20190311035815.kq7ftc6vphy6vwen@linux-r8p5> (raw)
In-Reply-To: <20190310183051.87303-1-cai@lca.pw>

On Sun, 10 Mar 2019, Qian Cai wrote:

>atomic64_read() on ppc64le returns "long int", so fix the same way as
>the commit d549f545e690 ("drm/virtio: use %llu format string form
>atomic64_t") by adding a cast to u64, which makes it work on all arches.
>
>In file included from ./include/linux/printk.h:7,
>                 from ./include/linux/kernel.h:15,
>                 from mm/debug.c:9:
>mm/debug.c: In function 'dump_mm':
>./include/linux/kern_levels.h:5:18: warning: format '%llx' expects
>argument of type 'long long unsigned int', but argument 19 has type
>'long int' [-Wformat=]
> #define KERN_SOH "\001"  /* ASCII Start Of Header */
>                  ^~~~~~
>./include/linux/kern_levels.h:8:20: note: in expansion of macro
>'KERN_SOH'
> #define KERN_EMERG KERN_SOH "0" /* system is unusable */
>                    ^~~~~~~~
>./include/linux/printk.h:297:9: note: in expansion of macro 'KERN_EMERG'
>  printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
>         ^~~~~~~~~~
>mm/debug.c:133:2: note: in expansion of macro 'pr_emerg'
>  pr_emerg("mm %px mmap %px seqnum %llu task_size %lu\n"
>  ^~~~~~~~
>mm/debug.c:140:17: note: format string is defined here
>   "pinned_vm %llx data_vm %lx exec_vm %lx stack_vm %lx\n"
>              ~~~^
>              %lx
>
>Fixes: 70f8a3ca68d3 ("mm: make mm->pinned_vm an atomic64 counter")
>Signed-off-by: Qian Cai <cai@lca.pw>

Acked-by: Davidlohr Bueso <dbueso@suse.de>


  reply	other threads:[~2019-03-11  3:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-10 18:30 [PATCH] mm/debug: add a cast to u64 for atomic64_read() Qian Cai
2019-03-11  3:58 ` Davidlohr Bueso [this message]
2019-03-11 12:21   ` Jason Gunthorpe
2019-03-11 14:00     ` Qian Cai
2019-03-11 14:20       ` Arnd Bergmann
2019-03-13  9:18         ` Peter Zijlstra
2019-03-13 13:46           ` Arnd Bergmann
2019-03-13 14:21             ` Peter Zijlstra
2019-03-13 14:24             ` Peter Zijlstra
2019-03-13 14:35           ` Mark Rutland
2019-03-13 14:57             ` Arnd Bergmann
2019-03-13 16:29               ` Mark Rutland
2019-03-11 14:00     ` Arnd Bergmann

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=20190311035815.kq7ftc6vphy6vwen@linux-r8p5 \
    --to=dave@stgolabs.net \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=cai@lca.pw \
    --cc=jgg@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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).