linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver
@ 2019-10-05 21:04 Hans de Goede
  2019-10-05 21:04 ` [PATCH 1/3] driver core: platform: Add platform_get_irq_byname_optional() Hans de Goede
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Hans de Goede @ 2019-10-05 21:04 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Rafael J . Wysocki
  Cc: Hans de Goede, linux-usb, Stephen Boyd, linux-kernel

Hi All,

Here is a fix for the false-positive dev_err in platform_get_irq_byname()
discussed recently and reported here:
https://bugzilla.kernel.org/show_bug.cgi?id=205037

Since patch 2 depends on patch 1, I think it might be best to merge
all three patches through the same tree ...

Regards,

Hans


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] driver core: platform: Add platform_get_irq_byname_optional()
  2019-10-05 21:04 [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver Hans de Goede
@ 2019-10-05 21:04 ` Hans de Goede
  2019-10-07  8:53   ` Rafael J. Wysocki
  2019-10-07 15:30   ` Stephen Boyd
  2019-10-05 21:04 ` [PATCH 2/3] usb: dwc3: Switch to platform_get_irq_byname_optional() Hans de Goede
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Hans de Goede @ 2019-10-05 21:04 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Rafael J . Wysocki
  Cc: Hans de Goede, linux-usb, Stephen Boyd, linux-kernel

Some drivers (e.g dwc3) first try to get an IRQ byname and then fall
back to the one at index 0. In this case we do not want the error(s)
printed by platform_get_irq_byname(). This commit adds a new
platform_get_irq_byname_optional(), which does not print errors, for this.

While at it also improve the kdoc text for platform_get_irq_byname() a bit.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205037
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/base/platform.c         | 46 ++++++++++++++++++++++++++++-----
 include/linux/platform_device.h |  2 ++
 2 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index b6c6c7d97d5b..b230beb6ccb4 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -241,12 +241,8 @@ struct resource *platform_get_resource_byname(struct platform_device *dev,
 }
 EXPORT_SYMBOL_GPL(platform_get_resource_byname);
 
-/**
- * platform_get_irq_byname - get an IRQ for a device by name
- * @dev: platform device
- * @name: IRQ name
- */
-int platform_get_irq_byname(struct platform_device *dev, const char *name)
+static int __platform_get_irq_byname(struct platform_device *dev,
+				     const char *name)
 {
 	struct resource *r;
 
@@ -262,11 +258,47 @@ int platform_get_irq_byname(struct platform_device *dev, const char *name)
 	if (r)
 		return r->start;
 
-	dev_err(&dev->dev, "IRQ %s not found\n", name);
 	return -ENXIO;
 }
+
+/**
+ * platform_get_irq_byname - get an IRQ for a device by name
+ * @dev: platform device
+ * @name: IRQ name
+ *
+ * Get an IRQ like platform_get_irq(), but then by name rather then by index.
+ *
+ * Return: IRQ number on success, negative error number on failure.
+ */
+int platform_get_irq_byname(struct platform_device *dev, const char *name)
+{
+	int ret;
+
+	ret = __platform_get_irq_byname(dev, name);
+	if (ret < 0 && ret != -EPROBE_DEFER)
+		dev_err(&dev->dev, "IRQ %s not found\n", name);
+
+	return ret;
+}
 EXPORT_SYMBOL_GPL(platform_get_irq_byname);
 
+/**
+ * platform_get_irq_byname_optional - get an optional IRQ for a device by name
+ * @dev: platform device
+ * @name: IRQ name
+ *
+ * Get an optional IRQ by name like platform_get_irq_byname(). Except that it
+ * does not print an error message if an IRQ can not be obtained.
+ *
+ * Return: IRQ number on success, negative error number on failure.
+ */
+int platform_get_irq_byname_optional(struct platform_device *dev,
+				     const char *name)
+{
+	return __platform_get_irq_byname(dev, name);
+}
+EXPORT_SYMBOL_GPL(platform_get_irq_byname_optional);
+
 /**
  * platform_add_devices - add a numbers of platform devices
  * @devs: array of platform devices to add
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 1b5cec067533..f2688404d1cd 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -64,6 +64,8 @@ extern struct resource *platform_get_resource_byname(struct platform_device *,
 						     unsigned int,
 						     const char *);
 extern int platform_get_irq_byname(struct platform_device *, const char *);
+extern int platform_get_irq_byname_optional(struct platform_device *dev,
+					    const char *name);
 extern int platform_add_devices(struct platform_device **, int);
 
 struct platform_device_info {
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] usb: dwc3: Switch to platform_get_irq_byname_optional()
  2019-10-05 21:04 [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver Hans de Goede
  2019-10-05 21:04 ` [PATCH 1/3] driver core: platform: Add platform_get_irq_byname_optional() Hans de Goede
