Skip to contentSkip to conversation

ths7303: Declare as static a private function

PATCH In review Ricardo Ribalda Delgado 3 participants 3 messages Nov 6, 2013 – Nov 7, 2013 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH v2 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)

        ^

---
v2: Comment by Laurent Pinchart
Align parameters

 drivers/media/i2c/ths7303.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/ths7303.c +2 -1
index 42276d9..ed9ae88 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
#1 lore raw

Hi Ricardo,

Thank you for the patch.

Quoted 11 lines · On Wednesday 06 November 2013 15:40:18 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) ^

Confirmed :-)

Quoted 21 lines

---
v2: Comment by Laurent Pinchart
Align parameters

 drivers/media/i2c/ths7303.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/ths7303.c +2 -1
index 42276d9..ed9ae88 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 · 3 lines
Regards,

Laurent Pinchart
Acked-by on v2 1/1
#2 lore raw
In reply to Ricardo Ribalda Delgado

Hi Ricardo,

Thanks for the patch.

Quoted 11 lines · Ricardo Ribalda Delgado

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)

        ^

Regards,
--Prabhakar Lad