]> git.baikalelectronics.ru Git - kernel.git/commit
asm-generic: remove a broken and needless ifdef conditional
authorLukas Bulwahn <lukas.bulwahn@gmail.com>
Fri, 22 Jul 2022 11:07:11 +0000 (13:07 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 22 Jul 2022 13:00:00 +0000 (15:00 +0200)
commit9a4f501d37ec66fb2ab097c4d3a6ba3ddb206d31
tree7a075556332bb81930b523ce45e620b3c3f5a968
parent6b934324e42a2e08e1d80ae0761236286cd2097b
asm-generic: remove a broken and needless ifdef conditional

Commit 5ea6e0ec50c1 ("lib: Add a generic version of devmem_is_allowed()")
introduces the config symbol GENERIC_LIB_DEVMEM_IS_ALLOWED, but then
falsely refers to CONFIG_GENERIC_DEVMEM_IS_ALLOWED (note the missing LIB
in the reference) in ./include/asm-generic/io.h.

Luckily, ./scripts/checkkconfigsymbols.py warns on non-existing configs:

GENERIC_DEVMEM_IS_ALLOWED
Referencing files: include/asm-generic/io.h

The actual fix, though, is simply to not to make this function declaration
dependent on any kernel config. For architectures that intend to use
the generic version, the arch's 'select GENERIC_LIB_DEVMEM_IS_ALLOWED' will
lead to picking the function definition, and for other architectures, this
function is simply defined elsewhere.

The wrong '#ifndef' on a non-existing config symbol also always had the
same effect (although more by mistake than by intent). So, there is no
functional change.

Remove this broken and needless ifdef conditional.

Fixes: 5ea6e0ec50c1 ("lib: Add a generic version of devmem_is_allowed()")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
include/asm-generic/io.h