[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZCmiNSxMWmdolMub@sirena.org.uk>
Date: Sun, 2 Apr 2023 16:41:41 +0100
From: Mark Brown <broonie@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Yinbo Zhu <zhuyinbo@...ngson.cn>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Jianmin Lv <lvjianmin@...ngson.cn>,
wanghongliang@...ngson.cn, Liu Peibao <liupeibao@...ngson.cn>,
loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v6 2/2] spi: loongson: add bus driver for the loongson
spi controller
On Sun, Apr 02, 2023 at 12:04:00PM +0200, Krzysztof Kozlowski wrote:
> On 01/04/2023 11:56, Yinbo Zhu wrote:
> > +static inline void loongson_spi_write_reg(struct loongson_spi *spi, unsigned char reg,
> > + unsigned char data)
> > +{
> > + writeb(data, spi->base + reg);
> This wrapper does not simplify anything.
This is an *extremely* standard wrapper which adds the base and
register to work out the address to write to without having to
duplicate it for every caller. There is absolutely nothing wrong
with it, or the read equivalent - they are useful and helpful.
> > +#define LOONGSON_SPI_SPCR_REG 0x00
> There is just one space after #define.
It's using a tab which is again not the end of the world.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists