From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
Kees Cook <keescook@chromium.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.6.y 2/3] hwmon: (nct6775-core) Explicitly initialize nct6775_device_names indexes
Date: Thu, 3 Dec 2026 22:34:55 -0500 [thread overview]
Message-ID: <20261204033437.2433648-2-sashal@kernel.org> (raw)
In-Reply-To: <20261204033437.2433648-1-sashal@kernel.org>
From: Guenter Roeck <linux@roeck-us.net>
[ Upstream commit 2792fc8f8c834e035b09be42d445085bd8bcac7e ]
Changing the "kinds" enum start value to be 1-indexed instead of
0-indexed caused look-ups in nct6775_device_names[] to be misaligned or
off the end.
Initialize the string list with explicit indexes.
Cc: Rob Herring <robh@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Fixes: 10a0575ea09d ("hwmon: nct6775-i2c: Use i2c_get_match_data()")
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Stable-dep-of: 73d857b33cdf ("hwmon: (nct6775) Fix target temp and tolerance for NCT6106/6116/6126")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/nct6775-core.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/hwmon/nct6775-core.c b/drivers/hwmon/nct6775-core.c
index 62545e1867977..5f335a2046ad2 100644
--- a/drivers/hwmon/nct6775-core.c
+++ b/drivers/hwmon/nct6775-core.c
@@ -63,19 +63,19 @@
/* used to set data->name = nct6775_device_names[data->sio_kind] */
static const char * const nct6775_device_names[] = {
- "nct6106",
- "nct6116",
- "nct6775",
- "nct6776",
- "nct6779",
- "nct6791",
- "nct6792",
- "nct6793",
- "nct6795",
- "nct6796",
- "nct6797",
- "nct6798",
- "nct6799",
+ [nct6106] = "nct6106",
+ [nct6116] = "nct6116",
+ [nct6775] = "nct6775",
+ [nct6776] = "nct6776",
+ [nct6779] = "nct6779",
+ [nct6791] = "nct6791",
+ [nct6792] = "nct6792",
+ [nct6793] = "nct6793",
+ [nct6795] = "nct6795",
+ [nct6796] = "nct6796",
+ [nct6797] = "nct6797",
+ [nct6798] = "nct6798",
+ [nct6799] = "nct6799",
};
/* Common and NCT6775 specific data */
--
2.53.0
next prev parent reply other threads:[~2026-12-04 3:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 13:09 FAILED: patch "[PATCH] hwmon: (nct6775) Fix target temp and tolerance for" failed to apply to 6.6-stable tree gregkh
2026-12-04 3:34 ` [PATCH 6.6.y 1/3] hwmon: (nct6775-platform) Explicitly initialize nct6775_sio_names indexes Sasha Levin
2026-12-04 3:34 ` Sasha Levin [this message]
2026-12-04 3:34 ` [PATCH 6.6.y 3/3] hwmon: (nct6775) Fix target temp and tolerance for NCT6106/6116/6126 Sasha Levin
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=20261204033437.2433648-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=keescook@chromium.org \
--cc=linux@roeck-us.net \
--cc=robh@kernel.org \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox