[mips-sjhill:mips-for-linux-next 41/42] drivers/char/mem.c:52:30: warning: passing argument 1 of '__pa' makes integer from pointer without a cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.linux-mips.org/pub/scm/sjhill/linux-sjhill.git mips-for-linux-next
head:   a86c1814c86b41d321109ad70f17995900d54316
commit: 596d561a6e0cc4380363ec8986126891eee306d9 [41/42] MIPS: Use CPHYSADDR to implement mips32 __pa
config: mips-jz4740 (attached as .config)
compiler: mips-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 596d561a6e0cc4380363ec8986126891eee306d9
        # save the attached .config to linux build tree
        make.cross ARCH=mips 

All warnings (new ones prefixed by >>):

   In file included from arch/mips/include/asm/page.h:192:0,
                    from include/linux/mmzone.h:20,
                    from include/linux/gfp.h:5,
                    from include/linux/mm.h:9,
                    from drivers/char/mem.c:11:
   arch/mips/include/asm/io.h: In function 'virt_to_phys':
   arch/mips/include/asm/io.h:121:14: warning: passing argument 1 of '__pa' makes integer from pointer without a cast [-Wint-conversion]
     return __pa(address);
                 ^
   In file included from include/linux/mmzone.h:20:0,
                    from include/linux/gfp.h:5,
                    from include/linux/mm.h:9,
                    from drivers/char/mem.c:11:
   arch/mips/include/asm/page.h:172:29: note: expected 'long unsigned int' but argument is of type 'const volatile void *'
    static inline unsigned long __pa(unsigned long x)
                                ^
   drivers/char/mem.c: In function 'valid_phys_addr_range':
>> drivers/char/mem.c:52:30: warning: passing argument 1 of '__pa' makes integer from pointer without a cast [-Wint-conversion]
     return addr + count <= __pa(high_memory);
                                 ^
   In file included from include/linux/mmzone.h:20:0,
                    from include/linux/gfp.h:5,
                    from include/linux/mm.h:9,
                    from drivers/char/mem.c:11:
   arch/mips/include/asm/page.h:172:29: note: expected 'long unsigned int' but argument is of type 'void *'
    static inline unsigned long __pa(unsigned long x)
                                ^
--
   In file included from arch/mips/include/asm/page.h:192:0,
                    from include/linux/mmzone.h:20,
                    from include/linux/bootmem.h:7,
                    from mm/percpu.c:59:
   arch/mips/include/asm/io.h: In function 'virt_to_phys':
   arch/mips/include/asm/io.h:121:14: warning: passing argument 1 of '__pa' makes integer from pointer without a cast [-Wint-conversion]
     return __pa(address);
                 ^
   In file included from include/linux/mmzone.h:20:0,
                    from include/linux/bootmem.h:7,
                    from mm/percpu.c:59:
   arch/mips/include/asm/page.h:172:29: note: expected 'long unsigned int' but argument is of type 'const volatile void *'
    static inline unsigned long __pa(unsigned long x)
                                ^
   mm/percpu.c: In function 'per_cpu_ptr_to_phys':
>> mm/percpu.c:1364:16: warning: passing argument 1 of '__pa' makes integer from pointer without a cast [-Wint-conversion]
       return __pa(addr);
                   ^
   In file included from include/linux/mmzone.h:20:0,
                    from include/linux/bootmem.h:7,
                    from mm/percpu.c:59:
   arch/mips/include/asm/page.h:172:29: note: expected 'long unsigned int' but argument is of type 'void *'
    static inline unsigned long __pa(unsigned long x)
                                ^
   mm/percpu.c: In function 'pcpu_free_alloc_info':
   mm/percpu.c:1425:27: warning: passing argument 1 of '__pa' makes integer from pointer without a cast [-Wint-conversion]
     memblock_free_early(__pa(ai), ai->__ai_size);
                              ^
   In file included from include/linux/mmzone.h:20:0,
                    from include/linux/bootmem.h:7,
                    from mm/percpu.c:59:
   arch/mips/include/asm/page.h:172:29: note: expected 'long unsigned int' but argument is of type 'struct pcpu_alloc_info *'
    static inline unsigned long __pa(unsigned long x)
                                ^
