Re: [PATCH v6 2/2] spi: loongson: add bus driver for the loongson spi controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux