linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [powerpc:next 81/84] arch/powerpc/include/asm/cmpxchg.h:484:37: warning: passing argument 1 of '__cmpxchg' discards 'volatile' qualifier from pointer target type
@ 2016-11-23 18:29 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2016-11-23 18:29 UTC (permalink / raw)
  To: Pan Xinhui; +Cc: kbuild-all, linuxppc-dev, Michael Ellerman

[-- Attachment #1: Type: text/plain, Size: 6448 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
head:   3382a6220ff3bac886d9d90766f3fe18cf25b468
commit: d0563a1297e234ed37f6b51c2e9321accebd1839 [81/84] powerpc: Implement {cmp}xchg for u8 and u16
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
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 d0563a1297e234ed37f6b51c2e9321accebd1839
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All warnings (new ones prefixed by >>):

   In file included from arch/powerpc/include/asm/pgtable-be-types.h:4:0,
                    from arch/powerpc/include/asm/page.h:292,
                    from arch/powerpc/include/asm/book3s/64/mmu-hash.h:16,
                    from arch/powerpc/include/asm/book3s/64/mmu.h:29,
                    from arch/powerpc/include/asm/mmu.h:282,
                    from arch/powerpc/include/asm/lppaca.h:36,
                    from arch/powerpc/include/asm/paca.h:21,
                    from arch/powerpc/include/asm/current.h:16,
                    from include/linux/mutex.h:13,
                    from include/linux/kernfs.h:13,
                    from include/linux/sysfs.h:15,
                    from include/linux/kobject.h:21,
                    from include/linux/cdev.h:4,
                    from include/drm/drmP.h:36,
                    from drivers/gpu/drm/drm_lock.c:37:
   drivers/gpu/drm/drm_lock.c: In function 'drm_lock_take':
>> arch/powerpc/include/asm/cmpxchg.h:484:37: warning: passing argument 1 of '__cmpxchg' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
         (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,   \
                                        ^
>> drivers/gpu/drm/drm_lock.c:69:10: note: in expansion of macro 'cmpxchg'
      prev = cmpxchg(lock, old, new);
             ^~~~~~~
   arch/powerpc/include/asm/cmpxchg.h:402:1: note: expected 'void *' but argument is of type 'volatile unsigned int *'
    __cmpxchg(void *ptr, unsigned long old, unsigned long new,
    ^~~~~~~~~
   drivers/gpu/drm/drm_lock.c: In function 'drm_lock_transfer':
>> arch/powerpc/include/asm/cmpxchg.h:484:37: warning: passing argument 1 of '__cmpxchg' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
         (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,   \
                                        ^
   drivers/gpu/drm/drm_lock.c:112:10: note: in expansion of macro 'cmpxchg'
      prev = cmpxchg(lock, old, new);
             ^~~~~~~
   arch/powerpc/include/asm/cmpxchg.h:402:1: note: expected 'void *' but argument is of type 'volatile unsigned int *'
    __cmpxchg(void *ptr, unsigned long old, unsigned long new,
    ^~~~~~~~~
   drivers/gpu/drm/drm_lock.c: In function 'drm_legacy_lock_free':
>> arch/powerpc/include/asm/cmpxchg.h:484:37: warning: passing argument 1 of '__cmpxchg' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
         (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,   \
                                        ^
   drivers/gpu/drm/drm_lock.c:135:10: note: in expansion of macro 'cmpxchg'
      prev = cmpxchg(lock, old, new);
             ^~~~~~~
   arch/powerpc/include/asm/cmpxchg.h:402:1: note: expected 'void *' but argument is of type 'volatile unsigned int *'
    __cmpxchg(void *ptr, unsigned long old, unsigned long new,
    ^~~~~~~~~
   drivers/gpu/drm/drm_lock.c: In function 'drm_legacy_idlelock_release':
>> arch/powerpc/include/asm/cmpxchg.h:484:37: warning: passing argument 1 of '__cmpxchg' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
         (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,   \
                                        ^
   drivers/gpu/drm/drm_lock.c:313:12: note: in expansion of macro 'cmpxchg'
        prev = cmpxchg(lock, old, DRM_KERNEL_CONTEXT);
               ^~~~~~~
   arch/powerpc/include/asm/cmpxchg.h:402:1: note: expected 'void *' but argument is of type 'volatile unsigned int *'
    __cmpxchg(void *ptr, unsigned long old, unsigned long new,
    ^~~~~~~~~

vim +484 arch/powerpc/include/asm/cmpxchg.h

d0563a12 Pan Xinhui    2016-04-27  468  	case 2:
d0563a12 Pan Xinhui    2016-04-27  469  		return __cmpxchg_u16_acquire(ptr, old, new);
56c08e6d Boqun Feng    2015-12-15  470  	case 4:
56c08e6d Boqun Feng    2015-12-15  471  		return __cmpxchg_u32_acquire(ptr, old, new);
56c08e6d Boqun Feng    2015-12-15  472  #ifdef CONFIG_PPC64
56c08e6d Boqun Feng    2015-12-15  473  	case 8:
56c08e6d Boqun Feng    2015-12-15  474  		return __cmpxchg_u64_acquire(ptr, old, new);
56c08e6d Boqun Feng    2015-12-15  475  #endif
56c08e6d Boqun Feng    2015-12-15  476  	}
10d8b148 pan xinhui    2016-02-23  477  	BUILD_BUG_ON_MSG(1, "Unsupported size for __cmpxchg_acquire");
56c08e6d Boqun Feng    2015-12-15  478  	return old;
56c08e6d Boqun Feng    2015-12-15  479  }
ae3a197e David Howells 2012-03-28  480  #define cmpxchg(ptr, o, n)						 \
ae3a197e David Howells 2012-03-28  481    ({									 \
ae3a197e David Howells 2012-03-28  482       __typeof__(*(ptr)) _o_ = (o);					 \
ae3a197e David Howells 2012-03-28  483       __typeof__(*(ptr)) _n_ = (n);					 \
ae3a197e David Howells 2012-03-28 @484       (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,		 \
ae3a197e David Howells 2012-03-28  485  				    (unsigned long)_n_, sizeof(*(ptr))); \
ae3a197e David Howells 2012-03-28  486    })
ae3a197e David Howells 2012-03-28  487  
ae3a197e David Howells 2012-03-28  488  
ae3a197e David Howells 2012-03-28  489  #define cmpxchg_local(ptr, o, n)					 \
ae3a197e David Howells 2012-03-28  490    ({									 \
ae3a197e David Howells 2012-03-28  491       __typeof__(*(ptr)) _o_ = (o);					 \
ae3a197e David Howells 2012-03-28  492       __typeof__(*(ptr)) _n_ = (n);					 \

:::::: The code at line 484 was first introduced by commit
:::::: ae3a197e3d0bfe3f4bf1693723e82dc018c096f3 Disintegrate asm/system.h for PowerPC

:::::: TO: David Howells <dhowells@redhat.com>
:::::: CC: David Howells <dhowells@redhat.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 50934 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-23 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-23 18:29 [powerpc:next 81/84] arch/powerpc/include/asm/cmpxchg.h:484:37: warning: passing argument 1 of '__cmpxchg' discards 'volatile' qualifier from pointer target type kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).