Skip to content

Commit

Permalink
io: Fix return type of _inb and _inl
Browse files Browse the repository at this point in the history
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: f009c89 ("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>
  • Loading branch information
Stafford Horne authored and Arnd Bergmann committed Jul 27, 2020
1 parent b3a9e3b commit 214ba35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-generic/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 214ba35

Please sign in to comment.