Skip to contentSkip to conversation

media: vpx3220: make array input_vals static, makes object smaller

PATCH New Colin King 1 participant 1 message Oct 6, 2019

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 media: vpx3220: make array input_vals static, makes object smaller

From: Colin Ian King <[email protected]>

Don't populate the array input_vals on the stack but instead make it static. Makes the object code smaller by 106 bytes.

Before:

   text	   data	    bss	    dec	    hex	filename
  11744	   3536	    128	  15408	   3c30	drivers/media/i2c/vpx3220.o

After:

   text	   data	    bss	    dec	    hex	filename
  11574	   3600	    128	  15302	   3bc6	drivers/media/i2c/vpx3220.o

(gcc version 9.2.1, amd64)

---
 drivers/media/i2c/vpx3220.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/vpx3220.c +1 -1
index 39f66e7a0e42..8be03fe5928c 100644
@@ -375,7 +375,7 @@ static int vpx3220_s_routing(struct v4l2_subdev *sd,
 		 input = 1: COMPOSITE  input
 		 input = 2: SVHS       input  */
 
-	const int input_vals[3][2] = {
+	static const int input_vals[3][2] = {
 		{0x0c, 0},
 		{0x0d, 0},
 		{0x0e, 1}
Signature · 1 line
2.20.1