compiler.h: Make __ADDRESSABLE() symbol truly unique
authorJosh Poimboeuf <jpoimboe@redhat.com>
Tue, 18 Aug 2020 13:57:40 +0000 (15:57 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 1 Sep 2020 07:58:04 +0000 (09:58 +0200)
commit563a02b0c9704f69c0364befedd451f57fe88092
treefdcbe3a4b47af0b9f3ded278215bb1fbea25c617
parent0db6e3734b130207026df1e78455fa98ca1d6f50
compiler.h: Make __ADDRESSABLE() symbol truly unique

The __ADDRESSABLE() macro uses the __LINE__ macro to create a temporary
symbol which has a unique name.  However, if the macro is used multiple
times from within another macro, the line number will always be the
same, resulting in duplicate symbols.

Make the temporary symbols truly unique by using __UNIQUE_ID instead of
__LINE__.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Link: https://lore.kernel.org/r/20200818135804.564436253@infradead.org
include/linux/compiler.h