* [PATCH] iio: adc: at91: make array startup_lookup static
@ 2017-07-10 17:46 Colin King
2017-07-10 21:01 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-07-10 17:46 UTC (permalink / raw)
To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Wenyou Yang, Nicolas Ferre,
Ludovic Desroches, Anders Darander, linux-iio
Cc: kernel-janitors, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: adc: at91: make array startup_lookup static
2017-07-10 17:46 [PATCH] iio: adc: at91: make array startup_lookup static Colin King
@ 2017-07-10 21:01 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2017-07-10 21:01 UTC (permalink / raw)
To: Colin King
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
Wenyou Yang, Nicolas Ferre, Ludovic Desroches, Anders Darander,
linux-iio, kernel-janitors, linux-kernel
On Mon, 10 Jul 2017 18:46:54 +0100
Colin King <colin.king@canonical.com> wrote:
> 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>
Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.
Thanks,
Jonathan
> ---
> 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,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-10 21:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 17:46 [PATCH] iio: adc: at91: make array startup_lookup static Colin King
2017-07-10 21:01 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).