linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 0/2] media: platform: Do not check for 0 return after calling platform_get_irq()
@ 2023-08-03  2:46 Ruan Jinjie
  2023-08-03  2:46 ` [PATCH -next 1/2] media: camif-core: " Ruan Jinjie
  2023-08-03  2:46 ` [PATCH -next 2/2] media: verisilicon: " Ruan Jinjie
  0 siblings, 2 replies; 7+ messages in thread
From: Ruan Jinjie @ 2023-08-03  2:46 UTC (permalink / raw)
  To: sylvester.nawrocki, mchehab, ezequiel, p.zabel, linux-media,
	linux-samsung-soc, linux-rockchip
  Cc: ruanjinjie

There is no possible for platform_get_irq() and platform_get_irq_byname() 
to return 0,

And the return value of platform_get_irq() or platform_get_irq_byname() 
is more sensible to show the error reason.

Ruan Jinjie (2):
  media: camif-core: Do not check for 0 return after calling
    platform_get_irq()
  media: verisilicon: Do not check for 0 return after calling
    platform_get_irq()

 drivers/media/platform/samsung/s3c-camif/camif-core.c | 4 ++--
 drivers/media/platform/verisilicon/hantro_drv.c       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.34.1


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

* [PATCH -next 1/2] media: camif-core: Do not check for 0 return after calling platform_get_irq()
  2023-08-03  2:46 [PATCH -next 0/2] media: platform: Do not check for 0 return after calling platform_get_irq() Ruan Jinjie
@ 2023-08-03  2:46 ` Ruan Jinjie
  2023-08-03  6:39   ` Andrzej Pietrasiewicz
  2023-08-05 21:40   ` Andi Shyti
  2023-08-03  2:46 ` [PATCH -next 2/2] media: verisilicon: " Ruan Jinjie
  1 sibling, 2 replies; 7+ messages in thread
From: Ruan Jinjie @ 2023-08-03  2:46 UTC (permalink / raw)
  To: sylvester.nawrocki, mchehab, ezequiel, p.zabel, linux-media,
	linux-samsung-soc, linux-rockchip
  Cc: ruanjinjie

It is not possible for platform_get_irq() to return 0. Use the
return value from platform_get_irq().

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 drivers/media/platform/samsung/s3c-camif/camif-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/samsung/s3c-camif/camif-core.c b/drivers/media/platform/samsung/s3c-camif/camif-core.c
index afe1fcc37354..e4529f666e20 100644
--- a/drivers/media/platform/samsung/s3c-camif/camif-core.c
+++ b/drivers/media/platform/samsung/s3c-camif/camif-core.c
@@ -381,8 +381,8 @@ static int camif_request_irqs(struct platform_device *pdev,
 		init_waitqueue_head(&vp->irq_queue);
 
 		irq = platform_get_irq(pdev, i);
-		if (irq <= 0)
-			return -ENXIO;
+		if (irq < 0)
+			return irq;
 
 		ret = devm_request_irq(&pdev->dev, irq, s3c_camif_irq_handler,
 				       0, dev_name(&pdev->dev), vp);
-- 
2.34.1


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

* [PATCH -next 2/2] media: verisilicon: Do not check for 0 return after calling platform_get_irq()
  2023-08-03  2:46 [PATCH -next 0/2] media: platform: Do not check for 0 return after calling platform_get_irq() Ruan Jinjie
  2023-08-03  2:46 ` [PATCH -next 1/2] media: camif-core: " Ruan Jinjie
@ 2023-08-03  2:46 ` Ruan Jinjie
  2023-08-03  6:38   ` Andrzej Pietrasiewicz
  2023-08-05 21:42   ` Andi Shyti
  1 sibling, 2 replies; 7+ messages in thread
From: Ruan Jinjie @ 2023-08-03  2:46 UTC (permalink / raw)
  To: sylvester.nawrocki, mchehab, ezequiel, p.zabel, linux-media,
	linux-samsung-soc, linux-rockchip
  Cc: ruanjinjie

It is not possible for platform_get_irq() or platform_get_irq_byname()
to return 0. Use the return value from platform_get_irq()
or platform_get_irq_byname().

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 drivers/media/platform/verisilicon/hantro_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
index 35ca71b19def..423fc85d79ee 100644
--- a/drivers/media/platform/verisilicon/hantro_drv.c
+++ b/drivers/media/platform/verisilicon/hantro_drv.c
@@ -1085,8 +1085,8 @@ static int hantro_probe(struct platform_device *pdev)
 			irq_name = "default";
 			irq = platform_get_irq(vpu->pdev, 0);
 		}
