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


Groups > linux.kernel > #1684634

Re: [PATCH] iio:adc:at91-sama5d2: make array startup_lookup static

From Jonathan Cameron <jic23@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] iio:adc:at91-sama5d2: make array startup_lookup static
Date 2017-07-10 23:00 +0200
Message-ID <u1NWG-1rM-31@gated-at.bofh.it> (permalink)
References <u1Kcq-7u8-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 10 Jul 2017 17:56:16 +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.  Also add in missing 'int' type
> specifier to clean up a checkpatch warning.
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>   10297	   2800	    128	  13225	   33a9	drivers/iio/adc/at91-sama5d2_adc.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>   10140	   2888	    128	  13156	   3364	drivers/iio/adc/at91-sama5d2_adc.o
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Hi Colin

I'm guessing accidental repost?  I applied this yesterday and you haven't marked
it as a resend!

Jonathan
> ---
>  drivers/iio/adc/at91-sama5d2_adc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
> index e10dca3ed74b..509988a6817a 100644
> --- a/drivers/iio/adc/at91-sama5d2_adc.c
> +++ b/drivers/iio/adc/at91-sama5d2_adc.c
> @@ -231,7 +231,7 @@ static const struct iio_chan_spec at91_adc_channels[] = {
>  static unsigned at91_adc_startup_time(unsigned startup_time_min,
>  				      unsigned adc_clk_khz)
>  {
> -	const unsigned startup_lookup[] = {
> +	static const unsigned int startup_lookup[] = {
>  		  0,   8,  16,  24,
>  		 64,  80,  96, 112,
>  		512, 576, 640, 704,

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


Thread

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

csiph-web