Skip to content

Commit e2a619c

Browse files
bulwahnarndb
authored andcommitted
asm-generic: remove a broken and needless ifdef conditional
Commit 527701e ("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: 527701e ("lib: Add a generic version of devmem_is_allowed()") Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 9b31e60 commit e2a619c

File tree

1 file changed

+0
-2
lines changed
  • include/asm-generic

1 file changed

+0
-2
lines changed

include/asm-generic/io.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,9 +1125,7 @@ static inline void memcpy_toio(volatile void __iomem *addr, const void *buffer,
11251125
}
11261126
#endif
11271127

1128-
#ifndef CONFIG_GENERIC_DEVMEM_IS_ALLOWED
11291128
extern int devmem_is_allowed(unsigned long pfn);
1130-
#endif
11311129

11321130
#endif /* __KERNEL__ */
11331131

0 commit comments

Comments
 (0)