All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Wenyou Yang <wenyou.yang@atmel.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Ludovic Desroches <ludovic.desroches@atmel.com>,
	Anders Darander <anders@chargestorm.se>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: at91: make array startup_lookup static
Date: Mon, 10 Jul 2017 21:01:23 +0000	[thread overview]
Message-ID: <20170710220123.35e77c88@kernel.org> (raw)
In-Reply-To: <20170710174654.17271-1-colin.king@canonical.com>

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,


WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Wenyou Yang <wenyou.yang@atmel.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Ludovic Desroches <ludovic.desroches@atmel.com>,
	Anders Darander <anders@chargestorm.se>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: at91: make array startup_lookup static
Date: Mon, 10 Jul 2017 22:01:23 +0100	[thread overview]
Message-ID: <20170710220123.35e77c88@kernel.org> (raw)
In-Reply-To: <20170710174654.17271-1-colin.king@canonical.com>

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,


  reply	other threads:[~2017-07-10 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 17:46 [PATCH] iio: adc: at91: make array startup_lookup static Colin King
2017-07-10 17:46 ` Colin King
2017-07-10 21:01 ` Jonathan Cameron [this message]
2017-07-10 21:01   ` Jonathan Cameron

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=20170710220123.35e77c88@kernel.org \
    --to=jic23@kernel.org \
    --cc=anders@chargestorm.se \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=pmeerw@pmeerw.net \
    --cc=wenyou.yang@atmel.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: link
Be 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.