@ 2019-10-05 21:04 ` Hans de Goede
  2019-10-07  5:38   ` Felipe Balbi
  2019-10-07 15:31   ` Stephen Boyd
  2019-10-05 21:04 ` [PATCH 3/3] usb: dwc3: Remove dev_err() on platform_get_irq() failure Hans de Goede
  2019-10-07 10:54 ` [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver Greg Kroah-Hartman
  3 siblings, 2 replies; 11+ messages in thread
From: Hans de Goede @ 2019-10-05 21:04 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Rafael J . Wysocki
  Cc: Hans de Goede, linux-usb, Stephen Boyd, linux-kernel

The dwc3 code to get the "peripheral" / "host" / "otg" IRQ first tries
platform_get_irq_byname() and then falls back to the IRQ at index 0 if
the platform_get_irq_byname().

In this case we do not want platform_get_irq_byname() to print an error
on failure, so switch to platform_get_irq_byname_optional() instead which
does not print an error.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205037
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/usb/dwc3/drd.c    | 4 ++--
 drivers/usb/dwc3/gadget.c | 4 ++--
 drivers/usb/dwc3/host.c   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
index 726100d1ac0d..b1f76628b313 100644
--- a/drivers/usb/dwc3/drd.c
+++ b/drivers/usb/dwc3/drd.c
@@ -139,14 +139,14 @@ static int dwc3_otg_get_irq(struct dwc3 *dwc)
 	struct platform_device *dwc3_pdev = to_platform_device(dwc->dev);
 	int irq;
 
-	irq = platform_get_irq_byname(dwc3_pdev, "otg");
+	irq = platform_get_irq_byname_optional(dwc3_pdev, "otg");
 	if (irq > 0)
 		goto out;
 
 	if (irq == -EPROBE_DEFER)
 		goto out;
 
-	irq = platform_get_irq_byname(dwc3_pdev, "dwc_usb3");
+	irq = platform_get_irq_byname_optional(dwc3_pdev, "dwc_usb3");
 	if (irq > 0)
 		goto out;
 
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 8adb59f8e4f1..13c97ff21dba 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -3264,14 +3264,14 @@ static int dwc3_gadget_get_irq(struct dwc3 *dwc)
 	struct platform_device *dwc3_pdev = to_platform_device(dwc->dev);
 	int irq;
 
-	irq = platform_get_irq_byname(dwc3_pdev, "peripheral");
+	irq = platform_get_irq_byname_optional(dwc3_pdev, "peripheral");
 	if (irq > 0)
 		goto out;
 
 	if (irq == -EPROBE_DEFER)
 		goto out;
 
-	irq = platform_get_irq_byname(dwc3_pdev, "dwc_usb3");
+	irq = platform_get_irq_byname_optional(dwc3_pdev, "dwc_usb3");
 	if (irq > 0)
 		goto out;
 
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index 8deea8c91e03..534a49609779 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -16,14 +16,14 @@ static int dwc3_host_get_irq(struct dwc3 *dwc)
 	struct platform_device	*dwc3_pdev = to_platform_device(dwc->dev);
 	int irq;
 
-	irq = platform_get_irq_byname(dwc3_pdev, "host");
+	irq = platform_get_irq_byname_optional(dwc3_pdev, "host");
 	if (irq > 0)
 		goto out;
 
 	if (irq == -EPROBE_DEFER)
 		goto out;
 
-	irq = platform_get_irq_byname(dwc3_pdev, "dwc_usb3");
+	irq = platform_get_irq_byname_optional(dwc3_pdev, "dwc_usb3");
 	if (irq > 0)
 		goto out;
 
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] usb: dwc3: Remove dev_err() on platform_get_irq() failure
  2019-10-05 21:04 [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver Hans de Goede
  2019-10-05 21:04 ` [PATCH 1/3] driver core: platform: Add platform_get_irq_byname_optional() Hans de Goede
  2019-10-05 21:04 ` [PATCH 2/3] usb: dwc3: Switch to platform_get_irq_byname_optional() Hans de Goede
@ 2019-10-05 21:04 ` Hans de Goede
  2019-10-07  5:39   ` Felipe Balbi
  2019-10-07 15:31   ` Stephen Boyd
  2019-10-07 10:54 ` [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver Greg Kroah-Hartman
  3 siblings, 2 replies; 11+ messages in thread
From: Hans de Goede @ 2019-10-05 21:04 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Rafael J . Wysocki
  Cc: Hans de Goede, linux-usb, Stephen Boyd, linux-kernel

Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to
platform_get_irq*()"), platform_get_irq() will call dev_err() itself on
failure, so there is no need for the driver to also do this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/usb/dwc3/drd.c    | 3 ---
 drivers/usb/dwc3/gadget.c | 3 ---
 drivers/usb/dwc3/host.c   | 3 ---
 3 files changed, 9 deletions(-)

diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
index b1f76628b313..c946d64142ad 100644
--- a/drivers/usb/dwc3/drd.c
+++ b/drivers/usb/dwc3/drd.c
@@ -157,9 +157,6 @@ static int dwc3_otg_get_irq(struct dwc3 *dwc)
 	if (irq > 0)
 		goto out;
 
-	if (irq != -EPROBE_DEFER)
-		dev_err(dwc->dev, "missing OTG IRQ\n");
-
 	if (!irq)
 		irq = -EINVAL;
 
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 13c97ff21dba..86dc1db788a9 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -3282,9 +3282,6 @@ static int dwc3_gadget_get_irq(struct dwc3 *dwc)
 	if (irq > 0)
 		goto out;
 
-	if (irq != -EPROBE_DEFER)
-		dev_err(dwc->dev, "missing peripheral IRQ\n");
-
 	if (!irq)
 		irq = -EINVAL;
 
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index 534a49609779..5567ed2cddbe 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -34,9 +34,6 @@ static int dwc3_host_get_irq(struct dwc3 *dwc)
 	if (irq > 0)
 		goto out;
 
-	if (irq != -EPROBE_DEFER)
-		dev_err(dwc->dev, "missing host IRQ\n");
-
 	if (!irq)
 		irq = -EINVAL;
 
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] usb: dwc3: Switch to platform_get_irq_byname_optional()
  2019-10-05 21:04 ` [PATCH 2/3] usb: dwc3: Switch to platform_get_irq_byname_optional() Hans de Goede
