lkml.org 
[lkml]   [2022]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] platform: make platform_get_irq_optional() optional
Date
On 1/19/22 7:12 PM, Sergey Shtylyov wrote:

[...]
>>> So there's still a need for two functions.
>>
>> Or a single function not emitting an error message together with the
>> callers being responsible for calling dev_err().
>>
>> So the options in my preference order (first is best) are:
>>
>> - Remove the printk from platform_get_irq() and remove
>> platform_get_irq_optional();
>
> Strong NAK here:
> - dev_err() in our function saves a lot of (repeatable!) comments;

s/comments/code/.
Actually, I think I can accept the removal of dev_err_probe() in platform_get_irq()
as this is not a common practice anyway (yet? :-))...

> - we've already discussed that it's more optimal to check againt 0 than

Against. :-)

> against -ENXIO in the callers.

And we also aim to be the error code agnostic in the callers...

>> - Rename platform_get_irq_optional() to platform_get_irq_silently()
>
> NAK as well. We'd better off complaining about irq < 0 in this function.

>> - Keep platform_get_irq_optional() as is
>
> NAK, it's suboptimal in the call sites.

s/in/on/.

[...]

>> Best regards
>> Uwe

MBR, Sergey

\
 
 \ /
  Last update: 2022-01-19 19:30    [W:0.125 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site