diff mbox series

[02/17] media: davinci/vpif.c: drop unnecessary cast

Message ID 20230126150657.367921-3-hverkuil-cisco@xs4all.nl (mailing list archive)
State New, archived
Headers show
Series media: sparse/smatch fixes | expand

Commit Message

Hans Verkuil Jan. 26, 2023, 3:06 p.m. UTC
DEFINE_RES_IRQ_NAMED already casts to (struct resource), so no
need to do it again.

This fixes a sparse warning:

vpif.c:483:20: warning: cast to non-scalar

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
---
 drivers/media/platform/ti/davinci/vpif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lad, Prabhakar Jan. 30, 2023, 11:33 p.m. UTC | #1
Hi Hans,

Thank you for the patch.

On Thu, Jan 26, 2023 at 3:07 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> DEFINE_RES_IRQ_NAMED already casts to (struct resource), so no
> need to do it again.
>
> This fixes a sparse warning:
>
> vpif.c:483:20: warning: cast to non-scalar
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> ---
>  drivers/media/platform/ti/davinci/vpif.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
Prabhakar

> diff --git a/drivers/media/platform/ti/davinci/vpif.c b/drivers/media/platform/ti/davinci/vpif.c
> index da27da4c165a..832489822706 100644
> --- a/drivers/media/platform/ti/davinci/vpif.c
> +++ b/drivers/media/platform/ti/davinci/vpif.c
> @@ -480,7 +480,7 @@ static int vpif_probe(struct platform_device *pdev)
>                 ret = irq;
>                 goto err_put_rpm;
>         }
> -       res_irq = (struct resource)DEFINE_RES_IRQ_NAMED(irq, of_node_full_name(pdev->dev.of_node));
> +       res_irq = DEFINE_RES_IRQ_NAMED(irq, of_node_full_name(pdev->dev.of_node));
>         res_irq.flags |= irq_get_trigger_type(irq);
>
>         pdev_capture = kzalloc(sizeof(*pdev_capture), GFP_KERNEL);
> --
> 2.39.0
>
diff mbox series

Patch

diff --git a/drivers/media/platform/ti/davinci/vpif.c b/drivers/media/platform/ti/davinci/vpif.c
index da27da4c165a..832489822706 100644
--- a/drivers/media/platform/ti/davinci/vpif.c
+++ b/drivers/media/platform/ti/davinci/vpif.c
@@ -480,7 +480,7 @@  static int vpif_probe(struct platform_device *pdev)
 		ret = irq;
 		goto err_put_rpm;
 	}
-	res_irq = (struct resource)DEFINE_RES_IRQ_NAMED(irq, of_node_full_name(pdev->dev.of_node));
+	res_irq = DEFINE_RES_IRQ_NAMED(irq, of_node_full_name(pdev->dev.of_node));
 	res_irq.flags |= irq_get_trigger_type(irq);
 
 	pdev_capture = kzalloc(sizeof(*pdev_capture), GFP_KERNEL);