On Mon, May 08, 2023 at 06:04:06PM +0300, andy.shevchenko@xxxxxxxxx wrote: > Wed, Apr 26, 2023 at 03:10:45PM +0800, Yinbo Zhu kirjoitti: > > + loongson_spi_write_reg(loongson_spi, > > + LOONGSON_SPI_SFCS_REG, > > + (val ? (0x11 << spi->chip_select) : > > + (0x1 << spi->chip_select)) | cs); > Too many parentheses. The code is absolutely fine, there is nothing wrong with adding explicit parentheses even where not strictly needed if it helps to make things clear (which is obviously always a problem wiht ternery operator use). Please, stop this sort of nitpicking. It is at times actively unhelpful. > > + bit = fls(div) - 1; > > + if ((1<<bit) == div) > > + bit--; > > + div_tmp = rdiv[bit]; > I believe this can be optimized. This isn't constructive feedback, if there is a concrete optimisation you want to suggest please just suggest it. > > +EXPORT_SYMBOL_GPL(loongson_spi_init_master); > Please, use _NS variant. It really does not matter, the chances of any collisions is pretty much zero.
Attachment:
signature.asc
Description: PGP signature