public inbox for linux-kernel@vger.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>,
	Hans de Goede <hdegoede@redhat.com>,
	Rob Herring <robh@kernel.org>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: accel: make array init_data static to reduce code size
Date: Sun, 9 Jul 2017 19:12:02 +0100	[thread overview]
Message-ID: <20170709191202.29cd4c3f@kernel.org> (raw)
In-Reply-To: <20170707155519.18736-1-colin.king@canonical.com>

On Fri,  7 Jul 2017 16:55:19 +0100
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Making the const array init_data static rather having it on the
> stack saves us a couple hundreds of bytes:
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>    3175	    848	      0	   4023	    fb7	drivers/iio/accel/da311.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>    2860	    936	      0	   3796	    ed4	drivers/iio/accel/da311.o
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.

Thanks,

Jonathan
> ---
>  drivers/iio/accel/da311.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/accel/da311.c b/drivers/iio/accel/da311.c
> index 537cfa8b6edf..c0c1620d2a2f 100644
> --- a/drivers/iio/accel/da311.c
> +++ b/drivers/iio/accel/da311.c
> @@ -139,7 +139,7 @@ static int da311_register_mask_write(struct i2c_client *client, u16 addr,
>  /* Init sequence taken from the android driver */
>  static int da311_reset(struct i2c_client *client)
>  {
> -	const struct {
> +	static const struct {
>  		u16 addr;
>  		u8 mask;
>  		u8 data;

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07 15:55 [PATCH] iio: accel: make array init_data static to reduce code size Colin King
2017-07-09 18:12 ` Jonathan Cameron [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=20170709191202.29cd4c3f@kernel.org \
    --to=jic23@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=hdegoede@redhat.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=pmeerw@pmeerw.net \
    --cc=robh@kernel.org \
    /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