Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1684545

[PATCH] iio: adc: at91: make array startup_lookup static

From Colin King <colin.king@canonical.com>
Newsgroups linux.kernel
Subject [PATCH] iio: adc: at91: make array startup_lookup static
Date 2017-07-10 19:50 +0200
Message-ID <u1KYO-81W-15@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin Ian King <colin.king@canonical.com>

Don't populate array startup_lookup on the stack but instead make
it static.  Makes the object code smaller.

Before:
   text	   data	    bss	    dec	    hex	filename
  21754	   5440	    128	  27322	   6aba	drivers/iio/adc/at91_adc.o

After:
   text	   data	    bss	    dec	    hex	filename
  21613	   5496	    128	  27237	   6a65	drivers/iio/adc/at91_adc.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/iio/adc/at91_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index 34b928cefeed..15109728cae7 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -799,7 +799,7 @@ static u32 calc_startup_ticks_9x5(u32 startup_time, u32 adc_clk_khz)
 	 * For sama5d3x and at91sam9x5, the formula changes to:
 	 * Startup Time = <lookup_table_value> / ADC Clock
 	 */
-	const int startup_lookup[] = {
+	static const int startup_lookup[] = {
 		0,   8,   16,  24,
 		64,  80,  96,  112,
 		512, 576, 640, 704,
-- 
2.11.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] iio: adc: at91: make array startup_lookup static Colin King <colin.king@canonical.com> - 2017-07-10 19:50 +0200
  Re: [PATCH] iio: adc: at91: make array startup_lookup static Jonathan Cameron <jic23@kernel.org> - 2017-07-10 23:10 +0200

csiph-web