linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: sn65dsi86: ti_sn65dsi86_read_u16() __maybe_unused
@ 2021-10-28 16:35 Bjorn Andersson
  2021-10-28 17:12 ` Robert Foss
  0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Andersson @ 2021-10-28 16:35 UTC (permalink / raw)
  To: Robert Foss
  Cc: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, David Airlie, Daniel Vetter, dri-devel,
	linux-kernel, linux-arm-msm, kernel test robot

When built without CONFIG_PWM there are no references to
ti_sn65dsi86_read_u16(), avoid the W=1 build warning by marking the
function as __maybe_unused.

__maybe_unused is used insted of a #ifdef guard as it looks slighly
cleaner and it avoids issues if in the future other permutations of the
config options would use the function.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Robert, I believe you pushed out the driver patch introducing this issue
yesterday. Can you please add the relevant Fixes?

 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 430067a3071c..e1f43b73155b 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -215,8 +215,8 @@ static const struct regmap_config ti_sn65dsi86_regmap_config = {
 	.cache_type = REGCACHE_NONE,
 };
 
-static int ti_sn65dsi86_read_u16(struct ti_sn65dsi86 *pdata,
-				 unsigned int reg, u16 *val)
+static int __maybe_unused ti_sn65dsi86_read_u16(struct ti_sn65dsi86 *pdata,
+						unsigned int reg, u16 *val)
 {
 	u8 buf[2];
 	int ret;
-- 
2.33.1


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

* Re: [PATCH] drm/bridge: sn65dsi86: ti_sn65dsi86_read_u16() __maybe_unused
  2021-10-28 16:35 [PATCH] drm/bridge: sn65dsi86: ti_sn65dsi86_read_u16() __maybe_unused Bjorn Andersson
@ 2021-10-28 17:12 ` Robert Foss
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Foss @ 2021-10-28 17:12 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, David Airlie, Daniel Vetter, dri-devel,
	linux-kernel, linux-arm-msm, kernel test robot

Hey Bjorn,

Thanks for fixing this quickly.

On Thu, 28 Oct 2021 at 18:33, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> When built without CONFIG_PWM there are no references to
> ti_sn65dsi86_read_u16(), avoid the W=1 build warning by marking the
> function as __maybe_unused.
>
> __maybe_unused is used insted of a #ifdef guard as it looks slighly
> cleaner and it avoids issues if in the future other permutations of the
> config options would use the function.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>
> Robert, I believe you pushed out the driver patch introducing this issue
> yesterday. Can you please add the relevant Fixes?

Added fixes & r-b tags.

Fixes: cea86c5bb442 ("drm/bridge: ti-sn65dsi86: Implement the pwm_chip")
Reviewed-by: Robert Foss <robert.foss@linaro.org>

Applied to drm-misc-next

>
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index 430067a3071c..e1f43b73155b 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -215,8 +215,8 @@ static const struct regmap_config ti_sn65dsi86_regmap_config = {
>         .cache_type = REGCACHE_NONE,
>  };
>
> -static int ti_sn65dsi86_read_u16(struct ti_sn65dsi86 *pdata,
> -                                unsigned int reg, u16 *val)
> +static int __maybe_unused ti_sn65dsi86_read_u16(struct ti_sn65dsi86 *pdata,
> +                                               unsigned int reg, u16 *val)
>  {
>         u8 buf[2];
>         int ret;
> --
> 2.33.1
>

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

end of thread, other threads:[~2021-10-28 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 16:35 [PATCH] drm/bridge: sn65dsi86: ti_sn65dsi86_read_u16() __maybe_unused Bjorn Andersson
2021-10-28 17:12 ` Robert Foss

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).