From nobody Fri Apr 3 06:28:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 843E213AA2F; Tue, 17 Feb 2026 22:31:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771367462; cv=none; b=LEIsHI3YQeWfmJLiMafOYORWfGCryoBvMbTkfn1G77qQMCDqTBSKNHF2JBA/WUk9M5Y2m/JM8Lr4QvXSPMcCZ3n37VFt6JsXcvYgH4UOlj4SmGzL4aZqGh7N0vhczfyv6Hlz9v9i9IEkWMyYz2lHC7Fqm4x60yNHEtQay5byrnc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771367462; c=relaxed/simple; bh=SaaFcH6Oc3jCFSVMmx10cF8ncRdwRf8Ta+7Tz1QJAk4=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=oGUD3e9iuP1MBcOCZOqxS62mfUH5f0MYHb0RuHuubItHY7Lg5TVDyllcVtup9EhyHr8qbnAP2q4RJTQzvck74g0syT4IxeYOUMK6kR9apNFOT4Wt8M9L4KQEEHh82FYM091V8f4YxtS70H/mJUAy2N2nz/VHn8ypZcP4wnoYY3k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fj/SQQTO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fj/SQQTO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF351C4CEF7; Tue, 17 Feb 2026 22:30:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771367462; bh=SaaFcH6Oc3jCFSVMmx10cF8ncRdwRf8Ta+7Tz1QJAk4=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=fj/SQQTOupipFBHak4x5z7L7flqm0zVy+U5fU1vEOY5RRLtwEct8yWTlitXXqmbs+ YHeKKT3UprB8u+vKjGyJLaSu4F4SxH3FyBl453fEcfHkI2dU0eebWwPJu/cuIWLhzh D0lqVOxFF+uVb8X4HQwhH/TUkyrG6VauKQPgKZ81o54nu047R2pn0qF6hUNAxt1whk c0IHDAPfcIH6r5IH+j6LnYAKmHsCMTxbmPpv8mQCpK8gvlgluP6P9kwykHIQtvkEEF JCn099FPpmSGBu8bL3RFWj/Vrspg6sn5akQ7x6BoHNh7YG3c0iE67j6F9NtfvMIkES Brp7oIXxiianw== Message-ID: Date: Tue, 17 Feb 2026 23:30:58 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH RFC 08/10] driver core: make struct class groups members constant arrays From: Heiner Kallweit To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Jason Gunthorpe , Leon Romanovsky , Alexandre Belloni Cc: driver-core@lists.linux.dev, Linux Kernel Mailing List , linux-rdma@vger.kernel.org, linux-rtc@vger.kernel.org References: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org> Content-Language: en-US In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org> Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Constify the groups arrays, allowing to assign constant arrays. Signed-off-by: Heiner Kallweit --- include/linux/device/class.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/device/class.h b/include/linux/device/class.h index 65880e60c72..2079239a5aa 100644 --- a/include/linux/device/class.h +++ b/include/linux/device/class.h @@ -50,8 +50,8 @@ struct fwnode_handle; struct class { const char *name; =20 - const struct attribute_group **class_groups; - const struct attribute_group **dev_groups; + const struct attribute_group *const *class_groups; + const struct attribute_group *const *dev_groups; =20 int (*dev_uevent)(const struct device *dev, struct kobj_uevent_env *env); char *(*devnode)(const struct device *dev, umode_t *mode); --=20 2.53.0