mailbox: tegra: Fix superfluous IRQ error message
diff mbox series

Message ID 20191011083459.11551-1-jonathanh@nvidia.com
State New
Headers show
Series
  • mailbox: tegra: Fix superfluous IRQ error message
Related show

Commit Message

Jon Hunter Oct. 11, 2019, 8:34 a.m. UTC
Commit 7723f4c5ecdb ("driver core: platform: Add an error message to
platform_get_irq*()") added an error message to avoid drivers having
to print an error message when IRQ lookup fails. However, there are
some cases where IRQs are optional and so new optional versions of
the platform_get_irq*() APIs have been added for these cases.

The IRQs for Tegra HSP module are optional because not all instances
of the module have the doorbell and all of the shared interrupts.
Hence, since the above commit was applied the following error messages
are now seen on Tegra194 ...

 ERR KERN tegra-hsp c150000.hsp: IRQ doorbell not found
 ERR KERN tegra-hsp c150000.hsp: IRQ shared0 not found

The Tegra HSP driver deliberately does not fail if these are not found
and so fix the above errors by updating the Tegra HSP driver to use
the platform_get_irq_byname_optional() API.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/mailbox/tegra-hsp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thierry Reding Oct. 14, 2019, 1:24 p.m. UTC | #1
On Fri, Oct 11, 2019 at 09:34:59AM +0100, Jon Hunter wrote:
> Commit 7723f4c5ecdb ("driver core: platform: Add an error message to
> platform_get_irq*()") added an error message to avoid drivers having
> to print an error message when IRQ lookup fails. However, there are
> some cases where IRQs are optional and so new optional versions of
> the platform_get_irq*() APIs have been added for these cases.
> 
> The IRQs for Tegra HSP module are optional because not all instances
> of the module have the doorbell and all of the shared interrupts.
> Hence, since the above commit was applied the following error messages
> are now seen on Tegra194 ...
> 
>  ERR KERN tegra-hsp c150000.hsp: IRQ doorbell not found
>  ERR KERN tegra-hsp c150000.hsp: IRQ shared0 not found
> 
> The Tegra HSP driver deliberately does not fail if these are not found
> and so fix the above errors by updating the Tegra HSP driver to use
> the platform_get_irq_byname_optional() API.
> 
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
>  drivers/mailbox/tegra-hsp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Perhaps Greg should pick up this patch because he's carrying the patch
that adds the platform_get_irq_byname_optional() patch for v5.5.

Greg, would you prefer a copy of this in your mailbox, or does the
following patchwork link suffice:

	http://patchwork.ozlabs.org/patch/1175012/

Either way, this patch:

Acked-by: Thierry Reding <treding@nvidia.com>

Thierry
Jon Hunter Nov. 12, 2019, 12:02 p.m. UTC | #2
Hi Greg,

On 14/10/2019 14:24, Thierry Reding wrote:
> On Fri, Oct 11, 2019 at 09:34:59AM +0100, Jon Hunter wrote:
>> Commit 7723f4c5ecdb ("driver core: platform: Add an error message to
>> platform_get_irq*()") added an error message to avoid drivers having
>> to print an error message when IRQ lookup fails. However, there are
>> some cases where IRQs are optional and so new optional versions of
>> the platform_get_irq*() APIs have been added for these cases.
>>
>> The IRQs for Tegra HSP module are optional because not all instances
>> of the module have the doorbell and all of the shared interrupts.
>> Hence, since the above commit was applied the following error messages
>> are now seen on Tegra194 ...
>>
>>  ERR KERN tegra-hsp c150000.hsp: IRQ doorbell not found
>>  ERR KERN tegra-hsp c150000.hsp: IRQ shared0 not found
>>
>> The Tegra HSP driver deliberately does not fail if these are not found
>> and so fix the above errors by updating the Tegra HSP driver to use
>> the platform_get_irq_byname_optional() API.
>>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>>  drivers/mailbox/tegra-hsp.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Perhaps Greg should pick up this patch because he's carrying the patch
> that adds the platform_get_irq_byname_optional() patch for v5.5.
> 
> Greg, would you prefer a copy of this in your mailbox, or does the
> following patchwork link suffice:
> 
> 	http://patchwork.ozlabs.org/patch/1175012/
> 
> Either way, this patch:
> 
> Acked-by: Thierry Reding <treding@nvidia.com>
> 
> Thierry

Are you OK to pick this up? Do you need Jassi's ACK as well?

Thanks!
Jon
Greg Kroah-Hartman Nov. 12, 2019, 2:07 p.m. UTC | #3
On Tue, Nov 12, 2019 at 12:02:02PM +0000, Jon Hunter wrote:
> Hi Greg,
> 
> On 14/10/2019 14:24, Thierry Reding wrote:
> > On Fri, Oct 11, 2019 at 09:34:59AM +0100, Jon Hunter wrote:
> >> Commit 7723f4c5ecdb ("driver core: platform: Add an error message to
> >> platform_get_irq*()") added an error message to avoid drivers having
> >> to print an error message when IRQ lookup fails. However, there are
> >> some cases where IRQs are optional and so new optional versions of
> >> the platform_get_irq*() APIs have been added for these cases.
> >>
> >> The IRQs for Tegra HSP module are optional because not all instances
> >> of the module have the doorbell and all of the shared interrupts.
> >> Hence, since the above commit was applied the following error messages
> >> are now seen on Tegra194 ...
> >>
> >>  ERR KERN tegra-hsp c150000.hsp: IRQ doorbell not found
> >>  ERR KERN tegra-hsp c150000.hsp: IRQ shared0 not found
> >>
> >> The Tegra HSP driver deliberately does not fail if these are not found
> >> and so fix the above errors by updating the Tegra HSP driver to use
> >> the platform_get_irq_byname_optional() API.
> >>
> >> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> >> ---
> >>  drivers/mailbox/tegra-hsp.c | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > Perhaps Greg should pick up this patch because he's carrying the patch
> > that adds the platform_get_irq_byname_optional() patch for v5.5.
> > 
> > Greg, would you prefer a copy of this in your mailbox, or does the
> > following patchwork link suffice:
> > 
> > 	http://patchwork.ozlabs.org/patch/1175012/
> > 
> > Either way, this patch:
> > 
> > Acked-by: Thierry Reding <treding@nvidia.com>
> > 
> > Thierry
> 
> Are you OK to pick this up? Do you need Jassi's ACK as well?

Sorry, I'll take it as-is, it should be fine.

greg k-h

Patch
diff mbox series

diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index 4c5ba35d48d4..834b35dc3b13 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -657,7 +657,7 @@  static int tegra_hsp_probe(struct platform_device *pdev)
 	hsp->num_db = (value >> HSP_nDB_SHIFT) & HSP_nINT_MASK;
 	hsp->num_si = (value >> HSP_nSI_SHIFT) & HSP_nINT_MASK;
 
-	err = platform_get_irq_byname(pdev, "doorbell");
+	err = platform_get_irq_byname_optional(pdev, "doorbell");
 	if (err >= 0)
 		hsp->doorbell_irq = err;
 
@@ -677,7 +677,7 @@  static int tegra_hsp_probe(struct platform_device *pdev)
 			if (!name)
 				return -ENOMEM;
 
-			err = platform_get_irq_byname(pdev, name);
+			err = platform_get_irq_byname_optional(pdev, name);
 			if (err >= 0) {
 				hsp->shared_irqs[i] = err;
 				count++;