From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70E6F2571D7 for ; Sun, 1 Mar 2026 12:31:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772368319; cv=none; b=WlocWcyjKN7LcvGoz+BaqNpPbybdxSJL/5stqtuSGzYx+rIfkGd27OgnnpQn+Thr6MeDwaNsrJafcJMfpYJySlhluvdpAdbz9K40jKWFszGrsWY2kHSAqjHboke8qiYwRQbYXzyMzjvcrX3Y37Xp/H0CySN18pOI2b6QUyQvYrQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772368319; c=relaxed/simple; bh=SaaFcH6Oc3jCFSVMmx10cF8ncRdwRf8Ta+7Tz1QJAk4=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=EvUjTeqZxc8Yddw0lfVHR6ILSkm+qrc/iXvr1EsOLbJVpQn7iFAHUXnoPN7z6ETGEZAkLkwEAmIMHX78R3JI2niLbXugcZGCOd3yWLR2puw+g1p8w+AaBZoYnYMt59OPS19ce7YpzJA7jvd7R79R7ERhxMdovUpBkpU/YH+kPQU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bmP2hP1t; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bmP2hP1t" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4838c15e3cbso30857315e9.3 for ; Sun, 01 Mar 2026 04:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772368317; x=1772973117; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=gOAYb0Oy7G9A/bRMOH/gRXdzCm1K7chfFKNZ0qHtpLQ=; b=bmP2hP1tMNRXvfOye/mvAYYwUXtNHvm4pjeymiMD7Cx4L8hWgBUZASQseofXZvdBLc XONVn/f54/kMJ4p7RY78oB+WW0f40jKPSl0M4ZIrEPE3lZOlQyiBcCfVal9fqgv7iUNW cXBE08eWC2Pfqoh5IyMTL5W0sw3cBWTknh2JtDETwTGOXG02NU2Q/av/5VinpGWmWyKK yMXJvRz1Q2fO1cWT50K7dl5VaQVRvaEjlAt801uS/4ktCVRaO58jwzekDRQogblkiZRu OphxBWUX/EQvbNbIjgSIWSGk3DT/yGlPbvB1xkVZF3SG5mVpZ6MqWSoyz/2pPg1Mn00P 6Xtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772368317; x=1772973117; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gOAYb0Oy7G9A/bRMOH/gRXdzCm1K7chfFKNZ0qHtpLQ=; b=YuaEgmErQ6beoQCwMxA8dCEK4l2TY6wIe5o7keE4eg6aqWHXyq7JtIK2zUtGWgBD8N DPHE6SkVDzZD03z24LANn+jsE3xtcHJbXVc0/sceWxJH6gZugvCe5TL/OwZSbB+p+l/y 5TmXJxSawIekO5djZ7TqzTENls4+Rqll3x+rU8A5TraDPgnQCsnKLOuCSJBa5OaS16pR AD0ElDKbj13YK/03GcVFdvZMeazR13F/+1HncVq11XJijKy9q1OZmgcFoRMkBqWmkSym w/AcaGkU5hYhpWxYufMzGwtRY5jdxFBr5Y/tD8g+kFqmFkLPGL+eCPO5DYBLfyBj0A2B BTGg== X-Forwarded-Encrypted: i=1; AJvYcCUnW+ogLBzX6yI/WIRyq0kgSiB5FDFFJHaUOACVy4QFkPPDQpURunxpg8+aBAnOrGJVrVAcBy1qi/38rSI=@vger.kernel.org X-Gm-Message-State: AOJu0Yw9fJSUqOjgY9yn2NeTWa12KHHzzd7XGgJWSoVKSQYwAzrkO3ao pVQj2jgQypG00z62HBpkpSYHh3fIAOaGOsvk3MWj4QRsXI0TJyuGdwjm X-Gm-Gg: ATEYQzzQpvcAhmlJSzsrY4hZVPpDEE5BY5eEzVxwH7nCXniFFDJEuCugxizzysRPSn1 kdgCSdHsZ6F0uh5vU6zDgtabPHMeHcWaBiGvVur8l+oi5qJZXxZ3EyD0JmVg42y+KhA+w2hcGf6 zN93cDJJmCKw7jLt9rJhfW2yOSZuvXFPKqrXRGGqy9jwnpGEoVdgx9Gi/jjdxdyNTf+aVYOg/27 dzO6XDTZjndKY6fCD/LjVgeTDdmmyszejvUdU2DR/6FlPJPBGZGLagV16Q/RHoDqKS9fNbcs7mT kfYO3oWWao0e9NqT9uQAqSxq6dCsJycqDW+Yxue9eV9Fr/pedKSs8HWMp3ipXwtYSoUpLHSFg40 yMUbsN8B0t5TUaYkbTCeNk58Akdom1/6qVM0T7c7562EKSeuzmpevXzR6a8+lTPUecSN9K/DW3S AYRx+DyMdrZLlwaZ+LJXDDZrxeWVLmQ+Oa0aBrcSb6CSJKDaNrJxrArNIYbD2KZIudvcb86u1Kd jLhGAicztbqhh0mopjy9ZWMnsNEHOwUG/PkRzNTnyYMixhnaJz4FAWkCxAuyF/Ijw== X-Received: by 2002:a05:600c:3b18:b0:483:7631:befa with SMTP id 5b1f17b1804b1-483c9bc55d6mr146296345e9.5.1772368316663; Sun, 01 Mar 2026 04:31:56 -0800 (PST) Received: from ?IPV6:2003:ea:8f04:4d00:b8f3:c9fe:a208:3449? (p200300ea8f044d00b8f3c9fea2083449.dip0.t-ipconnect.de. [2003:ea:8f04:4d00:b8f3:c9fe:a208:3449]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483c3b346ccsm202763185e9.2.2026.03.01.04.31.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Mar 2026 04:31:56 -0800 (PST) Message-ID: <7ff56b07-09ca-4948-b98f-5bd37ceef21e@gmail.com> Date: Sun, 1 Mar 2026 13:31:56 +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 3/3] driver core: make struct class groups members constant arrays From: Heiner Kallweit To: Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich Cc: driver-core@lists.linux.dev, Linux Kernel Mailing List References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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; - 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; int (*dev_uevent)(const struct device *dev, struct kobj_uevent_env *env); char *(*devnode)(const struct device *dev, umode_t *mode); -- 2.53.0