All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
@ 2021-06-02  8:02 ` Souptick Joarder
  0 siblings, 0 replies; 12+ messages in thread
From: Souptick Joarder @ 2021-06-02  8:02 UTC (permalink / raw)
  To: hjc, heiko, airlied, daniel
  Cc: dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel,
	Souptick Joarder, kernel test robot

Kernel test robot throws below warning when CONFIG_OF
is not set.

>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
   static const struct of_device_id rockchip_dp_dt_ids[] = {

Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
index ade2327a10e2..9b79ebaeae97 100644
--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
@@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
 	.chip_type = RK3288_DP,
 };
 
+#ifdef CONFIG_OF
 static const struct of_device_id rockchip_dp_dt_ids[] = {
 	{.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
 	{.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
 	{}
 };
 MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
+#endif
 
 struct platform_driver rockchip_dp_driver = {
 	.probe = rockchip_dp_probe,
-- 
2.25.1


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

* [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
@ 2021-06-02  8:02 ` Souptick Joarder
  0 siblings, 0 replies; 12+ messages in thread
From: Souptick Joarder @ 2021-06-02  8:02 UTC (permalink / raw)
  To: hjc, heiko, airlied, daniel
  Cc: dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel,
	Souptick Joarder, kernel test robot

Kernel test robot throws below warning when CONFIG_OF
is not set.

>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
   static const struct of_device_id rockchip_dp_dt_ids[] = {

Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
index ade2327a10e2..9b79ebaeae97 100644
--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
@@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
 	.chip_type = RK3288_DP,
 };
 
+#ifdef CONFIG_OF
 static const struct of_device_id rockchip_dp_dt_ids[] = {
 	{.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
 	{.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
 	{}
 };
 MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
+#endif
 
 struct platform_driver rockchip_dp_driver = {
 	.probe = rockchip_dp_probe,
-- 
2.25.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
@ 2021-06-02  8:02 ` Souptick Joarder
  0 siblings, 0 replies; 12+ messages in thread
From: Souptick Joarder @ 2021-06-02  8:02 UTC (permalink / raw)
  To: hjc, heiko, airlied, daniel
  Cc: dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel,
	Souptick Joarder, kernel test robot

Kernel test robot throws below warning when CONFIG_OF
is not set.

>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
   static const struct of_device_id rockchip_dp_dt_ids[] = {

Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
index ade2327a10e2..9b79ebaeae97 100644
--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
@@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
 	.chip_type = RK3288_DP,
 };
 
+#ifdef CONFIG_OF
 static const struct of_device_id rockchip_dp_dt_ids[] = {
 	{.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
 	{.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
 	{}
 };
 MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
+#endif
 
 struct platform_driver rockchip_dp_driver = {
 	.probe = rockchip_dp_probe,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
@ 2021-06-02  8:02 ` Souptick Joarder
  0 siblings, 0 replies; 12+ messages in thread
From: Souptick Joarder @ 2021-06-02  8:02 UTC (permalink / raw)
  To: hjc, heiko, airlied, daniel
  Cc: kernel test robot, linux-kernel, dri-devel, linux-rockchip,
	Souptick Joarder, linux-arm-kernel

Kernel test robot throws below warning when CONFIG_OF
is not set.

>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
   static const struct of_device_id rockchip_dp_dt_ids[] = {

Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
index ade2327a10e2..9b79ebaeae97 100644
--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
@@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
 	.chip_type = RK3288_DP,
 };
 
+#ifdef CONFIG_OF
 static const struct of_device_id rockchip_dp_dt_ids[] = {
 	{.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
 	{.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
 	{}
 };
 MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
+#endif
 
 struct platform_driver rockchip_dp_driver = {
 	.probe = rockchip_dp_probe,
-- 
2.25.1


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

* Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
  2021-06-02  8:02 ` Souptick Joarder
  (?)
  (?)
@ 2021-06-02 10:07   ` Robin Murphy
  -1 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2021-06-02 10:07 UTC (permalink / raw)
  To: Souptick Joarder, hjc, heiko, airlied, daniel
  Cc: dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel test robot

On 2021-06-02 09:02, Souptick Joarder wrote:
> Kernel test robot throws below warning when CONFIG_OF
> is not set.
> 
>>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
> warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
>     static const struct of_device_id rockchip_dp_dt_ids[] = {
> 
> Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.

I think the __maybe_unused annotation is generally preferred over 
#ifdefs these days. However, since these drivers only work with 
devicetree anyway, it probably makes more sense to just remove the 
of_match_ptr() uses which lead to these warnings in the first place.

Robin.

> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
>   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> index ade2327a10e2..9b79ebaeae97 100644
> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
>   	.chip_type = RK3288_DP,
>   };
>   
> +#ifdef CONFIG_OF
>   static const struct of_device_id rockchip_dp_dt_ids[] = {
>   	{.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
>   	{.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
>   	{}
>   };
>   MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
> +#endif
>   
>   struct platform_driver rockchip_dp_driver = {
>   	.probe = rockchip_dp_probe,
> 

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

* Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
@ 2021-06-02 10:07   ` Robin Murphy
  0 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2021-06-02 10:07 UTC (permalink / raw)
  To: Souptick Joarder, hjc, heiko, airlied, daniel
  Cc: dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel test robot

On 2021-06-02 09:02, Souptick Joarder wrote:
> Kernel test robot throws below warning when CONFIG_OF
> is not set.
> 
>>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
> warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
>     static const struct of_device_id rockchip_dp_dt_ids[] = {
> 
> Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.

I think the __maybe_unused annotation is generally preferred over 
#ifdefs these days. However, since these drivers only work with 
devicetree anyway, it probably makes more sense to just remove the 
of_match_ptr() uses which lead to these warnings in the first place.

Robin.

> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
>   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> index ade2327a10e2..9b79ebaeae97 100644
> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
>   	.chip_type = RK3288_DP,
>   };
>   
> +#ifdef CONFIG_OF
>   static const struct of_device_id rockchip_dp_dt_ids[] = {
>   	{.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
>   	{.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
>   	{}
>   };
>   MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
> +#endif
>   
>   struct platform_driver rockchip_dp_driver = {
>   	.probe = rockchip_dp_probe,
> 

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
@ 2021-06-02 10:07   ` Robin Murphy
  0 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2021-06-02 10:07 UTC (permalink / raw)
  To: Souptick Joarder, hjc, heiko, airlied, daniel
  Cc: dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel test robot

On 2021-06-02 09:02, Souptick Joarder wrote:
> Kernel test robot throws below warning when CONFIG_OF
> is not set.
> 
>>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
> warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
>     static const struct of_device_id rockchip_dp_dt_ids[] = {
> 
> Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.

I think the __maybe_unused annotation is generally preferred over 
#ifdefs these days. However, since these drivers only work with 
devicetree anyway, it probably makes more sense to just remove the 
of_match_ptr() uses which lead to these warnings in the first place.

Robin.

> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
>   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> index ade2327a10e2..9b79ebaeae97 100644
> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
>   	.chip_type = RK3288_DP,
>   };
>   
> +#ifdef CONFIG_OF
>   static const struct of_device_id rockchip_dp_dt_ids[] = {
>   	{.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
>   	{.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
>   	{}
>   };
>   MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
> +#endif
>   
>   struct platform_driver rockchip_dp_driver = {
>   	.probe = rockchip_dp_probe,
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
@ 2021-06-02 10:07   ` Robin Murphy
  0 siblings, 0 replies; 12+ messages in thread
From: Robin Murphy @ 2021-06-02 10:07 UTC (permalink / raw)
  To: Souptick Joarder, hjc, heiko, airlied, daniel
  Cc: linux-rockchip, kernel test robot, linux-arm-kernel, dri-devel,
	linux-kernel

On 2021-06-02 09:02, Souptick Joarder wrote:
> Kernel test robot throws below warning when CONFIG_OF
> is not set.
> 
>>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
> warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
>     static const struct of_device_id rockchip_dp_dt_ids[] = {
> 
> Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.

I think the __maybe_unused annotation is generally preferred over 
#ifdefs these days. However, since these drivers only work with 
devicetree anyway, it probably makes more sense to just remove the 
of_match_ptr() uses which lead to these warnings in the first place.

Robin.

> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
>   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> index ade2327a10e2..9b79ebaeae97 100644
> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
>   	.chip_type = RK3288_DP,
>   };
>   
> +#ifdef CONFIG_OF
>   static const struct of_device_id rockchip_dp_dt_ids[] = {
>   	{.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
>   	{.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
>   	{}
>   };
>   MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
> +#endif
>   
>   struct platform_driver rockchip_dp_driver = {
>   	.probe = rockchip_dp_probe,
> 

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

* Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
  2021-06-02 10:07   ` Robin Murphy
  (?)
  (?)
@ 2021-06-07 18:40     ` Souptick Joarder
  -1 siblings, 0 replies; 12+ messages in thread
From: Souptick Joarder @ 2021-06-07 18:40 UTC (permalink / raw)
  To: Robin Murphy
  Cc: hjc, Heiko Stuebner, David Airlie, Daniel Vetter, dri-devel,
	linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel test robot

On Wed, Jun 2, 2021 at 3:37 PM Robin Murphy <robin.murphy@arm.com> wrote:
>
> On 2021-06-02 09:02, Souptick Joarder wrote:
> > Kernel test robot throws below warning when CONFIG_OF
> > is not set.
> >
> >>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
> > warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
> >     static const struct of_device_id rockchip_dp_dt_ids[] = {
> >
> > Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.
>
> I think the __maybe_unused annotation is generally preferred over
> #ifdefs these days. However, since these drivers only work with
> devicetree anyway, it probably makes more sense to just remove the
> of_match_ptr() uses which lead to these warnings in the first place.

Ok. Will remove of_match_ptr().
>
> Robin.
>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> > ---
> >   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > index ade2327a10e2..9b79ebaeae97 100644
> > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
> >       .chip_type = RK3288_DP,
> >   };
> >
> > +#ifdef CONFIG_OF
> >   static const struct of_device_id rockchip_dp_dt_ids[] = {
> >       {.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
> >       {.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
> >       {}
> >   };
> >   MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
> > +#endif
> >
> >   struct platform_driver rockchip_dp_driver = {
> >       .probe = rockchip_dp_probe,
> >

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

* Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
@ 2021-06-07 18:40     ` Souptick Joarder
  0 siblings, 0 replies; 12+ messages in thread
From: Souptick Joarder @ 2021-06-07 18:40 UTC (permalink / raw)
  To: Robin Murphy
  Cc: hjc, Heiko Stuebner, David Airlie, Daniel Vetter, dri-devel,
	linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel test robot

On Wed, Jun 2, 2021 at 3:37 PM Robin Murphy <robin.murphy@arm.com> wrote:
>
> On 2021-06-02 09:02, Souptick Joarder wrote:
> > Kernel test robot throws below warning when CONFIG_OF
> > is not set.
> >
> >>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
> > warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
> >     static const struct of_device_id rockchip_dp_dt_ids[] = {
> >
> > Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.
>
> I think the __maybe_unused annotation is generally preferred over
> #ifdefs these days. However, since these drivers only work with
> devicetree anyway, it probably makes more sense to just remove the
> of_match_ptr() uses which lead to these warnings in the first place.

Ok. Will remove of_match_ptr().
>
> Robin.
>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> > ---
> >   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > index ade2327a10e2..9b79ebaeae97 100644
> > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
> >       .chip_type = RK3288_DP,
> >   };
> >
> > +#ifdef CONFIG_OF
> >   static const struct of_device_id rockchip_dp_dt_ids[] = {
> >       {.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
> >       {.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
> >       {}
> >   };
> >   MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
> > +#endif
> >
> >   struct platform_driver rockchip_dp_driver = {
> >       .probe = rockchip_dp_probe,
> >

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
@ 2021-06-07 18:40     ` Souptick Joarder
  0 siblings, 0 replies; 12+ messages in thread
From: Souptick Joarder @ 2021-06-07 18:40 UTC (permalink / raw)
  To: Robin Murphy
  Cc: hjc, Heiko Stuebner, David Airlie, Daniel Vetter, dri-devel,
	linux-arm-kernel, linux-rockchip, linux-kernel,
	kernel test robot

On Wed, Jun 2, 2021 at 3:37 PM Robin Murphy <robin.murphy@arm.com> wrote:
>
> On 2021-06-02 09:02, Souptick Joarder wrote:
> > Kernel test robot throws below warning when CONFIG_OF
> > is not set.
> >
> >>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
> > warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
> >     static const struct of_device_id rockchip_dp_dt_ids[] = {
> >
> > Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.
>
> I think the __maybe_unused annotation is generally preferred over
> #ifdefs these days. However, since these drivers only work with
> devicetree anyway, it probably makes more sense to just remove the
> of_match_ptr() uses which lead to these warnings in the first place.

Ok. Will remove of_match_ptr().
>
> Robin.
>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> > ---
> >   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > index ade2327a10e2..9b79ebaeae97 100644
> > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
> >       .chip_type = RK3288_DP,
> >   };
> >
> > +#ifdef CONFIG_OF
> >   static const struct of_device_id rockchip_dp_dt_ids[] = {
> >       {.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
> >       {.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
> >       {}
> >   };
> >   MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
> > +#endif
> >
> >   struct platform_driver rockchip_dp_driver = {
> >       .probe = rockchip_dp_probe,
> >

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
@ 2021-06-07 18:40     ` Souptick Joarder
  0 siblings, 0 replies; 12+ messages in thread
From: Souptick Joarder @ 2021-06-07 18:40 UTC (permalink / raw)
  To: Robin Murphy
  Cc: David Airlie, hjc, dri-devel, linux-kernel, linux-rockchip,
	linux-arm-kernel, kernel test robot

On Wed, Jun 2, 2021 at 3:37 PM Robin Murphy <robin.murphy@arm.com> wrote:
>
> On 2021-06-02 09:02, Souptick Joarder wrote:
> > Kernel test robot throws below warning when CONFIG_OF
> > is not set.
> >
> >>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34:
> > warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
> >     static const struct of_device_id rockchip_dp_dt_ids[] = {
> >
> > Fixed it by defining rockchip_dp_dt_ids[] under CONFIG_OF.
>
> I think the __maybe_unused annotation is generally preferred over
> #ifdefs these days. However, since these drivers only work with
> devicetree anyway, it probably makes more sense to just remove the
> of_match_ptr() uses which lead to these warnings in the first place.

Ok. Will remove of_match_ptr().
>
> Robin.
>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> > ---
> >   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > index ade2327a10e2..9b79ebaeae97 100644
> > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > @@ -454,12 +454,14 @@ static const struct rockchip_dp_chip_data rk3288_dp = {
> >       .chip_type = RK3288_DP,
> >   };
> >
> > +#ifdef CONFIG_OF
> >   static const struct of_device_id rockchip_dp_dt_ids[] = {
> >       {.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
> >       {.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
> >       {}
> >   };
> >   MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
> > +#endif
> >
> >   struct platform_driver rockchip_dp_driver = {
> >       .probe = rockchip_dp_probe,
> >

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

end of thread, other threads:[~2021-06-07 18:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02  8:02 [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF Souptick Joarder
2021-06-02  8:02 ` Souptick Joarder
2021-06-02  8:02 ` Souptick Joarder
2021-06-02  8:02 ` Souptick Joarder
2021-06-02 10:07 ` Robin Murphy
2021-06-02 10:07   ` Robin Murphy
2021-06-02 10:07   ` Robin Murphy
2021-06-02 10:07   ` Robin Murphy
2021-06-07 18:40   ` Souptick Joarder
2021-06-07 18:40     ` Souptick Joarder
2021-06-07 18:40     ` Souptick Joarder
2021-06-07 18:40     ` Souptick Joarder

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.