From: Guenter Roeck <linux@roeck-us.net>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Aleksandr Mezin <mezin.alexander@gmail.com>,
Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] hwmon: nzxt-smart2: make array detect_fans_report static const
Date: Sun, 9 Jan 2022 17:11:25 -0800 [thread overview]
Message-ID: <20220110011125.GA841668@roeck-us.net> (raw)
In-Reply-To: <20220109194558.45811-1-colin.i.king@gmail.com>
On Sun, Jan 09, 2022 at 07:45:58PM +0000, Colin Ian King wrote:
> Don't populate the read-only array detect_fans_report on the stack but
> instead it static const. Also makes the object code a little smaller.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/nzxt-smart2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/nzxt-smart2.c b/drivers/hwmon/nzxt-smart2.c
> index 6e67da766969..dd892ff5a3e8 100644
> --- a/drivers/hwmon/nzxt-smart2.c
> +++ b/drivers/hwmon/nzxt-smart2.c
> @@ -583,7 +583,7 @@ static int set_update_interval(struct drvdata *drvdata, long val)
> static int init_device(struct drvdata *drvdata, long update_interval)
> {
> int ret;
> - u8 detect_fans_report[] = {
> + static const u8 detect_fans_report[] = {
> OUTPUT_REPORT_ID_INIT_COMMAND,
> INIT_COMMAND_DETECT_FANS,
> };
prev parent reply other threads:[~2022-01-10 1:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-09 19:45 Colin Ian King
2022-01-10 1:11 ` Guenter Roeck [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=20220110011125.GA841668@roeck-us.net \
--to=linux@roeck-us.net \
--cc=colin.i.king@gmail.com \
--cc=jdelvare@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mezin.alexander@gmail.com \
/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
Powered by JetHome