Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (nzxt-smart2) make array detect_fans_report static const

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>

authored by

Colin Ian King and committed by
Guenter Roeck
00f5117c 660d1878

+1 -1
+1 -1
drivers/hwmon/nzxt-smart2.c
··· 583 583 static int init_device(struct drvdata *drvdata, long update_interval) 584 584 { 585 585 int ret; 586 - u8 detect_fans_report[] = { 586 + static const u8 detect_fans_report[] = { 587 587 OUTPUT_REPORT_ID_INIT_COMMAND, 588 588 INIT_COMMAND_DETECT_FANS, 589 589 };