All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Souptick Joarder <jrdr.linux@gmail.com>,
	hjc@rock-chips.com, heiko@sntech.de, airlied@linux.ie,
	daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
Date: Wed, 2 Jun 2021 11:07:06 +0100	[thread overview]
Message-ID: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> (raw)
In-Reply-To: <20210602080212.4992-1-jrdr.linux@gmail.com>

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,
> 

WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com>
To: Souptick Joarder <jrdr.linux@gmail.com>,
	hjc@rock-chips.com, heiko@sntech.de, airlied@linux.ie,
	daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
Date: Wed, 2 Jun 2021 11:07:06 +0100	[thread overview]
Message-ID: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> (raw)
In-Reply-To: <20210602080212.4992-1-jrdr.linux@gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com>
To: Souptick Joarder <jrdr.linux@gmail.com>,
	hjc@rock-chips.com, heiko@sntech.de, airlied@linux.ie,
	daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
Date: Wed, 2 Jun 2021 11:07:06 +0100	[thread overview]
Message-ID: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> (raw)
In-Reply-To: <20210602080212.4992-1-jrdr.linux@gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com>
To: Souptick Joarder <jrdr.linux@gmail.com>,
	hjc@rock-chips.com, heiko@sntech.de, airlied@linux.ie,
	daniel@ffwll.ch
Cc: linux-rockchip@lists.infradead.org,
	kernel test robot <lkp@intel.com>,
	linux-arm-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF
Date: Wed, 2 Jun 2021 11:07:06 +0100	[thread overview]
Message-ID: <8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com> (raw)
In-Reply-To: <20210602080212.4992-1-jrdr.linux@gmail.com>

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,
> 

  reply	other threads:[~2021-06-02 10:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8027801c-5260-8b1b-c758-fdfb8c18e9a7@arm.com \
    --to=robin.murphy@arm.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.