diff mbox series

media: platform: renesas-ceu: Fix unused variable warning

Message ID 20220317204903.28163-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit d63fb98afed38a8a097a4737d387f3e029ce2d20
Headers show
Series media: platform: renesas-ceu: Fix unused variable warning | expand

Commit Message

Laurent Pinchart March 17, 2022, 8:49 p.m. UTC
The ceu_data_rz variable is unused when CONFIG_OF isn't set. This
generates a compiler warning. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/platform/renesas/renesas-ceu.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


base-commit: 10ed1ec9c9cab63310038579c2e1303324bfa44a

Comments

Jacopo Mondi March 18, 2022, 7:59 a.m. UTC | #1
Hi Laurent

On Thu, Mar 17, 2022 at 10:49:03PM +0200, Laurent Pinchart wrote:
> The ceu_data_rz variable is unused when CONFIG_OF isn't set. This
> generates a compiler warning. Fix it.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Thanks!
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>


> ---
>  drivers/media/platform/renesas/renesas-ceu.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/renesas/renesas-ceu.c b/drivers/media/platform/renesas/renesas-ceu.c
> index 2e8dbacc414e..f70f91b006b7 100644
> --- a/drivers/media/platform/renesas/renesas-ceu.c
> +++ b/drivers/media/platform/renesas/renesas-ceu.c
> @@ -1606,15 +1606,15 @@ struct ceu_data {
>  	u32 irq_mask;
>  };
>
> -static const struct ceu_data ceu_data_rz = {
> -	.irq_mask = CEU_CETCR_ALL_IRQS_RZ,
> -};
> -
>  static const struct ceu_data ceu_data_sh4 = {
>  	.irq_mask = CEU_CETCR_ALL_IRQS_SH4,
>  };
>
>  #if IS_ENABLED(CONFIG_OF)
> +static const struct ceu_data ceu_data_rz = {
> +	.irq_mask = CEU_CETCR_ALL_IRQS_RZ,
> +};
> +
>  static const struct of_device_id ceu_of_match[] = {
>  	{ .compatible = "renesas,r7s72100-ceu", .data = &ceu_data_rz },
>  	{ .compatible = "renesas,r8a7740-ceu", .data = &ceu_data_rz },
>
> base-commit: 10ed1ec9c9cab63310038579c2e1303324bfa44a
> --
> Regards,
>
> Laurent Pinchart
>
Geert Uytterhoeven March 18, 2022, 8:05 a.m. UTC | #2
On Thu, Mar 17, 2022 at 10:17 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> The ceu_data_rz variable is unused when CONFIG_OF isn't set. This
> generates a compiler warning. Fix it.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Kieran Bingham March 18, 2022, 10:04 a.m. UTC | #3
Quoting Laurent Pinchart (2022-03-17 20:49:03)
> The ceu_data_rz variable is unused when CONFIG_OF isn't set. This
> generates a compiler warning. Fix it.
> 

Reported-by: kernel test robot <lkp@intel.com> ?

but either way: 

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/media/platform/renesas/renesas-ceu.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/renesas-ceu.c b/drivers/media/platform/renesas/renesas-ceu.c
> index 2e8dbacc414e..f70f91b006b7 100644
> --- a/drivers/media/platform/renesas/renesas-ceu.c
> +++ b/drivers/media/platform/renesas/renesas-ceu.c
> @@ -1606,15 +1606,15 @@ struct ceu_data {
>         u32 irq_mask;
>  };
>  
> -static const struct ceu_data ceu_data_rz = {
> -       .irq_mask = CEU_CETCR_ALL_IRQS_RZ,
> -};
> -
>  static const struct ceu_data ceu_data_sh4 = {
>         .irq_mask = CEU_CETCR_ALL_IRQS_SH4,
>  };
>  
>  #if IS_ENABLED(CONFIG_OF)
> +static const struct ceu_data ceu_data_rz = {
> +       .irq_mask = CEU_CETCR_ALL_IRQS_RZ,
> +};
> +
>  static const struct of_device_id ceu_of_match[] = {
>         { .compatible = "renesas,r7s72100-ceu", .data = &ceu_data_rz },
>         { .compatible = "renesas,r8a7740-ceu", .data = &ceu_data_rz },
> 
> base-commit: 10ed1ec9c9cab63310038579c2e1303324bfa44a
> -- 
> Regards,
> 
> Laurent Pinchart
>
Laurent Pinchart March 18, 2022, 10:07 a.m. UTC | #4
On Fri, Mar 18, 2022 at 10:04:33AM +0000, Kieran Bingham wrote:
> Quoting Laurent Pinchart (2022-03-17 20:49:03)
> > The ceu_data_rz variable is unused when CONFIG_OF isn't set. This
> > generates a compiler warning. Fix it.
> 
> Reported-by: kernel test robot <lkp@intel.com> ?

Good point, I forgot that. Thanks.

> but either way: 
> 
> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >  drivers/media/platform/renesas/renesas-ceu.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/media/platform/renesas/renesas-ceu.c b/drivers/media/platform/renesas/renesas-ceu.c
> > index 2e8dbacc414e..f70f91b006b7 100644
> > --- a/drivers/media/platform/renesas/renesas-ceu.c
> > +++ b/drivers/media/platform/renesas/renesas-ceu.c
> > @@ -1606,15 +1606,15 @@ struct ceu_data {
> >         u32 irq_mask;
> >  };
> >  
> > -static const struct ceu_data ceu_data_rz = {
> > -       .irq_mask = CEU_CETCR_ALL_IRQS_RZ,
> > -};
> > -
> >  static const struct ceu_data ceu_data_sh4 = {
> >         .irq_mask = CEU_CETCR_ALL_IRQS_SH4,
> >  };
> >  
> >  #if IS_ENABLED(CONFIG_OF)
> > +static const struct ceu_data ceu_data_rz = {
> > +       .irq_mask = CEU_CETCR_ALL_IRQS_RZ,
> > +};
> > +
> >  static const struct of_device_id ceu_of_match[] = {
> >         { .compatible = "renesas,r7s72100-ceu", .data = &ceu_data_rz },
> >         { .compatible = "renesas,r8a7740-ceu", .data = &ceu_data_rz },
> > 
> > base-commit: 10ed1ec9c9cab63310038579c2e1303324bfa44a
diff mbox series

Patch

diff --git a/drivers/media/platform/renesas/renesas-ceu.c b/drivers/media/platform/renesas/renesas-ceu.c
index 2e8dbacc414e..f70f91b006b7 100644
--- a/drivers/media/platform/renesas/renesas-ceu.c
+++ b/drivers/media/platform/renesas/renesas-ceu.c
@@ -1606,15 +1606,15 @@  struct ceu_data {
 	u32 irq_mask;
 };
 
-static const struct ceu_data ceu_data_rz = {
-	.irq_mask = CEU_CETCR_ALL_IRQS_RZ,
-};
-
 static const struct ceu_data ceu_data_sh4 = {
 	.irq_mask = CEU_CETCR_ALL_IRQS_SH4,
 };
 
 #if IS_ENABLED(CONFIG_OF)
+static const struct ceu_data ceu_data_rz = {
+	.irq_mask = CEU_CETCR_ALL_IRQS_RZ,
+};
+
 static const struct of_device_id ceu_of_match[] = {
 	{ .compatible = "renesas,r7s72100-ceu", .data = &ceu_data_rz },
 	{ .compatible = "renesas,r8a7740-ceu", .data = &ceu_data_rz },