@ 2019-10-07  5:38   ` Felipe Balbi
  2019-10-07 15:31   ` Stephen Boyd
  1 sibling, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2019-10-07  5:38 UTC (permalink / raw)
  To: Hans de Goede, Greg Kroah-Hartman, Rafael J . Wysocki
  Cc: Hans de Goede, linux-usb, Stephen Boyd, linux-kernel


Hi,

Hans de Goede <hdegoede@redhat.com> writes:

> The dwc3 code to get the "peripheral" / "host" / "otg" IRQ first tries
> platform_get_irq_byname() and then falls back to the IRQ at index 0 if
> the platform_get_irq_byname().
>
> In this case we do not want platform_get_irq_byname() to print an error
> on failure, so switch to platform_get_irq_byname_optional() instead which
> does not print an error.
>
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205037
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>

-- 
balbi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] usb: dwc3: Remove dev_err() on platform_get_irq() failure
  2019-10-05 21:04 ` [PATCH 3/3] usb: dwc3: Remove dev_err() on platform_get_irq() failure Hans de Goede
@ 2019-10-07  5:39   ` Felipe Balbi
  2019-10-07 15:31   ` Stephen Boyd
  1 sibling, 0 replies; 11+ messages in thread
From: Felipe Balbi @ 2019-10-07  5:39 UTC (permalink / raw)
  To: Hans de Goede, Greg Kroah-Hartman, Rafael J . Wysocki
  Cc: Hans de Goede, linux-usb, Stephen Boyd, linux-kernel


Hi,

Hans de Goede <hdegoede@redhat.com> writes:

> Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to
> platform_get_irq*()"), platform_get_irq() will call dev_err() itself on
> failure, so there is no need for the driver to also do this.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>

-- 
balbi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] driver core: platform: Add platform_get_irq_byname_optional()
  2019-10-05 21:04 ` [PATCH 1/3] driver core: platform: Add platform_get_irq_byname_optional() Hans de Goede
@ 2019-10-07  8:53   ` Rafael J. Wysocki
  2019-10-07 15:30   ` Stephen Boyd
  1 sibling, 0 replies; 11+ messages in thread
