linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Colin King <colin.king@canonical.com>,
	Richard Purdie <rpurdie@rpsys.net>, Pavel Machek <pavel@ucw.cz>,
	linux-leds@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] leds: aat1290: make array max_mm_current_percent static const
Date: Thu, 24 Aug 2017 22:38:49 +0200	[thread overview]
Message-ID: <c33bd764-6804-f811-559b-9ea0624b5501@gmail.com> (raw)
In-Reply-To: <20170824130055.23642-1-colin.king@canonical.com>

Hi Colin,

Thanks for the path set, applied.

Best regards,
Jacek Anaszewski

On 08/24/2017 03:00 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't populate the array max_mm_current_percent on the stack, instead
> make it static const.  Makes the object code smaller by over 280 bytes:
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>    7225	   1936	     64	   9225	   2409	./drivers/leds/leds-aat1290.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>    6847	   2032	     64	   8943	   22ef	./drivers/leds/leds-aat1290.o`
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/leds/leds-aat1290.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/leds/leds-aat1290.c b/drivers/leds/leds-aat1290.c
> index a21e19297745..35fcb0ca9092 100644
> --- a/drivers/leds/leds-aat1290.c
> +++ b/drivers/leds/leds-aat1290.c
> @@ -314,8 +314,10 @@ static void aat1290_led_validate_mm_current(struct aat1290_led *led,
>  static int init_mm_current_scale(struct aat1290_led *led,
>  			struct aat1290_led_config_data *cfg)
>  {
> -	int max_mm_current_percent[] = { 20, 22, 25, 28, 32, 36, 40, 45, 50, 56,
> -						63, 71, 79, 89, 100 };
> +	static const int max_mm_current_percent[] = {
> +		20, 22, 25, 28, 32, 36, 40, 45, 50, 56,
> +		63, 71, 79, 89, 100
> +	};
>  	int i, max_mm_current =
>  			AAT1290_MAX_MM_CURRENT(cfg->max_flash_current);
>  
> 

      parent reply	other threads:[~2017-08-24 20:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-24 13:00 [PATCH 1/4] leds: aat1290: make array max_mm_current_percent static const Colin King
2017-08-24 13:00 ` [PATCH 2/4] leds: lp5521: make several arrays " Colin King
2017-08-24 13:00 ` [PATCH 3/4] leds: lp5562: " Colin King
2017-08-24 13:00 ` [PATCH 4/4] leds: lp8501: " Colin King
2017-08-24 20:38 ` Jacek Anaszewski [this message]

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=c33bd764-6804-f811-559b-9ea0624b5501@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rpurdie@rpsys.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 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).