[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8fda2ae-07b7-af30-2b0d-213a60a7b802@omp.ru>
Date: Thu, 20 Jan 2022 14:27:08 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Geert Uytterhoeven <geert@...ux-m68k.org>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
CC: Andrew Lunn <andrew@...n.ch>, Ulf Hansson <ulf.hansson@...aro.org>,
Vignesh Raghavendra <vigneshr@...com>,
KVM list <kvm@...r.kernel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
<linux-iio@...r.kernel.org>,
"Linus Walleij" <linus.walleij@...aro.org>,
Amit Kucheria <amitk@...nel.org>,
"ALSA Development Mailing List" <alsa-devel@...a-project.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Jaroslav Kysela <perex@...ex.cz>,
Guenter Roeck <groeck@...omium.org>,
Thierry Reding <thierry.reding@...il.com>,
MTD Maling List <linux-mtd@...ts.infradead.org>,
Linux I2C <linux-i2c@...r.kernel.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
<linux-phy@...ts.infradead.org>, Jiri Slaby <jirislaby@...nel.org>,
<openipmi-developer@...ts.sourceforge.net>,
"Khuong Dinh" <khuong@...amperecomputing.com>,
Florian Fainelli <f.fainelli@...il.com>,
Matthias Schiffer <matthias.schiffer@...tq-group.com>,
Joakim Zhang <qiangqing.zhang@....com>,
Kamal Dasu <kdasu.kdev@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Lee Jones <lee.jones@...aro.org>,
"Bartosz Golaszewski" <brgl@...ev.pl>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
"Tony Luck" <tony.luck@...el.com>,
Kishon Vijay Abraham I <kishon@...com>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@...adcom.com>,
"open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
Jakub Kicinski <kuba@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Linux PWM List <linux-pwm@...r.kernel.org>,
Robert Richter <rric@...nel.org>,
"Saravanan Sekar" <sravanhome@...il.com>,
Corey Minyard <minyard@....org>,
Linux PM list <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
John Garry <john.garry@...wei.com>,
Peter Korsgaard <peter@...sgaard.com>,
William Breathitt Gray <vilhelm.gray@...il.com>,
Mark Gross <markgross@...nel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Alex Williamson <alex.williamson@...hat.com>,
Mark Brown <broonie@...nel.org>,
Borislav Petkov <bp@...en8.de>,
"Sebastian Reichel" <sre@...nel.org>,
Eric Auger <eric.auger@...hat.com>,
"Matthias Brugger" <matthias.bgg@...il.com>,
Takashi Iwai <tiwai@...e.com>,
<platform-driver-x86@...r.kernel.org>,
Benson Leung <bleung@...omium.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
<linux-edac@...r.kernel.org>,
Mun Yew Tham <mun.yew.tham@...el.com>,
"Hans de Goede" <hdegoede@...hat.com>,
netdev <netdev@...r.kernel.org>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@...esas.com>,
Cornelia Huck <cohuck@...hat.com>,
Linux MMC List <linux-mmc@...r.kernel.org>,
"Liam Girdwood" <lgirdwood@...il.com>,
linux-spi <linux-spi@...r.kernel.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Vinod Koul <vkoul@...nel.org>,
James Morse <james.morse@....com>,
Zha Qipeng <qipeng.zha@...el.com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Richard Weinberger <richard@....at>,
Niklas Söderlund <niklas.soderlund@...natech.se>,
<linux-mediatek@...ts.infradead.org>,
"Brian Norris" <computersforpeace@...il.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH 1/2] platform: make platform_get_irq_optional() optional
On 1/17/22 4:08 PM, Geert Uytterhoeven wrote:
[...]
>>> But as we were all in a hurry to kill the non-applicable error
>>> message, we went for the quick and dirty fix.
>>>
>>>> Also I fail to see how a caller of (today's) platform_get_irq_optional()
>>>> is simpler than a caller of platform_get_irq() given that there is no
>>>> semantic difference between the two. Please show me a single
>>>> conversion from platform_get_irq to platform_get_irq_optional that
>>>> yielded a simplification.
>>>
>>> That's exactly why we want to change the latter to return 0 ;-)
>>
>> OK. So you agree to my statement "The reason for
>> platform_get_irq_optional()'s existence is just that platform_get_irq()
>> emits an error message [...]". Actually you don't want to oppose but
>> say: It's unfortunate that the silent variant of platform_get_irq() took
>> the obvious name of a function that could have an improved return code
>> semantic.
>>
>> So my suggestion to rename todays platform_get_irq_optional() to
>> platform_get_irq_silently() and then introducing
>> platform_get_irq_optional() with your suggested semantic seems
>> intriguing and straigt forward to me.
>
> I don't really see the point of needing platform_get_irq_silently(),
> unless as an intermediary step, where it's going to be removed again
> once the conversion has completed.
> Still, the rename would touch all users at once anyway.
>
>> Another thought: platform_get_irq emits an error message for all
>> problems. Wouldn't it be consistent to let platform_get_irq_optional()
>> emit an error message for all problems but "not found"?
>> Alternatively remove the error printk from platform_get_irq().
>
> Yes, all problems but not found are real errors.
ACK for using dev_err_probe() in platfrom_get_irq_optional()
for the real errors...
I've also noted that only platfrom_get_irq_optional() got converted
from dev_err() to dev_err_probe() but not platfrom_get_irq_byname_optional()...
[...]
> Gr{oetje,eeting}s,
>
> Geert
MBR, Sergey
Powered by blists - more mailing lists