]> git.baikalelectronics.ru Git - kernel.git/commitdiff
io: Fix return type of _inb and _inl
authorStafford Horne <shorne@gmail.com>
Sun, 26 Jul 2020 03:11:54 +0000 (12:11 +0900)
committerArnd Bergmann <arnd@arndb.de>
Mon, 27 Jul 2020 08:32:29 +0000 (10:32 +0200)
The return type of functions _inb, _inw and _inl are all u16 which looks
wrong.  This patch makes them u8, u16 and u32 respectively.

The original commit text for these does not indicate that these should
be all forced to u16.

Fixes: f1547713df31 ("io: Provide _inX() and _outX()")
Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
include/asm-generic/io.h

index 8b1e020e9a034117afed69cbc08e2ed2b7fc8fa8..30a3aab312e6cf28c0f0e9601cef713ef4b0bd98 100644 (file)
@@ -456,7 +456,7 @@ static inline void writesq(volatile void __iomem *addr, const void *buffer,
 
 #if !defined(inb) && !defined(_inb)
 #define _inb _inb
-static inline u16 _inb(unsigned long addr)
+static inline u8 _inb(unsigned long addr)
 {
        u8 val;
 
@@ -482,7 +482,7 @@ static inline u16 _inw(unsigned long addr)
 
 #if !defined(inl) && !defined(_inl)
 #define _inl _inl
-static inline u16 _inl(unsigned long addr)
+static inline u32 _inl(unsigned long addr)
 {
        u32 val;