]> git.baikalelectronics.ru Git - kernel.git/commit
x86, atomic: atomic64_read() take a const pointer
authorH. Peter Anvin <hpa@zytor.com>
Tue, 10 Jan 2012 03:33:24 +0000 (19:33 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 10 Jan 2012 03:33:24 +0000 (19:33 -0800)
commitb42cdf90bb5c4ecbbfb0ef1a7fd66fd7261b4a5c
treef50b2e91261697914ab8ff4745b3a862f3a275e0
parent2304f4c58a8e3af20e9e1a440e22fec5097badc9
x86, atomic: atomic64_read() take a const pointer

atomic64_read() doesn't actually write anything (as far as the C
environment is concerned... the CPU does actually write but that's an
implementation quirk), so it should take a const pointer.

This does NOT mean that it is safe to use atomic64_read() on an object
in readonly storage (it will trap!)

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Link: http://lkml.kernel.org/r/20120109165859.1879abda.akpm@linux-foundation.org
arch/x86/include/asm/atomic64_32.h