From: Rafael J. Wysocki @ 2019-10-07  8:53 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Felipe Balbi, Greg Kroah-Hartman, Rafael J . Wysocki,
	open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:,
	Stephen Boyd, Linux Kernel Mailing List

On Sat, Oct 5, 2019 at 11:04 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Some drivers (e.g dwc3) first try to get an IRQ byname and then fall
> back to the one at index 0. In this case we do not want the error(s)
> printed by platform_get_irq_byname(). This commit adds a new
> platform_get_irq_byname_optional(), which does not print errors, for this.
>
> While at it also improve the kdoc text for platform_get_irq_byname() a bit.
>
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205037
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

No issues found:

Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  drivers/base/platform.c         | 46 ++++++++++++++++++++++++++++-----
>  include/linux/platform_device.h |  2 ++
>  2 files changed, 41 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index b6c6c7d97d5b..b230beb6ccb4 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -241,12 +241,8 @@ struct resource *platform_get_resource_byname(struct platform_device *dev,
>  }
>  EXPORT_SYMBOL_GPL(platform_get_resource_byname);
>
> -/**
> - * platform_get_irq_byname - get an IRQ for a device by name
> - * @dev: platform device
> - * @name: IRQ name
> - */
> -int platform_get_irq_byname(struct platform_device *dev, const char *name)
> +static int __platform_get_irq_byname(struct platform_device *dev,
> +                                    const char *name)
>  {
>         struct resource *r;
>
> @@ -262,11 +258,47 @@ int platform_get_irq_byname(struct platform_device *dev, const char *name)
>         if (r)
>                 return r->start;
>
> -       dev_err(&dev->dev, "IRQ %s not found\n", name);
>         return -ENXIO;
>  }
> +
> +/**
> + * platform_get_irq_byname - get an IRQ for a device by name
> + * @dev: platform device
> + * @name: IRQ name
> + *
> + * Get an IRQ like platform_get_irq(), but then by name rather then by index.
> + *
> + * Return: IRQ number on success, negative error number on failure.
> + */
> +int platform_get_irq_byname(struct platform_device *dev, const char *name)
> +{
> +       int ret;
> +
> +       ret = __platform_get_irq_byname(dev, name);
> +       if (ret < 0 && ret != -EPROBE_DEFER)
> +               dev_err(&dev->dev, "IRQ %s not found\n", name);
> +
> +       return ret;
> +}
>  EXPORT_SYMBOL_GPL(platform_get_irq_byname);
>
> +/**
> + * platform_get_irq_byname_optional - get an optional IRQ for a device by name
> + * @dev: platform device
> + * @name: IRQ name
> + *
> + * Get an optional IRQ by name like platform_get_irq_byname(). Except that it
> + * does not print an error message if an IRQ can not be obtained.
> + *
> + * Return: IRQ number on success, negative error number on failure.
> + */
> +int platform_get_irq_byname_optional(struct platform_device *dev,
> +                                    const char *name)
> +{
> +       return __platform_get_irq_byname(dev, name);
> +}
> +EXPORT_SYMBOL_GPL(platform_get_irq_byname_optional);
> +
>  /**
>   * platform_add_devices - add a numbers of platform devices
>   * @devs: array of platform devices to add
> diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
> index 1b5cec067533..f2688404d1cd 100644
> --- a/include/linux/platform_device.h
> +++ b/include/linux/platform_device.h
> @@ -64,6 +64,8 @@ extern struct resource *platform_get_resource_byname(struct platform_device *,
>                                                      unsigned int,
>                                                      const char *);
>  extern int platform_get_irq_byname(struct platform_device *, const char *);
> +extern int platform_get_irq_byname_optional(struct platform_device *dev,
> +                                           const char *name);
>  extern int platform_add_devices(struct platform_device **, int);
>
>  struct platform_device_info {
> --
> 2.23.0
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver
  2019-10-05 21:04 [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver Hans de Goede
                   ` (2 preceding siblings ...)
  2019-10-05 21:04 ` [PATCH 3/3] usb: dwc3: Remove dev_err() on platform_get_irq() failure Hans de Goede
@ 2019-10-07 10:54 ` Greg Kroah-Hartman
  3 siblings, 0 replies; 11+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-07 10:54 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Felipe Balbi, Rafael J . Wysocki, linux-usb, Stephen Boyd, linux-kernel

On Sat, Oct 05, 2019 at 11:04:46PM +0200, Hans de Goede wrote:
> Hi All,
> 
> Here is a fix for the false-positive dev_err in platform_get_irq_byname()
> discussed recently and reported here:
> https://bugzilla.kernel.org/show_bug.cgi?id=205037
> 
> Since patch 2 depends on patch 1, I think it might be best to merge
> all three patches through the same tree ...

Thanks for these, I'll take them through my USB tree to be merged to
Linus soon.

greg k-h

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] driver core: platform: Add platform_get_irq_byname_optional()
  2019-10-05 21:04 ` [PATCH 1/3] driver core: platform: Add platform_get_irq_byname_optional() Hans de Goede
  2019-10-07  8:53   ` Rafael J. Wysocki
@ 2019-10-07 15:30   ` Stephen Boyd
  1 sibling, 0 replies; 11+ messages in thread
From: Stephen Boyd @ 2019-10-07 15:30 UTC (permalink / raw)
  To: Rafael J . Wysocki, Felipe Balbi, Greg Kroah-Hartman, Hans de Goede
  Cc: Hans de Goede, linux-usb, linux-kernel

Quoting Hans de Goede (2019-10-05 14:04:47)
> Some drivers (e.g dwc3) first try to get an IRQ byname and then fall
> back to the one at index 0. In this case we do not want the error(s)
> printed by platform_get_irq_byname(). This commit adds a new
> platform_get_irq_byname_optional(), which does not print errors, for this.
> 
> While at it also improve the kdoc text for platform_get_irq_byname() a bit.
> 
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205037
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] usb: dwc3: Switch to platform_get_irq_byname_optional()
  2019-10-05 21:04 ` [PATCH 2/3] usb: dwc3: Switch to platform_get_irq_byname_optional() Hans de Goede
  2019-10-07  5:38   ` Felipe Balbi
@ 2019-10-07 15:31   ` Stephen Boyd
  1 sibling, 0 replies; 11+ messages in thread
From: Stephen Boyd @ 2019-10-07 15:31 UTC (permalink / raw)
  To: Rafael J . Wysocki, Felipe Balbi, Greg Kroah-Hartman, Hans de Goede
  Cc: Hans de Goede, linux-usb, linux-kernel

Quoting Hans de Goede (2019-10-05 14:04:48)
> The dwc3 code to get the "peripheral" / "host" / "otg" IRQ first tries
> platform_get_irq_byname() and then falls back to the IRQ at index 0 if
> the platform_get_irq_byname().
> 
> In this case we do not want platform_get_irq_byname() to print an error
> on failure, so switch to platform_get_irq_byname_optional() instead which
> does not print an error.
> 
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205037
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] usb: dwc3: Remove dev_err() on platform_get_irq() failure
  2019-10-05 21:04 ` [PATCH 3/3] usb: dwc3: Remove dev_err() on platform_get_irq() failure Hans de Goede
  2019-10-07  5:39   ` Felipe Balbi
@ 2019-10-07 15:31   ` Stephen Boyd
  1 sibling, 0 replies; 11+ messages in thread
From: Stephen Boyd @ 2019-10-07 15:31 UTC (permalink / raw)
  To: Rafael J . Wysocki, Felipe Balbi, Greg Kroah-Hartman, Hans de Goede
  Cc: Hans de Goede, linux-usb, linux-kernel

Quoting Hans de Goede (2019-10-05 14:04:49)
> Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to
> platform_get_irq*()"), platform_get_irq() will call dev_err() itself on
> failure, so there is no need for the driver to also do this.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-10-07 15:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-05 21:04 [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver Hans de Goede
2019-10-05 21:04 ` [PATCH 1/3] driver core: platform: Add platform_get_irq_byname_optional() Hans de Goede
2019-10-07  8:53   ` Rafael J. Wysocki
2019-10-07 15:30   ` Stephen Boyd
2019-10-05 21:04 ` [PATCH 2/3] usb: dwc3: Switch to platform_get_irq_byname_optional() Hans de Goede
2019-10-07  5:38   ` Felipe Balbi
2019-10-07 15:31   ` Stephen Boyd
2019-10-05 21:04 ` [PATCH 3/3] usb: dwc3: Remove dev_err() on platform_get_irq() failure Hans de Goede
2019-10-07  5:39   ` Felipe Balbi
2019-10-07 15:31   ` Stephen Boyd
2019-10-07 10:54 ` [PATCH 0/3] Add platform_get_irq_byname_optional() and use it in the dwc3 driver Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).