--
   In file included from arch/mips/include/asm/page.h:192:0,
                    from include/linux/mmzone.h:20,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:14,
                    from mm/memblock.c:14:
   arch/mips/include/asm/io.h: In function 'virt_to_phys':
   arch/mips/include/asm/io.h:121:14: warning: passing argument 1 of '__pa' makes integer from pointer without a cast [-Wint-conversion]
     return __pa(address);
                 ^
   In file included from include/linux/mmzone.h:20:0,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:14,
                    from mm/memblock.c:14:
   arch/mips/include/asm/page.h:172:29: note: expected 'long unsigned int' but argument is of type 'const volatile void *'
    static inline unsigned long __pa(unsigned long x)
                                ^
   mm/memblock.c: In function 'get_allocated_memblock_reserved_regions_info':
>> mm/memblock.c:307:15: warning: passing argument 1 of '__pa' makes integer from pointer without a cast [-Wint-conversion]
     *addr = __pa(memblock.reserved.regions);
                  ^
   In file included from include/linux/mmzone.h:20:0,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:14,
                    from mm/memblock.c:14:
   arch/mips/include/asm/page.h:172:29: note: expected 'long unsigned int' but argument is of type 'struct memblock_region *'
    static inline unsigned long __pa(unsigned long x)
                                ^
   mm/memblock.c: In function 'get_allocated_memblock_memory_regions_info':
   mm/memblock.c:319:15: warning: passing argument 1 of '__pa' makes integer from pointer without a cast [-Wint-conversion]
     *addr = __pa(memblock.memory.regions);
                  ^
   In file included from include/linux/mmzone.h:20:0,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:14,
                    from mm/memblock.c:14:
   arch/mips/include/asm/page.h:172:29: note: expected 'long unsigned int' but argument is of type 'struct memblock_region *'
    static inline unsigned long __pa(unsigned long x)
                                ^
   mm/memblock.c: In function 'memblock_double_array':
   mm/memblock.c:387:27: warning: passing argument 1 of '__pa' makes integer from pointer without a cast [-Wint-conversion]
      addr = new_array ? __pa(new_array) : 0;
                              ^
   In file included from include/linux/mmzone.h:20:0,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:14,
                    from mm/memblock.c:14:
   arch/mips/include/asm/page.h:172:29: note: expected 'long unsigned int' but argument is of type 'struct memblock_region *'
    static inline unsigned long __pa(unsigned long x)
                                ^
   mm/memblock.c:429:22: warning: passing argument 1 of '__pa' makes integer from pointer without a cast [-Wint-conversion]
      memblock_free(__pa(old_array), old_alloc_size);
                         ^
   In file included from include/linux/mmzone.h:20:0,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:14,
                    from mm/memblock.c:14:
   arch/mips/include/asm/page.h:172:29: note: expected 'long unsigned int' but argument is of type 'struct memblock_region *'
    static inline unsigned long __pa(unsigned long x)
                                ^

vim +/__pa +52 drivers/char/mem.c

