projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
660d187
)
hwmon: (nzxt-smart2) make array detect_fans_report static const
author
Colin Ian King
<colin.i.king@gmail.com>
Sun, 9 Jan 2022 19:45:58 +0000
(19:45 +0000)
committer
Guenter Roeck
<linux@roeck-us.net>
Mon, 10 Jan 2022 01:10:58 +0000
(17:10 -0800)
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>
Link:
https://lore.kernel.org/r/20220109194558.45811-1-colin.i.king@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/nzxt-smart2.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/nzxt-smart2.c
b/drivers/hwmon/nzxt-smart2.c
index 6e67da766969d5def99355791b0a583bbfbe71ab..dd892ff5a3e850a169d941df230f49c8485a00ea 100644
(file)
--- 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,
};