[dm:block-dm-4.21-inflight 6/9] drivers//md/dm.c:655:19: note: in expansion of macro 'per_cpu_ptr'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git block-dm-4.21-inflight
head:   43ffa903230b8656a88fdc38882153a765076972
commit: 335b41c7513110b1519d8a93d412c138bf671263 [6/9] dm: remove the pending IO accounting
config: i386-randconfig-x001-201847 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 335b41c7513110b1519d8a93d412c138bf671263
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/genhd.h:20:0,
                    from include/linux/blkdev.h:11,
                    from include/linux/blk-mq.h:5,
                    from drivers//md/dm-core.h:14,
                    from drivers//md/dm.c:8:
   drivers//md/dm.c: In function 'md_in_flight':
   include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   arch/x86/include/asm/local.h:16:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
>> drivers//md/dm.c:655:19: note: in expansion of macro 'per_cpu_ptr'
      if (local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[0]) ||
                      ^~~~~~~~~~~
   include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   arch/x86/include/asm/local.h:16:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
>> drivers//md/dm.c:655:19: note: in expansion of macro 'per_cpu_ptr'
      if (local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[0]) ||
                      ^~~~~~~~~~~
   include/linux/percpu-defs.h:219:52: error: invalid operands to binary + (have 'struct disk_stats' and 'int')
     const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
                                                 ~~~~~ ^
   arch/x86/include/asm/local.h:16:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:259:2: note: in expansion of macro '__verify_pcpu_ptr'
     __verify_pcpu_ptr(__p);      \
     ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   drivers//md/dm.c:656:19: note: in expansion of macro 'per_cpu_ptr'
          local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[1]))
                      ^~~~~~~~~~~
   include/linux/percpu-defs.h:260:10: error: invalid type argument of unary '*' (have 'struct disk_stats')
     (typeof(*(__p)) __kernel __force *)(__p);   \
             ^~~~~~
   arch/x86/include/asm/local.h:16:42: note: in definition of macro 'local_read'
    #define local_read(l) atomic_long_read(&(l)->a)
                                             ^
   include/linux/percpu-defs.h:263:47: note: in expansion of macro 'VERIFY_PERCPU_PTR'
    #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
                                                  ^~~~~~~~~~~~~~~~~
   drivers//md/dm.c:656:19: note: in expansion of macro 'per_cpu_ptr'
          local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[1]))
                      ^~~~~~~~~~~

vim +/per_cpu_ptr +655 drivers//md/dm.c

   648	
   649	static bool md_in_flight(struct mapped_device *md)
   650	{
   651		int cpu;
   652		struct hd_struct *part = &dm_disk(md)->part0;
   653	
   654		for_each_possible_cpu(cpu) {
 > 655			if (local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[0]) ||
   656			    local_read(&per_cpu_ptr(part->dkstats, cpu)->in_flight[1]))
   657				return true;
   658		}
   659	
   660		return false;
   661	}
   662	

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

Attachment: .config.gz
Description: application/gzip

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux