All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
@ 2017-06-30 19:59 Gustavo A. R. Silva
  2017-06-30 20:07   ` Takashi Iwai
  0 siblings, 1 reply; 12+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-30 19:59 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

platform_get_irq() returns an error code, but the sata_rcar driver
ignores it and always returns -ENODEV. This is not correct, and
prevents -EPROBE_DEFER from being propagated properly. Also,
notice that platform_get_irq() no longer returns 0 on error.

Print and propagate the return value of platform_get_irq on failure.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 sound/x86/intel_hdmi_audio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index c19efc9..a095150 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1758,8 +1758,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
 	/* get resources */
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(&pdev->dev, "Could not get irq resource\n");
-		return -ENODEV;
+		dev_err(&pdev->dev, "Could not get irq resource: %d\n", irq);
+		return irq;
 	}
 
 	res_mmio = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-- 
2.5.0

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

* Re: [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
  2017-06-30 19:59 [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe() Gustavo A. R. Silva
@ 2017-06-30 20:07   ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2017-06-30 20:07 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

On Fri, 30 Jun 2017 21:59:01 +0200,
Gustavo A. R. Silva wrote:
> 
> platform_get_irq() returns an error code, but the sata_rcar driver
> ignores it and always returns -ENODEV.

Which driver?  A copy&paste error?


Takashi

> This is not correct, and
> prevents -EPROBE_DEFER from being propagated properly. Also,
> notice that platform_get_irq() no longer returns 0 on error.
> 
> Print and propagate the return value of platform_get_irq on failure.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>  sound/x86/intel_hdmi_audio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
> index c19efc9..a095150 100644
> --- a/sound/x86/intel_hdmi_audio.c
> +++ b/sound/x86/intel_hdmi_audio.c
> @@ -1758,8 +1758,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
>  	/* get resources */
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
> -		dev_err(&pdev->dev, "Could not get irq resource\n");
> -		return -ENODEV;
> +		dev_err(&pdev->dev, "Could not get irq resource: %d\n", irq);
> +		return irq;
>  	}
>  
>  	res_mmio = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -- 
> 2.5.0
> 
> 

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

* Re: [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
@ 2017-06-30 20:07   ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2017-06-30 20:07 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

On Fri, 30 Jun 2017 21:59:01 +0200,
Gustavo A. R. Silva wrote:
> 
> platform_get_irq() returns an error code, but the sata_rcar driver
> ignores it and always returns -ENODEV.

Which driver?  A copy&paste error?


Takashi

> This is not correct, and
> prevents -EPROBE_DEFER from being propagated properly. Also,
> notice that platform_get_irq() no longer returns 0 on error.
> 
> Print and propagate the return value of platform_get_irq on failure.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
>  sound/x86/intel_hdmi_audio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
> index c19efc9..a095150 100644
> --- a/sound/x86/intel_hdmi_audio.c
> +++ b/sound/x86/intel_hdmi_audio.c
> @@ -1758,8 +1758,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
>  	/* get resources */
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
> -		dev_err(&pdev->dev, "Could not get irq resource\n");
> -		return -ENODEV;
> +		dev_err(&pdev->dev, "Could not get irq resource: %d\n", irq);
> +		return irq;
>  	}
>  
>  	res_mmio = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -- 
> 2.5.0
> 
> 

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

* Re: [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
  2017-06-30 20:07   ` Takashi Iwai
  (?)
@ 2017-06-30 20:12   ` Gustavo A. R. Silva
  2017-06-30 20:18     ` [PATCH v2] " Gustavo A. R. Silva
  -1 siblings, 1 reply; 12+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-30 20:12 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

Hi Takashi,

Quoting Takashi Iwai <tiwai@suse.de>:

> On Fri, 30 Jun 2017 21:59:01 +0200,
> Gustavo A. R. Silva wrote:
>>
>> platform_get_irq() returns an error code, but the sata_rcar driver
>> ignores it and always returns -ENODEV.
>
> Which driver?  A copy&paste error?
>

Yep, I'm already working on v2 of this patch, which fix this error.  
I'll send it shortly.

Thanks
--
Gustavo A. R. Silva

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

* [PATCH v2] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
  2017-06-30 20:12   ` Gustavo A. R. Silva
@ 2017-06-30 20:18     ` Gustavo A. R. Silva
  2017-06-30 20:27         ` Takashi Iwai
  0 siblings, 1 reply; 12+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-30 20:18 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, linux-kernel, Gustavo A. R. Silva

platform_get_irq() returns an error code, but the intel_hdmi_audio
driver ignores it and always returns -ENODEV. This is not correct,
and prevents -EPROBE_DEFER from being propagated properly. Also,
notice that platform_get_irq() no longer returns 0 on error.

Print error message and propagate the return value of platform_get_irq
on failure.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
Changes in v2:
 Fix error in commit message.

 sound/x86/intel_hdmi_audio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index c19efc9..a095150 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1758,8 +1758,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
 	/* get resources */
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(&pdev->dev, "Could not get irq resource\n");
-		return -ENODEV;
+		dev_err(&pdev->dev, "Could not get irq resource: %d\n", irq);
+		return irq;
 	}
 
 	res_mmio = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-- 
2.5.0

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

* Re: [PATCH v2] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
  2017-06-30 20:18     ` [PATCH v2] " Gustavo A. R. Silva
@ 2017-06-30 20:27         ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2017-06-30 20:27 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

On Fri, 30 Jun 2017 22:18:41 +0200,
Gustavo A. R. Silva wrote:
> 
> Also,
> notice that platform_get_irq() no longer returns 0 on error.

There is no change by your patch in this regard, right?


Takashi

> Print error message and propagate the return value of platform_get_irq
> on failure.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
> Changes in v2:
>  Fix error in commit message.
> 
>  sound/x86/intel_hdmi_audio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
> index c19efc9..a095150 100644
> --- a/sound/x86/intel_hdmi_audio.c
> +++ b/sound/x86/intel_hdmi_audio.c
> @@ -1758,8 +1758,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
>  	/* get resources */
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
> -		dev_err(&pdev->dev, "Could not get irq resource\n");
> -		return -ENODEV;
> +		dev_err(&pdev->dev, "Could not get irq resource: %d\n", irq);
> +		return irq;
>  	}
>  
>  	res_mmio = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -- 
> 2.5.0
> 
> 

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

* Re: [PATCH v2] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
@ 2017-06-30 20:27         ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2017-06-30 20:27 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

On Fri, 30 Jun 2017 22:18:41 +0200,
Gustavo A. R. Silva wrote:
> 
> Also,
> notice that platform_get_irq() no longer returns 0 on error.

There is no change by your patch in this regard, right?


Takashi

> Print error message and propagate the return value of platform_get_irq
> on failure.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
> Changes in v2:
>  Fix error in commit message.
> 
>  sound/x86/intel_hdmi_audio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
> index c19efc9..a095150 100644
> --- a/sound/x86/intel_hdmi_audio.c
> +++ b/sound/x86/intel_hdmi_audio.c
> @@ -1758,8 +1758,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
>  	/* get resources */
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
> -		dev_err(&pdev->dev, "Could not get irq resource\n");
> -		return -ENODEV;
> +		dev_err(&pdev->dev, "Could not get irq resource: %d\n", irq);
> +		return irq;
>  	}
>  
>  	res_mmio = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -- 
> 2.5.0
> 
> 

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

* Re: [PATCH v2] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
  2017-06-30 20:27         ` Takashi Iwai
  (?)
@ 2017-06-30 20:31         ` Gustavo A. R. Silva
  2017-06-30 20:39             ` Takashi Iwai
  -1 siblings, 1 reply; 12+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-30 20:31 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

Hi Takashi,

Quoting Takashi Iwai <tiwai@suse.de>:

> On Fri, 30 Jun 2017 22:18:41 +0200,
> Gustavo A. R. Silva wrote:
>>
>> Also,
>> notice that platform_get_irq() no longer returns 0 on error.
>
> There is no change by your patch in this regard, right?
>

You are correct. I just pointing it out. This is the commit that  
changed the platform_get_irq code:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af

>
> Takashi
>
>> Print error message and propagate the return value of platform_get_irq
>> on failure.
>>
>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>> ---
>> Changes in v2:
>>  Fix error in commit message.
>>
>>  sound/x86/intel_hdmi_audio.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
>> index c19efc9..a095150 100644
>> --- a/sound/x86/intel_hdmi_audio.c
>> +++ b/sound/x86/intel_hdmi_audio.c
>> @@ -1758,8 +1758,8 @@ static int hdmi_lpe_audio_probe(struct  
>> platform_device *pdev)
>>  	/* get resources */
>>  	irq = platform_get_irq(pdev, 0);
>>  	if (irq < 0) {
>> -		dev_err(&pdev->dev, "Could not get irq resource\n");
>> -		return -ENODEV;
>> +		dev_err(&pdev->dev, "Could not get irq resource: %d\n", irq);
>> +		return irq;
>>  	}
>>
>>  	res_mmio = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> --
>> 2.5.0
>>
>>

Thanks
--
Gustavo A. R. Silva

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

* Re: [PATCH v2] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
  2017-06-30 20:31         ` Gustavo A. R. Silva
