lkml.org 
[lkml]   [2021]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/20] media: adv7604 add _maybe_unused to currently unused functions
Date
There are several unused helper macros there, meant to parse some
fields.

While there's not wrong with that, it generates clang warnings
with W=1, causing build to break with CONFIG_WERROR.

So, add __maybe_unused to fix such warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH 00/20] at: https://lore.kernel.org/all/cover.1637781097.git.mchehab+huawei@kernel.org/

drivers/media/i2c/adv7604.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 44768b59a6ff..be95b2264221 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -398,14 +398,14 @@ static inline int io_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask,
return io_write(sd, reg, (io_read(sd, reg) & ~mask) | val);
}

-static inline int avlink_read(struct v4l2_subdev *sd, u8 reg)
+static inline int __maybe_unused avlink_read(struct v4l2_subdev *sd, u8 reg)
{
struct adv76xx_state *state = to_state(sd);

return adv76xx_read_check(state, ADV7604_PAGE_AVLINK, reg);
}

-static inline int avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val)
+static inline int __maybe_unused avlink_write(struct v4l2_subdev *sd, u8 reg, u8 val)
{
struct adv76xx_state *state = to_state(sd);

@@ -439,14 +439,14 @@ static inline int infoframe_read(struct v4l2_subdev *sd, u8 reg)
return adv76xx_read_check(state, ADV76XX_PAGE_INFOFRAME, reg);
}

-static inline int infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
+static inline int __maybe_unused infoframe_write(struct v4l2_subdev *sd, u8 reg, u8 val)
{
struct adv76xx_state *state = to_state(sd);

return regmap_write(state->regmap[ADV76XX_PAGE_INFOFRAME], reg, val);
}

-static inline int afe_read(struct v4l2_subdev *sd, u8 reg)
+static inline int __maybe_unused afe_read(struct v4l2_subdev *sd, u8 reg)
{
struct adv76xx_state *state = to_state(sd);

@@ -479,14 +479,14 @@ static inline int rep_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8
return rep_write(sd, reg, (rep_read(sd, reg) & ~mask) | val);
}

-static inline int edid_read(struct v4l2_subdev *sd, u8 reg)
+static inline int __maybe_unused edid_read(struct v4l2_subdev *sd, u8 reg)
{
struct adv76xx_state *state = to_state(sd);

return adv76xx_read_check(state, ADV76XX_PAGE_EDID, reg);
}

-static inline int edid_write(struct v4l2_subdev *sd, u8 reg, u8 val)
+static inline int __maybe_unused edid_write(struct v4l2_subdev *sd, u8 reg, u8 val)
{
struct adv76xx_state *state = to_state(sd);

@@ -570,7 +570,7 @@ static inline int hdmi_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8
return hdmi_write(sd, reg, (hdmi_read(sd, reg) & ~mask) | val);
}

-static inline int test_write(struct v4l2_subdev *sd, u8 reg, u8 val)
+static inline int __maybe_unused test_write(struct v4l2_subdev *sd, u8 reg, u8 val)
{
struct adv76xx_state *state = to_state(sd);

@@ -601,14 +601,14 @@ static inline int cp_write_clr_set(struct v4l2_subdev *sd, u8 reg, u8 mask, u8 v
return cp_write(sd, reg, (cp_read(sd, reg) & ~mask) | val);
}

-static inline int vdp_read(struct v4l2_subdev *sd, u8 reg)
+static inline int __maybe_unused vdp_read(struct v4l2_subdev *sd, u8 reg)
{
struct adv76xx_state *state = to_state(sd);

return adv76xx_read_check(state, ADV7604_PAGE_VDP, reg);
}

-static inline int vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
+static inline int __maybe_unused vdp_write(struct v4l2_subdev *sd, u8 reg, u8 val)
{
struct adv76xx_state *state = to_state(sd);

--
2.33.1
\
 
 \ /
  Last update: 2021-11-24 20:15    [W:0.635 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site