Skip to contentSkip to conversation

ths7303: Declare as static a private function

PATCH Superseded Ricardo Ribalda Delgado 2 participants 3 messages Nov 6, 2013 Media (V4L/DVB)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ths7303: Declare as static a private function

git grep shows that the function is only called from ths7303.c

Fix this build warning:

CC drivers/media/i2c/ths7303.o
drivers/media/i2c/ths7303.c:86:5: warning: no previous prototype for ‘ths7303_setval’ [-Wmissing-prototypes]
int ths7303_setval(struct v4l2_subdev *sd, enum ths7303_filter_mode mode)

        ^
---
 drivers/media/i2c/ths7303.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/ths7303.c +2 -1
index 42276d9..16da153 100644
@@ -83,7 +83,8 @@ static int ths7303_write(struct v4l2_subdev *sd, u8 reg, u8 val)
 }
 
 /* following function is used to set ths7303 */
-int ths7303_setval(struct v4l2_subdev *sd, enum ths7303_filter_mode mode)
+static int ths7303_setval(struct v4l2_subdev *sd,
+					enum ths7303_filter_mode mode)
 {
 	struct i2c_client *client = v4l2_get_subdevdata(sd);
 	struct ths7303_state *state = to_state(sd);
Signature · 1 line
1.8.4.rc3
Acked-by on v1 1/1
#1 lore raw

Hi Ricardo,

Thank you for the patch.

Quoted 19 lines · On Wednesday 06 November 2013 15:27:48 Ricardo Ribalda Delgado wrote:

git grep shows that the function is only called from ths7303.c

Fix this build warning:

CC drivers/media/i2c/ths7303.o
drivers/media/i2c/ths7303.c:86:5: warning: no previous prototype for ‘ths7303_setval’ [-Wmissing-prototypes] int ths7303_setval(struct v4l2_subdev *sd, enum ths7303_filter_mode mode) ^

---
 drivers/media/i2c/ths7303.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/ths7303.c +0 -0
index 42276d9..16da153 100644

drivers/media/i2c/ths7303.c static int ths7303_write(struct v4l2_subdev *sd, u8 reg, · line 87

Quoted 6 lines
drivers/media/i2c/ths7303.c +2 -1
@@ -83,7 +83,8 @@ static int ths7303_write(struct v4l2_subdev *sd, u8 reg,
 u8 val) }
 
 /* following function is used to set ths7303 */
-int ths7303_setval(struct v4l2_subdev *sd, enum ths7303_filter_mode mode)
+static int ths7303_setval(struct v4l2_subdev *sd,
+					enum ths7303_filter_mode mode)

If you align 'enum' on 'struct' from the line above,

Quoted 3 lines
drivers/media/i2c/ths7303.c +0 -0
 {
 	struct i2c_client *client = v4l2_get_subdevdata(sd);
 	struct ths7303_state *state = to_state(sd);
Signature · 3 lines
Regards,

Laurent Pinchart
#2 lore raw

Hello Laurent

I have just uploaded a patch, please take a look if I align it properly.

Thanks!

Quoted 43 lines · Laurent Pinchart

Hi Ricardo,

Thank you for the patch.

Quoted 19 lines · On Wednesday 06 November 2013 15:27:48 Ricardo Ribalda Delgado wrote:

git grep shows that the function is only called from ths7303.c

Fix this build warning:

CC drivers/media/i2c/ths7303.o
drivers/media/i2c/ths7303.c:86:5: warning: no previous prototype for ‘ths7303_setval’ [-Wmissing-prototypes] int ths7303_setval(struct v4l2_subdev *sd, enum ths7303_filter_mode mode) ^

---
 drivers/media/i2c/ths7303.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/ths7303.c +0 -0
index 42276d9..16da153 100644

drivers/media/i2c/ths7303.c static int ths7303_write(struct v4l2_subdev *sd, u8 reg, · line 87

Quoted 6 lines
drivers/media/i2c/ths7303.c +2 -1
@@ -83,7 +83,8 @@ static int ths7303_write(struct v4l2_subdev *sd, u8 reg,
 u8 val) }
 
 /* following function is used to set ths7303 */
-int ths7303_setval(struct v4l2_subdev *sd, enum ths7303_filter_mode mode)
+static int ths7303_setval(struct v4l2_subdev *sd,
+                                     enum ths7303_filter_mode mode)

If you align 'enum' on 'struct' from the line above,

drivers/media/i2c/ths7303.c static int ths7303_write(struct v4l2_subdev *sd, u8 reg, u8 val) · line 90

Quoted 3 lines
drivers/media/i2c/ths7303.c +0 -0
 {
      struct i2c_client *client = v4l2_get_subdevdata(sd);
      struct ths7303_state *state = to_state(sd);

--
Regards,

Laurent Pinchart

Signature · 1 line
Ricardo Ribalda