* [PATCH] media: staging: rkisp1: avoid unused variable warning
@ 2020-04-08 15:52 Arnd Bergmann
2020-04-08 16:08 ` Laurent Pinchart
2020-04-08 17:56 ` Ezequiel Garcia
0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2020-04-08 15:52 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Helen Koike
Cc: Arnd Bergmann, Jacob Chen, Shunqian Zheng, Yichong Zhong,
Jacob Chen, Eddie Cai, Jeffy Chen, Allon Huang, Tomasz Figa,
Laurent Pinchart, Ezequiel Garcia, Hans Verkuil,
Mauro Carvalho Chehab, Greg Kroah-Hartman, Heiko Stuebner,
Dafna Hirschfeld, linux-media, devel, linux-arm-kernel,
linux-rockchip, linux-kernel
When compile-testing with CONFIG_OF disabled, we get a warning
about an unused variable, and about inconsistent Kconfig dependencies:
WARNING: unmet direct dependencies detected for PHY_ROCKCHIP_DPHY_RX0
Depends on [n]: STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=m] && (ARCH_ROCKCHIP [=n] || COMPILE_TEST [=y]) && OF [=n]
Selected by [m]:
- VIDEO_ROCKCHIP_ISP1 [=m] && STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=m] && VIDEO_V4L2 [=m] && VIDEO_V4L2_SUBDEV_API [=y] && (ARCH_ROCKCHIP [=n] || COMPILE_TEST [=y])
drivers/staging/media/rkisp1/rkisp1-dev.c: In function 'rkisp1_probe':
drivers/staging/media/rkisp1/rkisp1-dev.c:457:22: error: unused variable 'node' [-Werror=unused-variable]
457 | struct device_node *node = pdev->dev.of_node;
Simply open-coding the pointer dereference in the only place
the variable is used avoids the warning in all configurations,
so we can allow compile-testing as well.
Fixes: d65dd85281fb ("media: staging: rkisp1: add Rockchip ISP1 base driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/media/phy-rockchip-dphy-rx0/Kconfig | 2 +-
drivers/staging/media/rkisp1/rkisp1-dev.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/media/phy-rockchip-dphy-rx0/Kconfig b/drivers/staging/media/phy-rockchip-dphy-rx0/Kconfig
index bd0147624de1..dd5d4d741bdd 100644
--- a/drivers/staging/media/phy-rockchip-dphy-rx0/Kconfig
+++ b/drivers/staging/media/phy-rockchip-dphy-rx0/Kconfig
@@ -2,7 +2,7 @@
config PHY_ROCKCHIP_DPHY_RX0
tristate "Rockchip MIPI Synopsys DPHY RX0 driver"
- depends on (ARCH_ROCKCHIP || COMPILE_TEST) && OF
+ depends on (ARCH_ROCKCHIP && OF) || COMPILE_TEST
select GENERIC_PHY_MIPI_DPHY
select GENERIC_PHY
help
diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c b/drivers/staging/media/rkisp1/rkisp1-dev.c
index b1b3c058e957..5e7e797aad71 100644
--- a/drivers/staging/media/rkisp1/rkisp1-dev.c
+++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
@@ -454,7 +454,6 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1)
static int rkisp1_probe(struct platform_device *pdev)
{
- struct device_node *node = pdev->dev.of_node;
const struct rkisp1_match_data *clk_data;
const struct of_device_id *match;
struct device *dev = &pdev->dev;
@@ -463,7 +462,7 @@ static int rkisp1_probe(struct platform_device *pdev)
unsigned int i;
int ret, irq;
- match = of_match_node(rkisp1_of_match, node);
+ match = of_match_node(rkisp1_of_match, pdev->dev.of_node);
rkisp1 = devm_kzalloc(dev, sizeof(*rkisp1), GFP_KERNEL);
if (!rkisp1)
return -ENOMEM;
--
2.26.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] media: staging: rkisp1: avoid unused variable warning
2020-04-08 15:52 [PATCH] media: staging: rkisp1: avoid unused variable warning Arnd Bergmann
@ 2020-04-08 16:08 ` Laurent Pinchart
2020-04-08 17:56 ` Ezequiel Garcia
1 sibling, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2020-04-08 16:08 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mauro Carvalho Chehab, Helen Koike, Jacob Chen, Shunqian Zheng,
Yichong Zhong, Jacob Chen, Eddie Cai, Jeffy Chen, Allon Huang,
Tomasz Figa, Ezequiel Garcia, Hans Verkuil,
Mauro Carvalho Chehab, Greg Kroah-Hartman, Heiko Stuebner,
Dafna Hirschfeld, linux-media, devel, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Arnd,
Thank you for the patch.
On Wed, Apr 08, 2020 at 05:52:44PM +0200, Arnd Bergmann wrote:
> When compile-testing with CONFIG_OF disabled, we get a warning
> about an unused variable, and about inconsistent Kconfig dependencies:
>
> WARNING: unmet direct dependencies detected for PHY_ROCKCHIP_DPHY_RX0
> Depends on [n]: STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=m] && (ARCH_ROCKCHIP [=n] || COMPILE_TEST [=y]) && OF [=n]
> Selected by [m]:
> - VIDEO_ROCKCHIP_ISP1 [=m] && STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=m] && VIDEO_V4L2 [=m] && VIDEO_V4L2_SUBDEV_API [=y] && (ARCH_ROCKCHIP [=n] || COMPILE_TEST [=y])
>
> drivers/staging/media/rkisp1/rkisp1-dev.c: In function 'rkisp1_probe':
> drivers/staging/media/rkisp1/rkisp1-dev.c:457:22: error: unused variable 'node' [-Werror=unused-variable]
> 457 | struct device_node *node = pdev->dev.of_node;
>
> Simply open-coding the pointer dereference in the only place
> the variable is used avoids the warning in all configurations,
> so we can allow compile-testing as well.
>
> Fixes: d65dd85281fb ("media: staging: rkisp1: add Rockchip ISP1 base driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/staging/media/phy-rockchip-dphy-rx0/Kconfig | 2 +-
> drivers/staging/media/rkisp1/rkisp1-dev.c | 3 +--
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/media/phy-rockchip-dphy-rx0/Kconfig b/drivers/staging/media/phy-rockchip-dphy-rx0/Kconfig
> index bd0147624de1..dd5d4d741bdd 100644
> --- a/drivers/staging/media/phy-rockchip-dphy-rx0/Kconfig
> +++ b/drivers/staging/media/phy-rockchip-dphy-rx0/Kconfig
> @@ -2,7 +2,7 @@
>
> config PHY_ROCKCHIP_DPHY_RX0
> tristate "Rockchip MIPI Synopsys DPHY RX0 driver"
> - depends on (ARCH_ROCKCHIP || COMPILE_TEST) && OF
> + depends on (ARCH_ROCKCHIP && OF) || COMPILE_TEST
> select GENERIC_PHY_MIPI_DPHY
> select GENERIC_PHY
> help
> diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c b/drivers/staging/media/rkisp1/rkisp1-dev.c
> index b1b3c058e957..5e7e797aad71 100644
> --- a/drivers/staging/media/rkisp1/rkisp1-dev.c
> +++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
> @@ -454,7 +454,6 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1)
>
> static int rkisp1_probe(struct platform_device *pdev)
> {
> - struct device_node *node = pdev->dev.of_node;
> const struct rkisp1_match_data *clk_data;
> const struct of_device_id *match;
> struct device *dev = &pdev->dev;
> @@ -463,7 +462,7 @@ static int rkisp1_probe(struct platform_device *pdev)
> unsigned int i;
> int ret, irq;
>
> - match = of_match_node(rkisp1_of_match, node);
> + match = of_match_node(rkisp1_of_match, pdev->dev.of_node);
> rkisp1 = devm_kzalloc(dev, sizeof(*rkisp1), GFP_KERNEL);
> if (!rkisp1)
> return -ENOMEM;
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: staging: rkisp1: avoid unused variable warning
2020-04-08 15:52 [PATCH] media: staging: rkisp1: avoid unused variable warning Arnd Bergmann
2020-04-08 16:08 ` Laurent Pinchart
@ 2020-04-08 17:56 ` Ezequiel Garcia
2020-04-08 19:08 ` Arnd Bergmann
1 sibling, 1 reply; 5+ messages in thread
From: Ezequiel Garcia @ 2020-04-08 17:56 UTC (permalink / raw)
To: Arnd Bergmann, Mauro Carvalho Chehab, Helen Koike, Laurent Pinchart
Cc: Jacob Chen, Shunqian Zheng, Yichong Zhong, Jacob Chen, Eddie Cai,
Jeffy Chen, Allon Huang, Tomasz Figa, Laurent Pinchart,
Hans Verkuil, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Heiko Stuebner, Dafna Hirschfeld, linux-media, devel,
linux-arm-kernel, linux-rockchip, linux-kernel
On Wed, 2020-04-08 at 17:52 +0200, Arnd Bergmann wrote:
> When compile-testing with CONFIG_OF disabled, we get a warning
> about an unused variable, and about inconsistent Kconfig dependencies:
>
> WARNING: unmet direct dependencies detected for PHY_ROCKCHIP_DPHY_RX0
> Depends on [n]: STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=m] && (ARCH_ROCKCHIP [=n] || COMPILE_TEST [=y]) && OF [=n]
> Selected by [m]:
> - VIDEO_ROCKCHIP_ISP1 [=m] && STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=m] && VIDEO_V4L2 [=m] && VIDEO_V4L2_SUBDEV_API [=y] &&
> (ARCH_ROCKCHIP [=n] || COMPILE_TEST [=y])
>
> drivers/staging/media/rkisp1/rkisp1-dev.c: In function 'rkisp1_probe':
> drivers/staging/media/rkisp1/rkisp1-dev.c:457:22: error: unused variable 'node' [-Werror=unused-variable]
> 457 | struct device_node *node = pdev->dev.of_node;
>
> Simply open-coding the pointer dereference in the only place
> the variable is used avoids the warning in all configurations,
> so we can allow compile-testing as well.
>
Hello Arnd,
Thanks for your patch.
I believe this is already fixed here:
https://patchwork.linuxtv.org/patch/62774/
https://patchwork.linuxtv.org/patch/62775/
Cheers,
Ezequiel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: staging: rkisp1: avoid unused variable warning
2020-04-08 17:56 ` Ezequiel Garcia
@ 2020-04-08 19:08 ` Arnd Bergmann
2020-04-08 19:38 ` Ezequiel Garcia
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2020-04-08 19:08 UTC (permalink / raw)
To: Ezequiel Garcia
Cc: Mauro Carvalho Chehab, Helen Koike, Laurent Pinchart, Jacob Chen,
Shunqian Zheng, Yichong Zhong, Jacob Chen, Eddie Cai, Jeffy Chen,
Allon Huang, Tomasz Figa, Hans Verkuil, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Heiko Stuebner, Dafna Hirschfeld,
Linux Media Mailing List, driverdevel, Linux ARM,
open list:ARM/Rockchip SoC support, linux-kernel
On Wed, Apr 8, 2020 at 7:56 PM Ezequiel Garcia <ezequiel@collabora.com> wrote:
>
> On Wed, 2020-04-08 at 17:52 +0200, Arnd Bergmann wrote:
> > When compile-testing with CONFIG_OF disabled, we get a warning
> > about an unused variable, and about inconsistent Kconfig dependencies:
> >
> > WARNING: unmet direct dependencies detected for PHY_ROCKCHIP_DPHY_RX0
> > Depends on [n]: STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=m] && (ARCH_ROCKCHIP [=n] || COMPILE_TEST [=y]) && OF [=n]
> > Selected by [m]:
> > - VIDEO_ROCKCHIP_ISP1 [=m] && STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=m] && VIDEO_V4L2 [=m] && VIDEO_V4L2_SUBDEV_API [=y] &&
> > (ARCH_ROCKCHIP [=n] || COMPILE_TEST [=y])
> >
> > drivers/staging/media/rkisp1/rkisp1-dev.c: In function 'rkisp1_probe':
> > drivers/staging/media/rkisp1/rkisp1-dev.c:457:22: error: unused variable 'node' [-Werror=unused-variable]
> > 457 | struct device_node *node = pdev->dev.of_node;
> >
> > Simply open-coding the pointer dereference in the only place
> > the variable is used avoids the warning in all configurations,
> > so we can allow compile-testing as well.
> >
>
> Hello Arnd,
>
> Thanks for your patch.
>
> I believe this is already fixed here:
>
> https://patchwork.linuxtv.org/patch/62774/
> https://patchwork.linuxtv.org/patch/62775/
Ok, sorry for the duplicate. I only tested on mainline from a few days ago,
so I must have missed it getting merged in the meantime.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] media: staging: rkisp1: avoid unused variable warning
2020-04-08 19:08 ` Arnd Bergmann
@ 2020-04-08 19:38 ` Ezequiel Garcia
0 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2020-04-08 19:38 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mauro Carvalho Chehab, Helen Koike, Laurent Pinchart, Jacob Chen,
Shunqian Zheng, Yichong Zhong, Jacob Chen, Eddie Cai, Jeffy Chen,
Allon Huang, Tomasz Figa, Hans Verkuil, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Heiko Stuebner, Dafna Hirschfeld,
Linux Media Mailing List, driverdevel, Linux ARM,
open list:ARM/Rockchip SoC support, linux-kernel
On Wed, 2020-04-08 at 21:08 +0200, Arnd Bergmann wrote:
> On Wed, Apr 8, 2020 at 7:56 PM Ezequiel Garcia <ezequiel@collabora.com> wrote:
> > On Wed, 2020-04-08 at 17:52 +0200, Arnd Bergmann wrote:
> > > When compile-testing with CONFIG_OF disabled, we get a warning
> > > about an unused variable, and about inconsistent Kconfig dependencies:
> > >
> > > WARNING: unmet direct dependencies detected for PHY_ROCKCHIP_DPHY_RX0
> > > Depends on [n]: STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=m] && (ARCH_ROCKCHIP [=n] || COMPILE_TEST [=y]) && OF [=n]
> > > Selected by [m]:
> > > - VIDEO_ROCKCHIP_ISP1 [=m] && STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=m] && VIDEO_V4L2 [=m] && VIDEO_V4L2_SUBDEV_API [=y] &&
> > > (ARCH_ROCKCHIP [=n] || COMPILE_TEST [=y])
> > >
> > > drivers/staging/media/rkisp1/rkisp1-dev.c: In function 'rkisp1_probe':
> > > drivers/staging/media/rkisp1/rkisp1-dev.c:457:22: error: unused variable 'node' [-Werror=unused-variable]
> > > 457 | struct device_node *node = pdev->dev.of_node;
> > >
> > > Simply open-coding the pointer dereference in the only place
> > > the variable is used avoids the warning in all configurations,
> > > so we can allow compile-testing as well.
> > >
> >
> > Hello Arnd,
> >
> > Thanks for your patch.
> >
> > I believe this is already fixed here:
> >
> > https://patchwork.linuxtv.org/patch/62774/
> > https://patchwork.linuxtv.org/patch/62775/
>
> Ok, sorry for the duplicate. I only tested on mainline from a few days ago,
> so I must have missed it getting merged in the meantime.
>
No worries!
Those were was sent very recently, and won't be
merged any time soon :-)
Ezequiel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-08 19:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 15:52 [PATCH] media: staging: rkisp1: avoid unused variable warning Arnd Bergmann
2020-04-08 16:08 ` Laurent Pinchart
2020-04-08 17:56 ` Ezequiel Garcia
2020-04-08 19:08 ` Arnd Bergmann
2020-04-08 19:38 ` Ezequiel Garcia
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).