lkml.org 
[lkml]   [2017]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [media] fc001[23]: make const gain table arrays static
Date
From: Colin Ian King <colin.king@canonical.com>

Don't populate the gain tables on the stack but make them static const.
Makes the object code smaller:

Before:
text data bss dec hex filename
7801 1408 0 9209 23f9 drivers/media/tuners/fc0012.o
8483 936 0 9419 24cb drivers/media/tuners/fc0013.o

After:
text data bss dec hex filename
7696 1464 0 9160 23c8 drivers/media/tuners/fc0012.o
8362 1024 0 9386 24aa drivers/media/tuners/fc0013.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/media/tuners/fc0012.c | 2 +-
drivers/media/tuners/fc0013.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/tuners/fc0012.c b/drivers/media/tuners/fc0012.c
index dcc323ffbde7..625ac6f51c39 100644
--- a/drivers/media/tuners/fc0012.c
+++ b/drivers/media/tuners/fc0012.c
@@ -351,7 +351,7 @@ static int fc0012_get_rf_strength(struct dvb_frontend *fe, u16 *strength)
int ret;
unsigned char tmp;
int int_temp, lna_gain, int_lna, tot_agc_gain, power;
- const int fc0012_lna_gain_table[] = {
+ static const int fc0012_lna_gain_table[] = {
/* low gain */
-63, -58, -99, -73,
-63, -65, -54, -60,
diff --git a/drivers/media/tuners/fc0013.c b/drivers/media/tuners/fc0013.c
index 91dfa770a5cc..e606118d1a9b 100644
--- a/drivers/media/tuners/fc0013.c
+++ b/drivers/media/tuners/fc0013.c
@@ -511,7 +511,7 @@ static int fc0013_get_rf_strength(struct dvb_frontend *fe, u16 *strength)
int ret;
unsigned char tmp;
int int_temp, lna_gain, int_lna, tot_agc_gain, power;
- const int fc0013_lna_gain_table[] = {
+ static const int fc0013_lna_gain_table[] = {
/* low gain */
-63, -58, -99, -73,
-63, -65, -54, -60,
--
2.11.0
\
 
 \ /
  Last update: 2017-07-11 11:44    [W:0.533 / U:22.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site