powerpc: Fix __cmpxchg() to take a volatile ptr again
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Nov 2016 06:08:11 +0000 (17:08 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 25 Nov 2016 03:07:50 +0000 (14:07 +1100)
commitda58b23cb976ab83a80d358102e139afe94f0c56
treeee8cfaeacbd6a305928e44c568308e91d83e7a94
parentddbefe7e77603cc9645a571a8bf680e193caac97
powerpc: Fix __cmpxchg() to take a volatile ptr again

In commit d0563a1297e2 ("powerpc: Implement {cmp}xchg for u8 and u16")
we removed the volatile from __cmpxchg().

This is leading to warnings such as:

  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
     (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,   \

There doesn't seem to be consensus across architectures whether the
argument is volatile or not, so at least for now put the volatile back.

Fixes: d0563a1297e2 ("powerpc: Implement {cmp}xchg for u8 and u16")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/cmpxchg.h