public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Colin King <colin.king@canonical.com>
Cc: linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: byd: make array seq static, reduces object code size
Date: Thu, 31 Aug 2017 09:31:04 -0700	[thread overview]
Message-ID: <20170831163104.GA14370@dtor-ws> (raw)
In-Reply-To: <20170831124730.27047-1-colin.king@canonical.com>

On Thu, Aug 31, 2017 at 01:47:30PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't populate the array seq on the stack, instead make it static.
> Makes the object code smaller by over 1100 bytes:
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>    6152	   1216	     64	   7432	   1d08	drivers/input/mouse/byd.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>    4974	   1280	     64	   6318	   18ae	drivers/input/mouse/byd.o
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thank you.

> ---
>  drivers/input/mouse/byd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/mouse/byd.c b/drivers/input/mouse/byd.c
> index b27aa637f877..b64b81599f7e 100644
> --- a/drivers/input/mouse/byd.c
> +++ b/drivers/input/mouse/byd.c
> @@ -344,7 +344,7 @@ static int byd_reset_touchpad(struct psmouse *psmouse)
>  	u8 param[4];
>  	size_t i;
>  
> -	const struct {
> +	static const struct {
>  		u16 command;
>  		u8 arg;
>  	} seq[] = {
> -- 
> 2.14.1
> 

-- 
Dmitry

      reply	other threads:[~2017-08-31 16:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 12:47 [PATCH] input: byd: make array seq static, reduces object code size Colin King
2017-08-31 16:31 ` Dmitry Torokhov [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=20170831163104.GA14370@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.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