Re: [PATCH v3 2/2] gpio: Add Realtek Otto GPIO support

From: Sander Vanheule
Date: Wed Mar 24 2021 - 17:29:59 EST


On Wed, 2021-03-24 at 22:22 +0100, Sander Vanheule wrote:
> +static inline u8 read_u8_reg(void __iomem* reg, unsigned int port)
> +{
> +       return ioread8(reg + port);
> +}
> +
> +static inline void write_u8_reg(void __iomem* reg, unsigned int port,
> u8 value)
> +{
> +       iowrite8(value, reg + port);
> +}
> +
> +static inline u16 read_u16_reg(void __iomem* reg, unsigned int port)
> +{
> +       return ioread16(reg + 2 * port);
> +}
> +
> +static inline void write_u16_reg(void __iomem* reg, unsigned int
> port, u16 value)
> +{
> +       iowrite16(value, reg + 2 * port);
> +}

Of course I only noticed this after sending v3, but these functions
should have "void __iomem *reg" instead. I can fix this in a next
version.

Best,
Sander