^1da177e Linus Torvalds     2005-04-16   5   *
^1da177e Linus Torvalds     2005-04-16   6   *  Added devfs support.
^1da177e Linus Torvalds     2005-04-16   7   *    Jan-11-1998, C. Scott Ananian <cananian@xxxxxxxxxxxxxxxxxxxx>
af901ca1 André Goddard Rosa 2009-11-14   8   *  Shared /dev/zero mmapping support, Feb 2000, Kanoj Sarcar <kanoj@xxxxxxx>
^1da177e Linus Torvalds     2005-04-16   9   */
^1da177e Linus Torvalds     2005-04-16  10  
^1da177e Linus Torvalds     2005-04-16 @11  #include <linux/mm.h>
^1da177e Linus Torvalds     2005-04-16  12  #include <linux/miscdevice.h>
^1da177e Linus Torvalds     2005-04-16  13  #include <linux/slab.h>
^1da177e Linus Torvalds     2005-04-16  14  #include <linux/vmalloc.h>
^1da177e Linus Torvalds     2005-04-16  15  #include <linux/mman.h>
^1da177e Linus Torvalds     2005-04-16  16  #include <linux/random.h>
^1da177e Linus Torvalds     2005-04-16  17  #include <linux/init.h>
^1da177e Linus Torvalds     2005-04-16  18  #include <linux/raw.h>
^1da177e Linus Torvalds     2005-04-16  19  #include <linux/tty.h>
^1da177e Linus Torvalds     2005-04-16  20  #include <linux/capability.h>
^1da177e Linus Torvalds     2005-04-16  21  #include <linux/ptrace.h>
^1da177e Linus Torvalds     2005-04-16  22  #include <linux/device.h>
50b1fdbd Vivek Goyal        2005-06-25  23  #include <linux/highmem.h>
^1da177e Linus Torvalds     2005-04-16  24  #include <linux/backing-dev.h>
d6b29d7c Jens Axboe         2007-06-04  25  #include <linux/splice.h>
b8a3ad5b Linus Torvalds     2006-10-13  26  #include <linux/pfn.h>
66300e66 Paul Gortmaker     2011-07-10  27  #include <linux/export.h>
e1612de9 Haren Myneni       2012-07-11  28  #include <linux/io.h>
e2e40f2c Christoph Hellwig  2015-02-22  29  #include <linux/uio.h>
^1da177e Linus Torvalds     2005-04-16  30  
35b6c7e4 Rob Ward           2014-12-20  31  #include <linux/uaccess.h>
^1da177e Linus Torvalds     2005-04-16  32  
^1da177e Linus Torvalds     2005-04-16  33  #ifdef CONFIG_IA64
^1da177e Linus Torvalds     2005-04-16  34  # include <linux/efi.h>
^1da177e Linus Torvalds     2005-04-16  35  #endif
^1da177e Linus Torvalds     2005-04-16  36  
e1612de9 Haren Myneni       2012-07-11  37  #define DEVPORT_MINOR	4
e1612de9 Haren Myneni       2012-07-11  38  
f222318e Wu Fengguang       2009-12-14  39  static inline unsigned long size_inside_page(unsigned long start,
f222318e Wu Fengguang       2009-12-14  40  					     unsigned long size)
f222318e Wu Fengguang       2009-12-14  41  {
f222318e Wu Fengguang       2009-12-14  42  	unsigned long sz;
f222318e Wu Fengguang       2009-12-14  43  
7fabaddd Wu Fengguang       2009-12-14  44  	sz = PAGE_SIZE - (start & (PAGE_SIZE - 1));
f222318e Wu Fengguang       2009-12-14  45  
7fabaddd Wu Fengguang       2009-12-14  46  	return min(sz, size);
f222318e Wu Fengguang       2009-12-14  47  }
f222318e Wu Fengguang       2009-12-14  48  
^1da177e Linus Torvalds     2005-04-16  49  #ifndef ARCH_HAS_VALID_PHYS_ADDR_RANGE
7e6735c3 Cyril Chemparathy  2012-09-12  50  static inline int valid_phys_addr_range(phys_addr_t addr, size_t count)
^1da177e Linus Torvalds     2005-04-16  51  {
cfaf346c Changli Gao        2011-03-23 @52  	return addr + count <= __pa(high_memory);
^1da177e Linus Torvalds     2005-04-16  53  }
80851ef2 Bjorn Helgaas      2006-01-08  54  
06c67bef Lennert Buytenhek  2006-07-10  55  static inline int valid_mmap_phys_addr_range(unsigned long pfn, size_t size)

:::::: The code at line 52 was first introduced by commit
:::::: cfaf346cb2741ca648d83527df173b759381e607 drivers/char/mem.c: clean up the code

:::::: TO: Changli Gao <xiaosuo@xxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux