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: <c232e3f1-b703-d8d2-7e2d-19ed3f5fc3ad@foss.st.com>
Date:   Wed, 28 Jun 2023 18:21:06 +0200
From:   Valentin CARON <valentin.caron@...s.st.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Mark Brown <broonie@...nel.org>
CC:     Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Alain Volmat <alain.volmat@...s.st.com>,
        <linux-spi@...r.kernel.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] spi: stm32: disable device mode with st,stm32f4-spi
 compatible

Hi,

On 6/27/23 15:39, Krzysztof Kozlowski wrote:
> On 27/06/2023 14:39, Valentin Caron wrote:
>> STM32 SPI driver is not capable to handle device mode with stm32f4 soc.
>> Stop probing if this case happens, and print an error with involved
>> compatible.
>>
> ...
>
>>   
>>   static const struct of_device_id stm32_spi_of_match[] = {
>> @@ -1798,8 +1802,16 @@ static int stm32_spi_probe(struct platform_device *pdev)
>>   	struct device_node *np = pdev->dev.of_node;
>>   	bool device_mode;
>>   	int ret;
>> +	const char *compatible =
>> +		of_match_device(pdev->dev.driver->of_match_table, &pdev->dev)->compatible;
> The goal was to replace it, so drop it.
Is is still needed for dev_err, so I can't
 > dev_err(&pdev->dev, "spi-slave not yet supported with %s\n", 
compatible);
>
>> +	const struct stm32_spi_cfg *cfg = (const struct stm32_spi_cfg *)
> Why do you need the cast? To drop the const? Are you sure it is really
> needed?
Effectively, this cast is useless, I will drop it.
>> +		of_device_get_match_data(&pdev->dev);
> Best regards,
> Krzysztof

Thanks,
Valentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