[PATCH] asm-generic/iomap.h: don't check for readq/writeq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At least on ARCH=um, the generic implementations of
readq/writeq from asm-generic/io.h are used, but it
may also use GENERIC_IOMAP. In this case, io.h will
include iomap.h before readq/writeq are defined and
as a result, iomap.h never declares iowrite64_lo_hi
and friends, causing compiler/warnings errors when
they're then implemented in iomap.c, also making it
impossible to actually use them.

Fix this by simply defining all the 64-bit versions
always and always only on 64-bit platforms, without
regard to readq/writeq.

Normally, 64-bit platforms will have them anyway,
and if they neither have it nor use asm-generic/io.h
then iomap.c will simply not have the functions (the
ifdef remains there) and the link will fail (rather
than compilation).

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
---
 include/asm-generic/iomap.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h
index 196087a8126e..e3c0d4a85800 100644
--- a/include/asm-generic/iomap.h
+++ b/include/asm-generic/iomap.h
@@ -34,9 +34,6 @@ extern unsigned int ioread32be(const void __iomem *);
 #ifdef CONFIG_64BIT
 extern u64 ioread64(const void __iomem *);
 extern u64 ioread64be(const void __iomem *);
-#endif
-
-#ifdef readq
 #define ioread64_lo_hi ioread64_lo_hi
 #define ioread64_hi_lo ioread64_hi_lo
 #define ioread64be_lo_hi ioread64be_lo_hi
@@ -55,9 +52,6 @@ extern void iowrite32be(u32, void __iomem *);
 #ifdef CONFIG_64BIT
 extern void iowrite64(u64, void __iomem *);
 extern void iowrite64be(u64, void __iomem *);
-#endif
-
-#ifdef writeq
 #define iowrite64_lo_hi iowrite64_lo_hi
 #define iowrite64_hi_lo iowrite64_hi_lo
 #define iowrite64be_lo_hi iowrite64be_lo_hi
-- 
2.45.2





[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux