[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51CE18FD.8010806@gmail.com>
Date: Sat, 29 Jun 2013 09:15:09 +1000
From: Ryan Mallon <rmallon@...il.com>
To: H Hartley Sweeten <hartleys@...ionengravers.com>
CC: Linux Kernel <linux-kernel@...r.kernel.org>,
spi-devel-general@...ts.sourceforge.net, mika.westerberg@....fi,
broonie@...nel.org, grant.likely@...aro.org
Subject: Re: [PATCH 1/8] spi: spi-ep93xx: use read,write instead of __raw_*
variants
On 29/06/13 04:42, H Hartley Sweeten wrote:
> The memory resource used by this driver is ioremap()'d and the normal
> read,write calls can be used instead of the __raw_* variants.
>
> Remove the inline read,write helpers and just do the read,write
> directly in the callers.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
> Cc: Ryan Mallon <rmallon@...il.com>
> Cc: Mika Westerberg <mika.westerberg@....fi>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: Grant Likely <grant.likely@...aro.org>
> ---
> drivers/spi/spi-ep93xx.c | 64 +++++++++++++++---------------------------------
> 1 file changed, 20 insertions(+), 44 deletions(-)
>
> diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
> index d7bac60..c633cd0 100644
> --- a/drivers/spi/spi-ep93xx.c
> +++ b/drivers/spi/spi-ep93xx.c
> @@ -158,30 +158,6 @@ struct ep93xx_spi_chip {
> /* converts bits per word to CR0.DSS value */
> #define bits_per_word_to_dss(bpw) ((bpw) - 1)
>
> -static inline void
> -ep93xx_spi_write_u8(const struct ep93xx_spi *espi, u16 reg, u8 value)
> -{
> - __raw_writeb(value, espi->regs_base + reg);
> -}
> -
> -static inline u8
> -ep93xx_spi_read_u8(const struct ep93xx_spi *spi, u16 reg)
> -{
> - return __raw_readb(spi->regs_base + reg);
> -}
Is there a particular reason to drop these functions? It's basically just
bike-shedding, but they can make the code more readable at very little
cost. Even dropping the inline (which is preferred nowdays) the compiler
will still inline these, and it would also make this patch much smaller
to keep them.
~Ryan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists