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 Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux