lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZFnOZptCM7JDFTQz@finisterre.sirena.org.uk>
Date:   Tue, 9 May 2023 13:39:02 +0900
From:   Mark Brown <broonie@...nel.org>
To:     andy.shevchenko@...il.com
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 v9 2/2] spi: loongson: add bus driver for the loongson
 spi controller

On Mon, May 08, 2023 at 06:04:06PM +0300, andy.shevchenko@...il.com 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.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