linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild test robot <fengguang.wu@intel.com>,
	kbuild-all@01.org, Johannes Weiner <hannes@cmpxchg.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [mmotm:master 112/209] mm/debug.c:137:21: warning: passing argument 1 of 'mm_pgtables_bytes' discards 'const' qualifier from pointer target type
Date: Mon, 16 Oct 2017 18:01:14 +0300	[thread overview]
Message-ID: <20171016150113.ikfxy3e7zzfvsr4w@black.fi.intel.com> (raw)
In-Reply-To: <201710141547.41n3nN1Y%fengguang.wu@intel.com>

On Sat, Oct 14, 2017 at 07:38:55AM +0000, kbuild test robot wrote:
> tree:   git://git.cmpxchg.org/linux-mmotm.git master
> head:   cc4a10c92b384ba2b80393c37639808df0ebbf56
> commit: ae7f37f07ee1eb08dd1eaaf79182ce9aa6ef7c09 [112/209] mm: consolidate page table accounting
> config: blackfin-allmodconfig (attached as .config)
> compiler: bfin-uclinux-gcc (GCC) 6.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 ae7f37f07ee1eb08dd1eaaf79182ce9aa6ef7c09
>         # save the attached .config to linux build tree
>         make.cross ARCH=blackfin 
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from include/linux/kernel.h:13:0,
>                     from mm/debug.c:8:
>    mm/debug.c: In function 'dump_mm':
> >> mm/debug.c:137:21: warning: passing argument 1 of 'mm_pgtables_bytes' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>       mm_pgtables_bytes(mm),
>                         ^
>    include/linux/printk.h:295:35: note: in definition of macro 'pr_emerg'
>      printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
>                                       ^~~~~~~~~~~
>    In file included from mm/debug.c:9:0:
>    include/linux/mm.h:1671:29: note: expected 'struct mm_struct *' but argument is of type 'const struct mm_struct *'
>     static inline unsigned long mm_pgtables_bytes(struct mm_struct *mm)

Andrew, could you please take this fixup:

diff --git a/include/linux/mm.h b/include/linux/mm.h
index a7e50c464021..d3c4b1f19da4 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1668,7 +1668,7 @@ static inline void mm_dec_nr_ptes(struct mm_struct *mm)
 #else
 
 static inline void mm_pgtables_bytes_init(struct mm_struct *mm) {}
-static inline unsigned long mm_pgtables_bytes(struct mm_struct *mm)
+static inline unsigned long mm_pgtables_bytes(const struct mm_struct *mm)
 {
 	return 0;
 }
-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2017-10-16 15:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-14  7:38 kbuild test robot
2017-10-16 15:01 ` Kirill A. Shutemov [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=20171016150113.ikfxy3e7zzfvsr4w@black.fi.intel.com \
    --to=kirill.shutemov@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=kbuild-all@01.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