@ 2017-06-30 20:39             ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2017-06-30 20:39 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

On Fri, 30 Jun 2017 22:31:32 +0200,
Gustavo A. R. Silva wrote:
> 
> Hi Takashi,
> 
> Quoting Takashi Iwai <tiwai@suse.de>:
> 
> > On Fri, 30 Jun 2017 22:18:41 +0200,
> > Gustavo A. R. Silva wrote:
> >>
> >> Also,
> >> notice that platform_get_irq() no longer returns 0 on error.
> >
> > There is no change by your patch in this regard, right?
> >
> 
> You are correct. I just pointing it out. This is the commit that
> changed the platform_get_irq code:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af

OK, applied now to for-next branch.
Thanks.


Takashi

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

* Re: [PATCH v2] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
@ 2017-06-30 20:39             ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2017-06-30 20:39 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: alsa-devel, linux-kernel

On Fri, 30 Jun 2017 22:31:32 +0200,
Gustavo A. R. Silva wrote:
> 
> Hi Takashi,
> 
> Quoting Takashi Iwai <tiwai@suse.de>:
> 
> > On Fri, 30 Jun 2017 22:18:41 +0200,
> > Gustavo A. R. Silva wrote:
> >>
> >> Also,
> >> notice that platform_get_irq() no longer returns 0 on error.
> >
> > There is no change by your patch in this regard, right?
> >
> 
> You are correct. I just pointing it out. This is the commit that
> changed the platform_get_irq code:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af

OK, applied now to for-next branch.
Thanks.


Takashi

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

* Re: [PATCH v2] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
  2017-06-30 20:39             ` Takashi Iwai
@ 2017-06-30 20:41               ` Gustavo A. R. Silva
  -1 siblings, 0 replies; 12+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-30 20:41 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel


Quoting Takashi Iwai <tiwai@suse.de>:

> On Fri, 30 Jun 2017 22:31:32 +0200,
> Gustavo A. R. Silva wrote:
>>
>> Hi Takashi,
>>
>> Quoting Takashi Iwai <tiwai@suse.de>:
>>
>> > On Fri, 30 Jun 2017 22:18:41 +0200,
>> > Gustavo A. R. Silva wrote:
>> >>
>> >> Also,
>> >> notice that platform_get_irq() no longer returns 0 on error.
>> >
>> > There is no change by your patch in this regard, right?
>> >
>>
>> You are correct. I just pointing it out. This is the commit that
>> changed the platform_get_irq code:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af
>
> OK, applied now to for-next branch.
> Thanks.
>

Great :)

Thank you
--
Gustavo A. R. Silva

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

* Re: [PATCH v2] ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
@ 2017-06-30 20:41               ` Gustavo A. R. Silva
  0 siblings, 0 replies; 12+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-30 20:41 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, linux-kernel


Quoting Takashi Iwai <tiwai@suse.de>:

> On Fri, 30 Jun 2017 22:31:32 +0200,
> Gustavo A. R. Silva wrote:
>>
>> Hi Takashi,
>>
>> Quoting Takashi Iwai <tiwai@suse.de>:
>>
>> > On Fri, 30 Jun 2017 22:18:41 +0200,
>> > Gustavo A. R. Silva wrote:
>> >>
>> >> Also,
>> >> notice that platform_get_irq() no longer returns 0 on error.
>> >
>> > There is no change by your patch in this regard, right?
>> >
>>
>> You are correct. I just pointing it out. This is the commit that
>> changed the platform_get_irq code:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af
>
> OK, applied now to for-next branch.
> Thanks.
>

Great :)

Thank you
--
Gustavo A. R. Silva

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

end of thread, other threads:[~2017-06-30 20:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30 19:59 [PATCH] ALSA: x86: fix error return code in hdmi_lpe_audio_probe() Gustavo A. R. Silva
2017-06-30 20:07 ` Takashi Iwai
2017-06-30 20:07   ` Takashi Iwai
2017-06-30 20:12   ` Gustavo A. R. Silva
2017-06-30 20:18     ` [PATCH v2] " Gustavo A. R. Silva
2017-06-30 20:27       ` Takashi Iwai
2017-06-30 20:27         ` Takashi Iwai
2017-06-30 20:31         ` Gustavo A. R. Silva
2017-06-30 20:39           ` Takashi Iwai
2017-06-30 20:39             ` Takashi Iwai
2017-06-30 20:41             ` Gustavo A. R. Silva
2017-06-30 20:41               ` Gustavo A. R. Silva

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.