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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 1 Jan 2021 12:27:41 +0100
From:   Bert Vermeulen <bert@...t.com>
To:     Lukas Wunner <lukas@...ner.de>
Cc:     Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
        Birger Koblitz <mail@...ger-koblitz.de>,
        linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND v2 2/2] Add support for Realtek RTL838x/RTL839x SoC
 SPI controllers

On 12/31/20 3:23 PM, Lukas Wunner wrote:
> On Wed, Dec 30, 2020 at 12:19:04AM +0100, Bert Vermeulen wrote:
>> +static inline void wait_ready(struct rtspi *rtspi)
>> +{
>> +	while (!(readl(REG(RTL8380_SPI_SFCSR)) & RTL8380_SPI_SFCSR_RDY))
>> +		;
>> +}
> 
> I'd suggest calling cpu_relax() in the loop's body.
> 
> 
>> +	err = devm_spi_register_controller(&pdev->dev, ctrl);
> 
> Since you're invoking devm_spi_register_controller() on probe,
> the controller must not be unregistered explicitly on remove.
> So the ->remove hook can be dropped altogether:
> 
>> +static int realtek_spi_remove(struct platform_device *pdev)
>> +{
>> +	struct spi_controller *ctrl = platform_get_drvdata(pdev);
>> +
>> +	spi_unregister_controller(ctrl);
>> +
>> +	return 0;
>> +}
> [...]
>> +	.remove = realtek_spi_remove,
> 
> The ->probe hook otherwise LGTM.

Thanks Lukas, will fix those issues.


-- 
Bert Vermeulen
bert@...t.com

Powered by blists - more mailing lists