Re: [PATCH v3] driver core: platform: Add an error message to platform_get_irq*()

2019-01-03 Thread Andy Shevchenko
On Wed, Jan 2, 2019 at 8:51 PM Stephen Boyd wrote: > > A grep of the kernel shows that many drivers print an error message if > they fail to get the irq they're looking for. Furthermore, those drivers > all decide to print the device name, or not, and the irq they were > requesting, or not, etc.

Re: [PATCH v3] driver core: platform: Add an error message to platform_get_irq*()

2019-01-03 Thread Rafael J. Wysocki
On Thu, Jan 3, 2019 at 6:25 PM Stephen Boyd wrote: > > Quoting Rafael J. Wysocki (2019-01-03 09:22:56) > > On Thu, Jan 3, 2019 at 5:12 PM Stephen Boyd wrote: > > > > > > I don't see much benefit to seeing -ENXIO or -EINVAL printed here, so I > > > left out the error code. > > > > OK, so the

Re: [PATCH v3] driver core: platform: Add an error message to platform_get_irq*()

2019-01-03 Thread Stephen Boyd
Quoting Rafael J. Wysocki (2019-01-03 09:22:56) > On Thu, Jan 3, 2019 at 5:12 PM Stephen Boyd wrote: > > > > I don't see much benefit to seeing -ENXIO or -EINVAL printed here, so I > > left out the error code. > > OK, so the value of the message is to tell the user that some driver > asked for

Re: [PATCH v3] driver core: platform: Add an error message to platform_get_irq*()

2019-01-03 Thread Rafael J. Wysocki
On Thu, Jan 3, 2019 at 5:12 PM Stephen Boyd wrote: > > Quoting Rafael J. Wysocki (2019-01-03 01:40:26) > > On Wed, Jan 2, 2019 at 7:51 PM Stephen Boyd wrote: > > > @@ -130,6 +125,22 @@ int platform_get_irq(struct platform_device *dev, > > > unsigned int num) > > > return r ? r->start :

Re: [PATCH v3] driver core: platform: Add an error message to platform_get_irq*()

2019-01-03 Thread Stephen Boyd
Quoting Rafael J. Wysocki (2019-01-03 01:40:26) > On Wed, Jan 2, 2019 at 7:51 PM Stephen Boyd wrote: > > @@ -130,6 +125,22 @@ int platform_get_irq(struct platform_device *dev, > > unsigned int num) > > return r ? r->start : -ENXIO; > > #endif > > } > > + > > +/** > > + *

Re: [PATCH v3] driver core: platform: Add an error message to platform_get_irq*()

2019-01-03 Thread Rafael J. Wysocki
On Wed, Jan 2, 2019 at 7:51 PM Stephen Boyd wrote: > > A grep of the kernel shows that many drivers print an error message if > they fail to get the irq they're looking for. Furthermore, those drivers > all decide to print the device name, or not, and the irq they were > requesting, or not, etc.

[PATCH v3] driver core: platform: Add an error message to platform_get_irq*()

2019-01-02 Thread Stephen Boyd
A grep of the kernel shows that many drivers print an error message if they fail to get the irq they're looking for. Furthermore, those drivers all decide to print the device name, or not, and the irq they were requesting, or not, etc. Let's consolidate all these error messages into the API