[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a73dd097-cc0b-449c-b819-3450688e67ba@wanadoo.fr>
Date: Thu, 1 May 2025 19:44:49 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: artur@...clusive.pl
Cc: broonie@...nel.org, conor+dt@...nel.org, devicetree@...r.kernel.org,
jakub@...clusive.pl, johannes@...solutions.net, krzk+dt@...nel.org,
lgirdwood@...il.com, linux-kernel@...r.kernel.org,
linux-wireless@...r.kernel.org, robh@...nel.org, s.hauer@...gutronix.de,
ulf.axelsson@...dicsemi.no, wojciech@...clusive.pl
Subject: Re: [RFC PATCH v2 2/2] wifi: Add Nordic nRF70 series Wi-Fi driver
Le 01/05/2025 à 12:41, Artur Rojek a écrit :
> Hi Christophe,
>
> thanks for the review!
> Reply inline.
>
> On Fri, Apr 25, 2025 at 9:31 PM Christophe JAILLET
> <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@...lic.gmane.org> wrote:
>>
>> Le 22/04/2025 à 19:59, Artur Rojek a écrit :
>>> Introduce support for Nordic Semiconductor nRF70 series wireless
>>> companion IC.
>>>
>>
>> Hi,
>> ...
>>
>>> + /* vpwr is mandatory, but we want to catch the -ENODEV error. */
>>> + priv->vpwr = devm_regulator_get_optional(dev, "vpwr");
>>> + if (IS_ERR(priv->vpwr))
>>> + return dev_err_probe(dev, PTR_ERR(priv->vpwr),
>>> + "Unable to find vpwr-supply property");
>>> +
>>> + priv->vio = devm_regulator_get_optional(dev, "vio");
>>> + if (IS_ERR(priv->vio) && PTR_ERR(priv->vio) != -ENODEV) {
>>> + return dev_err_probe(dev, PTR_ERR(priv->vio),
>>> + "Invalid vio-supply property");
>>> + }
>>
>> Unneeded extra { }
>>
>>> +
>>> + irq = of_irq_get_byname(dev->of_node, "host-irq");
>>> + if (irq <= 0)
>>> + return dev_err_probe(dev, irq, "Unable to find host-irq\n");
>>
>> If irq is 0, is it expected to return sucess here?
>
> No, return value of 0 is considered IRQ mapping failure, as per
> of_irq_get_byname() documentation. Perhaps it warrants a different error
> message, though.
My point is nor related to the test itself, or the message.
I mean, that, should irq = 0, then it ends to
return dev_err_probe(dev, 0, "Unable to find host-irq\n");
and the probe returns success.
Maybe something like:
return dev_err_probe(dev, irq ? irq : -ESOMETHING, "Unable to find
host-irq\n");
CJ
>
> Cheers,
> Artur
>
>>
>>> +
>>> + mutex_init(&priv->write_lock);
>>> + mutex_init(&priv->read_lock);
>> ...
>>
>> CJ
>
>
Powered by blists - more mailing lists