LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: logitech-hidpp: HID: make const array consumer_rdesc_start static
Date: Wed, 22 May 2019 13:19:30 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.YFH.7.76.1905221319220.1962@cbobk.fhfr.pm> (raw)
In-Reply-To: <20190510131722.5023-1-colin.king@canonical.com>

On Fri, 10 May 2019, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't populate the array consumer_rdesc_start on the stack but instead
> make it static. Makes the object code smaller by 88 bytes.
> 
> Before:
>    text	   data	    bss	    dec	    hex	filename
>   59155	   9840	    448	  69443	  10f43	drivers/hid/hid-logitech-hidpp.o
> 
> After:
>    text	   data	    bss	    dec	    hex	filename
>   59003	   9904	    448	  69355	  10eeb	drivers/hid/hid-logitech-hidpp.o
> 
> (gcc version 8.3.0, amd64)
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/hid/hid-logitech-hidpp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
> index 72fc9c0566db..df960491e473 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -2862,7 +2862,7 @@ static u8 *hidpp10_consumer_keys_report_fixup(struct hidpp_device *hidpp,
>  					      u8 *_rdesc, unsigned int *rsize)
>  {
>  	/* Note 0 terminated so we can use strnstr to search for this. */
> -	const char consumer_rdesc_start[] = {
> +	static const char consumer_rdesc_start[] = {
>  		0x05, 0x0C,	/* USAGE_PAGE (Consumer Devices)       */
>  		0x09, 0x01,	/* USAGE (Consumer Control)            */
>  		0xA1, 0x01,	/* COLLECTION (Application)            */

Applied, thanks Colin.

-- 
Jiri Kosina
SUSE Labs


      reply	other threads:[~2019-05-22 11:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 13:17 Colin King
2019-05-22 11:19 ` Jiri Kosina [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=nycvar.YFH.7.76.1905221319220.1962@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] HID: logitech-hidpp: HID: make const array consumer_rdesc_start static' \
    /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

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).