]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: entry: get rid of multiple macro definitions
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 26 Aug 2015 19:07:25 +0000 (20:07 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 26 Aug 2015 19:25:48 +0000 (20:25 +0100)
commit4b7e08d6dbcf5831379ca47f82d3a8f7bcdb11d0
tree2fc918f13ee339a2dacba778f7ab82d945fdfc1e
parent7535ba3a0c3531caa3c149eb3a588b5dbbdc2211
ARM: entry: get rid of multiple macro definitions

The following structure is just asking for trouble:

 #ifdef CONFIG_symbol
.macro foo
...
.endm
.macro bar
...
.endm
.macro baz
...
.endm
 #else
.macro foo
...
.endm
.macro bar
...
.endm
 #ifdef CONFIG_symbol2
.macro baz
...
.endm
 #else
.macro baz
...
.endm
 #endif
 #endif

such as one defintion being updated, but the other definitions miss out.
Where the contents of a macro needs to be conditional, the hint is in
the first clause of this very sentence.  "contents" "conditional".  Not
multiple separate definitions, especially not when much of the macro
is the same between different configs.

This patch fixes this bad style, which had caused the Thumb2 code to
miss-out on the uaccess updates.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/entry-header.S