All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Colin Ian King <colin.i.king@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: dlink-dir685-touchkeys: Make array bl_data static const
Date: Thu, 06 Oct 2022 09:44:56 +0200	[thread overview]
Message-ID: <87a669o0p3.fsf@baylibre.com> (raw)
In-Reply-To: <20221005154852.320056-1-colin.i.king@gmail.com>

On Wed, Oct 05, 2022 at 16:48, Colin Ian King <colin.i.king@gmail.com> wrote:

> Don't populate the read-only array bl_data on the stack but instead
> make it static const. Also makes the object code a little smaller.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

> ---
>  drivers/input/keyboard/dlink-dir685-touchkeys.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/dlink-dir685-touchkeys.c b/drivers/input/keyboard/dlink-dir685-touchkeys.c
> index a69dcc3bd30c..7db7fb175869 100644
> --- a/drivers/input/keyboard/dlink-dir685-touchkeys.c
> +++ b/drivers/input/keyboard/dlink-dir685-touchkeys.c
> @@ -64,7 +64,7 @@ static int dir685_tk_probe(struct i2c_client *client,
>  {
>  	struct dir685_touchkeys *tk;
>  	struct device *dev = &client->dev;
> -	u8 bl_data[] = { 0xa7, 0x40 };
> +	static const u8 bl_data[] = { 0xa7, 0x40 };
>  	int err;
>  	int i;
>  
> -- 
> 2.37.3

  reply	other threads:[~2022-10-06  7:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 15:48 [PATCH] Input: dlink-dir685-touchkeys: Make array bl_data static const Colin Ian King
2022-10-06  7:44 ` Mattijs Korpershoek [this message]
2022-10-06  9:22 ` Linus Walleij

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=87a669o0p3.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=colin.i.king@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linus.walleij@linaro.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 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.