From: Colin King <colin.king@canonical.com> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, Max Kellermann <max.kellermann@gmail.com>, linux-media@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] fc001[23]: make const gain table arrays static Date: Tue, 11 Jul 2017 10:43:49 +0100 [thread overview] Message-ID: <20170711094349.13263-1-colin.king@canonical.com> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: Colin King <colin.king@canonical.com> To: Mauro Carvalho Chehab <mchehab@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, Max Kellermann <max.kellermann@gmail.com>, linux-media@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] fc001[23]: make const gain table arrays static Date: Tue, 11 Jul 2017 09:43:49 +0000 [thread overview] Message-ID: <20170711094349.13263-1-colin.king@canonical.com> (raw) 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
next reply other threads:[~2017-07-11 9:43 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-07-11 9:43 Colin King [this message] 2017-07-11 9:43 ` [PATCH] [media] fc001[23]: make const gain table arrays static Colin King
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20170711094349.13263-1-colin.king@canonical.com \ --to=colin.king@canonical.com \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=max.kellermann@gmail.com \ --cc=mchehab@kernel.org \ --cc=sakari.ailus@linux.intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.