diff mbox series

[14/20] media: adv7511: drop unused functions

Message ID 031cdb0042f8239a6746831f5c8f89cf4aef6107.1637781097.git.mchehab+huawei@kernel.org (mailing list archive)
State New, archived
Headers show
Series Solve the remaining issues with clang and W=1 on media | expand

Commit Message

Mauro Carvalho Chehab Nov. 24, 2021, 7:13 p.m. UTC
Those are aliases for another function and not used at the
current implementation. So, just drop it.

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/adv7511-v4l2.c | 22 ----------------------
 1 file changed, 22 deletions(-)

Comments

Nathan Chancellor Nov. 26, 2021, 8:27 p.m. UTC | #1
On Wed, Nov 24, 2021 at 08:13:17PM +0100, Mauro Carvalho Chehab wrote:
> Those are aliases for another function and not used at the
> current implementation. So, just drop it.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Reviewed-by: Nathan Chancellor <nathan@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/adv7511-v4l2.c | 22 ----------------------
>  1 file changed, 22 deletions(-)
> 
> diff --git a/drivers/media/i2c/adv7511-v4l2.c b/drivers/media/i2c/adv7511-v4l2.c
> index 41f4e749a859..8e13cae40ec5 100644
> --- a/drivers/media/i2c/adv7511-v4l2.c
> +++ b/drivers/media/i2c/adv7511-v4l2.c
> @@ -270,28 +270,6 @@ static int adv7511_pktmem_rd(struct v4l2_subdev *sd, u8 reg)
>  	return adv_smbus_read_byte_data(state->i2c_pktmem, reg);
>  }
>  
> -static int adv7511_pktmem_wr(struct v4l2_subdev *sd, u8 reg, u8 val)
> -{
> -	struct adv7511_state *state = get_adv7511_state(sd);
> -	int ret;
> -	int i;
> -
> -	for (i = 0; i < 3; i++) {
> -		ret = i2c_smbus_write_byte_data(state->i2c_pktmem, reg, val);
> -		if (ret == 0)
> -			return 0;
> -	}
> -	v4l2_err(sd, "%s: i2c write error\n", __func__);
> -	return ret;
> -}
> -
> -/* To set specific bits in the register, a clear-mask is given (to be AND-ed),
> -   and then the value-mask (to be OR-ed). */
> -static inline void adv7511_pktmem_wr_and_or(struct v4l2_subdev *sd, u8 reg, u8 clr_mask, u8 val_mask)
> -{
> -	adv7511_pktmem_wr(sd, reg, (adv7511_pktmem_rd(sd, reg) & clr_mask) | val_mask);
> -}
> -
>  static inline bool adv7511_have_hotplug(struct v4l2_subdev *sd)
>  {
>  	return adv7511_rd(sd, 0x42) & MASK_ADV7511_HPD_DETECT;
> -- 
> 2.33.1
> 
>
diff mbox series

Patch

diff --git a/drivers/media/i2c/adv7511-v4l2.c b/drivers/media/i2c/adv7511-v4l2.c
index 41f4e749a859..8e13cae40ec5 100644
--- a/drivers/media/i2c/adv7511-v4l2.c
+++ b/drivers/media/i2c/adv7511-v4l2.c
@@ -270,28 +270,6 @@  static int adv7511_pktmem_rd(struct v4l2_subdev *sd, u8 reg)
 	return adv_smbus_read_byte_data(state->i2c_pktmem, reg);
 }
 
-static int adv7511_pktmem_wr(struct v4l2_subdev *sd, u8 reg, u8 val)
-{
-	struct adv7511_state *state = get_adv7511_state(sd);
-	int ret;
-	int i;
-
-	for (i = 0; i < 3; i++) {
-		ret = i2c_smbus_write_byte_data(state->i2c_pktmem, reg, val);
-		if (ret == 0)
-			return 0;
-	}
-	v4l2_err(sd, "%s: i2c write error\n", __func__);
-	return ret;
-}
-
-/* To set specific bits in the register, a clear-mask is given (to be AND-ed),
-   and then the value-mask (to be OR-ed). */
-static inline void adv7511_pktmem_wr_and_or(struct v4l2_subdev *sd, u8 reg, u8 clr_mask, u8 val_mask)
-{
-	adv7511_pktmem_wr(sd, reg, (adv7511_pktmem_rd(sd, reg) & clr_mask) | val_mask);
-}
-
 static inline bool adv7511_have_hotplug(struct v4l2_subdev *sd)
 {
 	return adv7511_rd(sd, 0x42) & MASK_ADV7511_HPD_DETECT;