Re: [PATCH 1/2] platform: make platform_get_irq_optional() optional
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH 1/2] platform: make platform_get_irq_optional() optional
- From: Sergey Shtylyov <s.shtylyov@xxxxxx>
- Date: Wed, 19 Jan 2022 21:29:28 +0300
- Cc: Andrew Lunn <andrew@xxxxxxx>, Ulf Hansson <ulf.hansson@xxxxxxxxxx>, Vignesh Raghavendra <vigneshr@xxxxxx>, KVM list <kvm@xxxxxxxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, <linux-iio@xxxxxxxxxxxxxxx>, "Linus Walleij" <linus.walleij@xxxxxxxxxx>, Amit Kucheria <amitk@xxxxxxxxxx>, "ALSA Development Mailing List" <alsa-devel@xxxxxxxxxxxxxxxx>, Jaroslav Kysela <perex@xxxxxxxx>, Guenter Roeck <groeck@xxxxxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, MTD Maling List <linux-mtd@xxxxxxxxxxxxxxxxxxx>, Linux I2C <linux-i2c@xxxxxxxxxxxxxxx>, Miquel Raynal <miquel.raynal@xxxxxxxxxxx>, <linux-phy@xxxxxxxxxxxxxxxxxxx>, linux-spi <linux-spi@xxxxxxxxxxxxxxx>, Jiri Slaby <jirislaby@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Khuong Dinh <khuong@xxxxxxxxxxxxxxxxxxxxxx>, Florian Fainelli <f.fainelli@xxxxxxxxx>, Matthias Schiffer <matthias.schiffer@xxxxxxxxxxxxxxx>, Kamal Dasu <kdasu.kdev@xxxxxxxxx>, "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>, Lee Jones <lee.jones@xxxxxxxxxx>, Bartosz Golaszewski <brgl@xxxxxxxx>, Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>, Kishon Vijay Abraham I <kishon@xxxxxx>, bcm-kernel-feedback-list <bcm-kernel-feedback-list@xxxxxxxxxxxx>, "open list:SERIAL DRIVERS" <linux-serial@xxxxxxxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Zhang Rui <rui.zhang@xxxxxxxxx>, <platform-driver-x86@xxxxxxxxxxxxxxx>, Linux PWM List <linux-pwm@xxxxxxxxxxxxxxx>, Robert Richter <rric@xxxxxxxxxx>, "Saravanan Sekar" <sravanhome@xxxxxxxxx>, Corey Minyard <minyard@xxxxxxx>, Linux PM list <linux-pm@xxxxxxxxxxxxxxx>, Liam Girdwood <lgirdwood@xxxxxxxxx>, "Mauro Carvalho Chehab" <mchehab@xxxxxxxxxx>, John Garry <john.garry@xxxxxxxxxx>, Peter Korsgaard <peter@xxxxxxxxxxxxx>, William Breathitt Gray <vilhelm.gray@xxxxxxxxx>, Mark Gross <markgross@xxxxxxxxxx>, Hans de Goede <hdegoede@xxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, "Mark Brown" <broonie@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, Matthias Brugger <matthias.bgg@xxxxxxxxx>, <openipmi-developer@xxxxxxxxxxxxxxxxxxxxx>, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, Benson Leung <bleung@xxxxxxxxxxxx>, Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>, Linux ARM <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <linux-edac@xxxxxxxxxxxxxxx>, "Tony Luck" <tony.luck@xxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, Mun Yew Tham <mun.yew.tham@xxxxxxxxx>, Eric Auger <eric.auger@xxxxxxxxxx>, netdev <netdev@xxxxxxxxxxxxxxx>, "open list:GPIO SUBSYSTEM" <linux-gpio@xxxxxxxxxxxxxxx>, Cornelia Huck <cohuck@xxxxxxxxxx>, "Linux MMC List" <linux-mmc@xxxxxxxxxxxxxxx>, Joakim Zhang <qiangqing.zhang@xxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Linux-Renesas <linux-renesas-soc@xxxxxxxxxxxxxxx>, Vinod Koul <vkoul@xxxxxxxxxx>, "James Morse" <james.morse@xxxxxxx>, Zha Qipeng <qipeng.zha@xxxxxxxxx>, "Sebastian Reichel" <sre@xxxxxxxxxx>, Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx>, <linux-mediatek@xxxxxxxxxxxxxxxxxxx>, "Brian Norris" <computersforpeace@xxxxxxxxx>, Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
- In-reply-to: <6370798a-7a7e-243d-99f9-09bf772ddbac@omp.ru>
- Organization: Open Mobile Platform
- References: <20220117092444.opoedfcf5k5u6otq@pengutronix.de> <CAMuHMdUgZUeraHadRAi2Z=DV+NuNBrKPkmAKsvFvir2MuquVoA@mail.gmail.com> <20220117114923.d5vajgitxneec7j7@pengutronix.de> <CAMuHMdWCKERO20R2iVHq8P=BaoauoBAtiampWzfMRYihi3Sb0g@mail.gmail.com> <20220117170609.yxaamvqdkivs56ju@pengutronix.de> <CAMuHMdXbuZqEpYivyS6hkaRN+CwTOGaHq_OROwVAWvDD6OXODQ@mail.gmail.com> <20220118090913.pjumkq4zf4iqtlha@pengutronix.de> <CAMuHMdUW8+Y_=uszD+JOZO3Lpa9oDayk+GO+cg276i2f2T285w@mail.gmail.com> <20220118120806.pbjsat4ulg3vnhsh@pengutronix.de> <CAMuHMdWkwV9XE_R5FZ=jPtDwLpDbEngG6+X2JmiDJCZJZvUjYA@mail.gmail.com> <20220118142945.6y3rmvzt44pjpr4z@pengutronix.de> <6370798a-7a7e-243d-99f9-09bf772ddbac@omp.ru>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1
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
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|