From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796355300; b=qskynSOgLCCBdCOlWazo6RXGLdFcBkdnWinLYq3WPY4a37JxXzdxzOo0EM7zwTB8we+M D9J8avPTemf+mCZGQBID+LmGQdcPtmRSF8CVlfVg4pLTuz9l3POYRFjvXLn/hIjiTV3NL c1L2IHuFMs7S4H8/au9eNgMW1EYBF3zkWq8LSmXZ/dOplXjbgY3nb8POVOs4q3+QlWpjG iloFv3O68gcJ05cHgQ/u5nhLEnalypqIoPzGOALoCGCYSI4HjJLNvz1UDues0vYdK71l0 voChGq0Z4qBkzuYhfuFb/JF7UkjyWh1XMFcys29qDaLNlYLbfE8MMBtcdah1qtFwOHA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796355300; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=D5D9nu7uQ+qCpVJgVLgPj17FEXcRLam4shUjtb1raAQ=; b=XpB5JFtj+MD1K7aQEF5tRN0tYlZzSbpcGsusVodHmKEOC7gc8k/viJ/sy9pSMcLC/wAj pX+g30ekE/l9x3WKntW1qxpsUFKRyZwp+W6x+RMapWLuv/TsS7Qtd8iTAohERtHo1z1P3 ZlqVtjcV39GB3jbTCrz648etWfstFWGmCS/Rsc7qH3yloqdb7jqo+Cso68+tuKUtUwJz7 QYsesLQAlSiHK1jQleFBAaNZfyr9iUAb1x/kihRskuybZIBSPiQFjJqMCes+F2IdQy1jo eWl20QMehLWYSbEq4WBASO/Swq/4Z4kiADKquLAnApM5eRuyyBgMKKi6gwGwZM1kZNQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VrfY73lb; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B65A606A330 for ; Fri, 4 Dec 2026 03:35:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VrfY73lb Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79DA71F0092C; Fri, 4 Dec 2026 03:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796355300; bh=D5D9nu7uQ+qCpVJgVLgPj17FEXcRLam4shUjtb1raAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VrfY73lbZZ6S9v5E6uQDQ7YFxXH4b9OC+KuN0dtJe93PSc0H0oZFBdSjXkFPVkdc5 mvfs0QQoae02uCltxkjdLu6vug4tqJXVcGSt5XrMjQn2VAUOflUasOyVrMVdDD6tZE ix2kI6Gap8z/sM04AFjyUERAJKfHEw+4cDGh084MFBfgck3PSSiutBOYeKpVZneeyo R+FkMFI4dFbUed3kbZwI4eDJAVA+xCvydhjYIDqPpjTwsWRFH7xl/XnML52rsAlUGo fd2+akrn2iSDuCuVrgEyvEXbA0rcG8BAztTNu5/loAgI5lGe4PHHKnF/sSSTM97XUL E47k58f16u5vw== From: Sasha Levin To: stable@vger.kernel.org Cc: Guenter Roeck , Rob Herring , Kees Cook , Sasha Levin 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 Message-ID: <20261204033437.2433648-2-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261204033437.2433648-1-sashal@kernel.org> References: <2026120242-pacifism-dropper-efea@gregkh> <20261204033437.2433648-1-sashal@kernel.org> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Guenter Roeck [ 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 Cc: Kees Cook Fixes: 10a0575ea09d ("hwmon: nct6775-i2c: Use i2c_get_match_data()") Reviewed-by: Rob Herring Signed-off-by: Guenter Roeck Stable-dep-of: 73d857b33cdf ("hwmon: (nct6775) Fix target temp and tolerance for NCT6106/6116/6126") Signed-off-by: Sasha Levin --- 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