-		if (irq <= 0)
-			return -ENXIO;
+		if (irq < 0)
+			return irq;
 
 		ret = devm_request_irq(vpu->dev, irq,
 				       vpu->variant->irqs[i].handler, 0,
-- 
2.34.1


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

* Re: [PATCH -next 2/2] media: verisilicon: Do not check for 0 return after calling platform_get_irq()
  2023-08-03  2:46 ` [PATCH -next 2/2] media: verisilicon: " Ruan Jinjie
@ 2023-08-03  6:38   ` Andrzej Pietrasiewicz
  2023-08-05 21:42   ` Andi Shyti
  1 sibling, 0 replies; 7+ messages in thread
From: Andrzej Pietrasiewicz @ 2023-08-03  6:38 UTC (permalink / raw)
  To: Ruan Jinjie, sylvester.nawrocki, mchehab, ezequiel, p.zabel,
	linux-media, linux-samsung-soc, linux-rockchip

W dniu 3.08.2023 o 04:46, Ruan Jinjie pisze:
> It is not possible for platform_get_irq() or platform_get_irq_byname()
> to return 0. Use the return value from platform_get_irq()
> or platform_get_irq_byname().
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>

Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>

> ---
>   drivers/media/platform/verisilicon/hantro_drv.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/verisilicon/hantro_drv.c b/drivers/media/platform/verisilicon/hantro_drv.c
> index 35ca71b19def..423fc85d79ee 100644
> --- a/drivers/media/platform/verisilicon/hantro_drv.c
> +++ b/drivers/media/platform/verisilicon/hantro_drv.c
> @@ -1085,8 +1085,8 @@ static int hantro_probe(struct platform_device *pdev)
>   			irq_name = "default";
>   			irq = platform_get_irq(vpu->pdev, 0);
>   		}
> -		if (irq <= 0)
> -			return -ENXIO;
> +		if (irq < 0)
> +			return irq;
>   
>   		ret = devm_request_irq(vpu->dev, irq,
>   				       vpu->variant->irqs[i].handler, 0,


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

* Re: [PATCH -next 1/2] media: camif-core: Do not check for 0 return after calling platform_get_irq()
  2023-08-03  2:46 ` [PATCH -next 1/2] media: camif-core: " Ruan Jinjie
@ 2023-08-03  6:39   ` Andrzej Pietrasiewicz
  2023-08-05 21:40   ` Andi Shyti
  1 sibling, 0 replies; 7+ messages in thread
From: Andrzej Pietrasiewicz @ 2023-08-03  6:39 UTC (permalink / raw)
  To: Ruan Jinjie, sylvester.nawrocki, mchehab, ezequiel, p.zabel,
	linux-media, linux-samsung-soc, linux-rockchip

W dniu 3.08.2023 o 04:46, Ruan Jinjie pisze:
> It is not possible for platform_get_irq() to return 0. Use the
> return value from platform_get_irq().
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>

Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>

> ---
>   drivers/media/platform/samsung/s3c-camif/camif-core.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/samsung/s3c-camif/camif-core.c b/drivers/media/platform/samsung/s3c-camif/camif-core.c
> index afe1fcc37354..e4529f666e20 100644
> --- a/drivers/media/platform/samsung/s3c-camif/camif-core.c
> +++ b/drivers/media/platform/samsung/s3c-camif/camif-core.c
> @@ -381,8 +381,8 @@ static int camif_request_irqs(struct platform_device *pdev,
>   		init_waitqueue_head(&vp->irq_queue);
>   
>   		irq = platform_get_irq(pdev, i);
> -		if (irq <= 0)
> -			return -ENXIO;
> +		if (irq < 0)
> +			return irq;
>   
>   		ret = devm_request_irq(&pdev->dev, irq, s3c_camif_irq_handler,
>   				       0, dev_name(&pdev->dev), vp);


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

* Re: [PATCH -next 1/2] media: camif-core: Do not check for 0 return after calling platform_get_irq()
  2023-08-03  2:46 ` [PATCH -next 1/2] media: camif-core: " Ruan Jinjie
  2023-08-03  6:39   ` Andrzej Pietrasiewicz
@ 2023-08-05 21:40   ` Andi Shyti
  1 sibling, 0 replies; 7+ messages in thread
From: Andi Shyti @ 2023-08-05 21:40 UTC (permalink / raw)
  To: Ruan Jinjie
  Cc: sylvester.nawrocki, mchehab, ezequiel, p.zabel, linux-media,
	linux-samsung-soc, linux-rockchip

Hi Ruan,

On Thu, Aug 03, 2023 at 10:46:44AM +0800, Ruan Jinjie wrote:
> It is not possible for platform_get_irq() to return 0. Use the
> return value from platform_get_irq().
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>

Reviewed-by: Andi Shyti <andi.shyti@kernel.org> 

Thanks,
Andi

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

* Re: [PATCH -next 2/2] media: verisilicon: Do not check for 0 return after calling platform_get_irq()
  2023-08-03  2:46 ` [PATCH -next 2/2] media: verisilicon: " Ruan Jinjie
  2023-08-03  6:38   ` Andrzej Pietrasiewicz
@ 2023-08-05 21:42   ` Andi Shyti
  1 sibling, 0 replies; 7+ messages in thread
From: Andi Shyti @ 2023-08-05 21:42 UTC (permalink / raw)
  To: Ruan Jinjie
  Cc: sylvester.nawrocki, mchehab, ezequiel, p.zabel, linux-media,
	linux-samsung-soc, linux-rockchip

Hi Ruan,

On Thu, Aug 03, 2023 at 10:46:45AM +0800, Ruan Jinjie wrote:
> It is not possible for platform_get_irq() or platform_get_irq_byname()
> to return 0. Use the return value from platform_get_irq()
> or platform_get_irq_byname().
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>

Reviewed-by: Andi Shyti <andi.shyti@kernel.org> 

Andi

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

end of thread, other threads:[~2023-08-05 21:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-03  2:46 [PATCH -next 0/2] media: platform: Do not check for 0 return after calling platform_get_irq() Ruan Jinjie
2023-08-03  2:46 ` [PATCH -next 1/2] media: camif-core: " Ruan Jinjie
2023-08-03  6:39   ` Andrzej Pietrasiewicz
2023-08-05 21:40   ` Andi Shyti
2023-08-03  2:46 ` [PATCH -next 2/2] media: verisilicon: " Ruan Jinjie
2023-08-03  6:38   ` Andrzej Pietrasiewicz
2023-08-05 21:42   ` Andi Shyti

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).