lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 31 Jan 2020 19:41:57 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: include/linux/dev_printk.h:122:47: note: in expansion of macro
 'page_to_pfn'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   35c222fd323629cf2e834eb8aff77058856ffdda
commit: af628aae8640c268938a0c9344b4ec0d102c0a0a device.h: move dev_printk()-like functions to dev_printk.h
date:   7 weeks ago
config: riscv-randconfig-a001-20200131 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.5.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 af628aae8640c268938a0c9344b4ec0d102c0a0a
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from arch/riscv/include/asm/page.h:12:0,
                    from arch/riscv/include/asm/thread_info.h:11,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/riscv/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/rwsem.h:16,
                    from include/linux/notifier.h:15,
                    from include/linux/clk.h:14,
                    from drivers/mmc/host/usdhi6rol0.c:7:
   include/linux/scatterlist.h: In function 'sg_phys':
   include/asm-generic/memory_model.h:55:54: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
                                                         ^
   include/linux/pfn.h:21:36: note: in definition of macro 'PFN_PHYS'
    #define PFN_PHYS(x) ((phys_addr_t)(x) << PAGE_SHIFT)
                                       ^
   arch/riscv/include/asm/page.h:115:29: note: in expansion of macro 'pfn_to_phys'
    #define page_to_phys(page) (pfn_to_phys(page_to_pfn(page)))
                                ^~~~~~~~~~~
   include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
    #define page_to_pfn __page_to_pfn
                        ^~~~~~~~~~~~~
   arch/riscv/include/asm/page.h:115:41: note: in expansion of macro 'page_to_pfn'
    #define page_to_phys(page) (pfn_to_phys(page_to_pfn(page)))
                                            ^~~~~~~~~~~
   include/linux/scatterlist.h:224:9: note: in expansion of macro 'page_to_phys'
     return page_to_phys(sg_page(sg)) + sg->offset;
            ^~~~~~~~~~~~
   In file included from arch/riscv/include/asm/page.h:131:0,
                    from arch/riscv/include/asm/thread_info.h:11,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/riscv/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/rwsem.h:16,
                    from include/linux/notifier.h:15,
                    from include/linux/clk.h:14,
                    from drivers/mmc/host/usdhi6rol0.c:7:
   include/linux/scatterlist.h: In function 'sg_page_iter_page':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   include/linux/mm.h:213:26: note: in expansion of macro 'pfn_to_page'
    #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
                             ^~~~~~~~~~~
   include/linux/scatterlist.h:384:9: note: in expansion of macro 'nth_page'
     return nth_page(sg_page(piter->sg), piter->sg_pgoffset);
            ^~~~~~~~
   include/linux/dma-mapping.h: In function 'dma_map_single_attrs':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   arch/riscv/include/asm/page.h:112:30: note: in expansion of macro 'pfn_to_page'
    #define virt_to_page(vaddr) (pfn_to_page(virt_to_pfn(vaddr)))
                                 ^~~~~~~~~~~
   include/linux/dma-mapping.h:588:33: note: in expansion of macro 'virt_to_page'
     return dma_map_page_attrs(dev, virt_to_page(ptr), offset_in_page(ptr),
                                    ^~~~~~~~~~~~
   include/linux/highmem.h: In function 'kmap_to_page':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   arch/riscv/include/asm/page.h:112:30: note: in expansion of macro 'pfn_to_page'
    #define virt_to_page(vaddr) (pfn_to_page(virt_to_pfn(vaddr)))
                                 ^~~~~~~~~~~
   include/linux/highmem.h:75:9: note: in expansion of macro 'virt_to_page'
     return virt_to_page(addr);
            ^~~~~~~~~~~~
   drivers/mmc/host/usdhi6rol0.c: In function 'usdhi6_blk_bounce':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   include/linux/mm.h:213:26: note: in expansion of macro 'pfn_to_page'
    #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
                             ^~~~~~~~~~~
   drivers/mmc/host/usdhi6rol0.c:325:19: note: in expansion of macro 'nth_page'
     host->pg.page  = nth_page(host->pg.page, 1);
                      ^~~~~~~~
   drivers/mmc/host/usdhi6rol0.c: In function 'usdhi6_sg_map':
   include/asm-generic/memory_model.h:55:54: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
                                                         ^
   include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
    #define page_to_pfn __page_to_pfn
                        ^~~~~~~~~~~~~
>> include/linux/dev_printk.h:122:47: note: in expansion of macro 'page_to_pfn'
      dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
                                                  ^~~~~~~~~~~
   drivers/mmc/host/usdhi6rol0.c:386:2: note: in expansion of macro 'dev_dbg'
     dev_dbg(mmc_dev(host->mmc), "Mapped %p (%lx) at %p + %u for CMD%u @ 0x%p\n",
     ^~~~~~~
   drivers/mmc/host/usdhi6rol0.c: In function 'usdhi6_sg_advance':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   include/linux/mm.h:213:26: note: in expansion of macro 'pfn_to_page'
    #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
                             ^~~~~~~~~~~
   drivers/mmc/host/usdhi6rol0.c:505:18: note: in expansion of macro 'nth_page'
     host->pg.page = nth_page(sg_page(host->sg), host->page_idx);
                     ^~~~~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from drivers/mmc/host/usdhi6rol0.c:10:
   include/linux/mm.h: In function 'lowmem_page_address':
   include/linux/mm.h:1302:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
--
   In file included from arch/riscv/include/asm/page.h:12:0,
                    from arch/riscv/include/asm/thread_info.h:11,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/riscv/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/rwsem.h:16,
                    from include/linux/notifier.h:15,
                    from include/linux/clk.h:14,
                    from drivers/mmc//host/usdhi6rol0.c:7:
   include/linux/scatterlist.h: In function 'sg_phys':
   include/asm-generic/memory_model.h:55:54: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
                                                         ^
   include/linux/pfn.h:21:36: note: in definition of macro 'PFN_PHYS'
    #define PFN_PHYS(x) ((phys_addr_t)(x) << PAGE_SHIFT)
                                       ^
   arch/riscv/include/asm/page.h:115:29: note: in expansion of macro 'pfn_to_phys'
    #define page_to_phys(page) (pfn_to_phys(page_to_pfn(page)))
                                ^~~~~~~~~~~
   include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
    #define page_to_pfn __page_to_pfn
                        ^~~~~~~~~~~~~
   arch/riscv/include/asm/page.h:115:41: note: in expansion of macro 'page_to_pfn'
    #define page_to_phys(page) (pfn_to_phys(page_to_pfn(page)))
                                            ^~~~~~~~~~~
   include/linux/scatterlist.h:224:9: note: in expansion of macro 'page_to_phys'
     return page_to_phys(sg_page(sg)) + sg->offset;
            ^~~~~~~~~~~~
   In file included from arch/riscv/include/asm/page.h:131:0,
                    from arch/riscv/include/asm/thread_info.h:11,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/riscv/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/rwsem.h:16,
                    from include/linux/notifier.h:15,
                    from include/linux/clk.h:14,
                    from drivers/mmc//host/usdhi6rol0.c:7:
   include/linux/scatterlist.h: In function 'sg_page_iter_page':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   include/linux/mm.h:213:26: note: in expansion of macro 'pfn_to_page'
    #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
                             ^~~~~~~~~~~
   include/linux/scatterlist.h:384:9: note: in expansion of macro 'nth_page'
     return nth_page(sg_page(piter->sg), piter->sg_pgoffset);
            ^~~~~~~~
   include/linux/dma-mapping.h: In function 'dma_map_single_attrs':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   arch/riscv/include/asm/page.h:112:30: note: in expansion of macro 'pfn_to_page'
    #define virt_to_page(vaddr) (pfn_to_page(virt_to_pfn(vaddr)))
                                 ^~~~~~~~~~~
   include/linux/dma-mapping.h:588:33: note: in expansion of macro 'virt_to_page'
     return dma_map_page_attrs(dev, virt_to_page(ptr), offset_in_page(ptr),
                                    ^~~~~~~~~~~~
   include/linux/highmem.h: In function 'kmap_to_page':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   arch/riscv/include/asm/page.h:112:30: note: in expansion of macro 'pfn_to_page'
    #define virt_to_page(vaddr) (pfn_to_page(virt_to_pfn(vaddr)))
                                 ^~~~~~~~~~~
   include/linux/highmem.h:75:9: note: in expansion of macro 'virt_to_page'
     return virt_to_page(addr);
            ^~~~~~~~~~~~
   drivers/mmc//host/usdhi6rol0.c: In function 'usdhi6_blk_bounce':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   include/linux/mm.h:213:26: note: in expansion of macro 'pfn_to_page'
    #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
                             ^~~~~~~~~~~
   drivers/mmc//host/usdhi6rol0.c:325:19: note: in expansion of macro 'nth_page'
     host->pg.page  = nth_page(host->pg.page, 1);
                      ^~~~~~~~
   drivers/mmc//host/usdhi6rol0.c: In function 'usdhi6_sg_map':
   include/asm-generic/memory_model.h:55:54: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
                                                         ^
   include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
    #define page_to_pfn __page_to_pfn
                        ^~~~~~~~~~~~~
>> include/linux/dev_printk.h:122:47: note: in expansion of macro 'page_to_pfn'
      dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
                                                  ^~~~~~~~~~~
   drivers/mmc//host/usdhi6rol0.c:386:2: note: in expansion of macro 'dev_dbg'
     dev_dbg(mmc_dev(host->mmc), "Mapped %p (%lx) at %p + %u for CMD%u @ 0x%p\n",
     ^~~~~~~
   drivers/mmc//host/usdhi6rol0.c: In function 'usdhi6_sg_advance':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   include/linux/mm.h:213:26: note: in expansion of macro 'pfn_to_page'
    #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
                             ^~~~~~~~~~~
   drivers/mmc//host/usdhi6rol0.c:505:18: note: in expansion of macro 'nth_page'
     host->pg.page = nth_page(sg_page(host->sg), host->page_idx);
                     ^~~~~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from drivers/mmc//host/usdhi6rol0.c:10:
   include/linux/mm.h: In function 'lowmem_page_address':
   include/linux/mm.h:1302:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

vim +/page_to_pfn +122 include/linux/dev_printk.h

    91	
    92	/*
    93	 * #defines for all the dev_<level> macros to prefix with whatever
    94	 * possible use of #define dev_fmt(fmt) ...
    95	 */
    96	
    97	#define dev_emerg(dev, fmt, ...)					\
    98		_dev_emerg(dev, dev_fmt(fmt), ##__VA_ARGS__)
    99	#define dev_crit(dev, fmt, ...)						\
   100		_dev_crit(dev, dev_fmt(fmt), ##__VA_ARGS__)
   101	#define dev_alert(dev, fmt, ...)					\
   102		_dev_alert(dev, dev_fmt(fmt), ##__VA_ARGS__)
   103	#define dev_err(dev, fmt, ...)						\
   104		_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
   105	#define dev_warn(dev, fmt, ...)						\
   106		_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
   107	#define dev_notice(dev, fmt, ...)					\
   108		_dev_notice(dev, dev_fmt(fmt), ##__VA_ARGS__)
   109	#define dev_info(dev, fmt, ...)						\
   110		_dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
   111	
   112	#if defined(CONFIG_DYNAMIC_DEBUG)
   113	#define dev_dbg(dev, fmt, ...)						\
   114		dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
   115	#elif defined(DEBUG)
   116	#define dev_dbg(dev, fmt, ...)						\
   117		dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
   118	#else
   119	#define dev_dbg(dev, fmt, ...)						\
   120	({									\
   121		if (0)								\
 > 122			dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
   123	})
   124	#endif
   125	

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

Download attachment ".config.gz" of type "application/gzip" (24677 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