All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio:adc:at91-sama5d2: make array startup_lookup static to reduce code size
Date: Sun, 09 Jul 2017 18:14:41 +0000	[thread overview]
Message-ID: <20170709191441.54c248f2@kernel.org> (raw)
In-Reply-To: <20170707160835.19080-1-colin.king@canonical.com>

On Fri,  7 Jul 2017 17:08:35 +0100
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Making the const array startup_lookup static rather having it on the
> stack saves 69 bytes. Add in missing int 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>
Applied to the togreg branch of iio.git and pushed out as testing.

Thanks,

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,


WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio:adc:at91-sama5d2: make array startup_lookup static to reduce code size
Date: Sun, 9 Jul 2017 19:14:41 +0100	[thread overview]
Message-ID: <20170709191441.54c248f2@kernel.org> (raw)
In-Reply-To: <20170707160835.19080-1-colin.king@canonical.com>

On Fri,  7 Jul 2017 17:08:35 +0100
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Making the const array startup_lookup static rather having it on the
> stack saves 69 bytes. Add in missing int 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>
Applied to the togreg branch of iio.git and pushed out as testing.

Thanks,

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,


  reply	other threads:[~2017-07-09 18:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07 16:08 [PATCH] iio:adc:at91-sama5d2: make array startup_lookup static to reduce code size Colin King
2017-07-07 16:08 ` Colin King
2017-07-09 18:14 ` Jonathan Cameron [this message]
2017-07-09 18:14   ` Jonathan Cameron
2017-07-10 16:56 ` [PATCH] iio:adc:at91-sama5d2: make array startup_lookup static Colin King
2017-07-10 16:56   ` Colin King
2017-07-10 20:59   ` Jonathan Cameron
2017-07-10 20:59     ` Jonathan Cameron
2017-07-10 21:34     ` Colin Ian King
2017-07-10 21:34       ` Colin Ian 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=20170709191441.54c248f2@kernel.org \
    --to=jic23@kernel.org \
    --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@microchip.com \
    --cc=pmeerw@pmeerw.net \
    /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.