]> git.baikalelectronics.ru Git - kernel.git/commit
asm-generic: Fix local variable shadow in __set_fixmap_offset
authorMark Rutland <mark.rutland@arm.com>
Mon, 25 Jan 2016 11:44:55 +0000 (11:44 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 16 Feb 2016 15:10:44 +0000 (15:10 +0000)
commitf2298af9a0dcc3ab7ff2bb16c4676cc966469693
treecd8b624df539638491a8fc92a43d98da1e8acfb2
parentcec9e4ee725e4528d0eb4d038d1cac55718d59c0
asm-generic: Fix local variable shadow in __set_fixmap_offset

Currently __set_fixmap_offset is a macro function which has a local
variable called 'addr'. If a caller passes a 'phys' parameter which is
derived from a variable also called 'addr', the local variable will
shadow this, and the compiler will complain about the use of an
uninitialized variable. To avoid the issue with namespace clashes,
'addr' is prefixed with a liberal sprinkling of underscores.

Turning __set_fixmap_offset into a static inline breaks the build for
several architectures. Fixing this properly requires updates to a number
of architectures to make them agree on the prototype of __set_fixmap (it
could be done as a subsequent patch series).

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
[catalin.marinas@arm.com: squashed the original function patch and macro fixup]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
include/asm-generic/fixmap.h