Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp495348lqi; Thu, 7 Mar 2024 03:35:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXwRhHEgJ7DS+IBLpZlqh8ICst83bkbiMi2PJ4iCn92pb2AJWyvw3yaIqFsrLD5xO4wv6y+lIDuQy5rtmBFDxM7yoImS2soeNMcheQi8Q== X-Google-Smtp-Source: AGHT+IH9a+agrWMC27BD39PYNeOQyYMEJBEqm9/kZcbEyQfI1I7F1b5/KfmMBD+mDRqW4LMutw4q X-Received: by 2002:a9d:62c2:0:b0:6e4:f92f:811d with SMTP id z2-20020a9d62c2000000b006e4f92f811dmr7355457otk.34.1709811313836; Thu, 07 Mar 2024 03:35:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709811313; cv=pass; d=google.com; s=arc-20160816; b=GQwn2EWlZQkQK9GgvU2C6Yjw2zihWesxjlTHwCfT4ZFcpLZR2xWV9VBp7NCbAdOkqp cbgjpbHbM+qjKZkxfsC2+2Cx3T+sMhvkwD5dJ6/6URoEQ0y1+016ibnZx6wL+OTW4aLj R0/sePYt0UOAIWY8hU7m8ms1gdikJFYyIVRmRsYQrVYXPHsDMpMdflFnaCHHo1LDxUay pwSgr6Eb1QNDsPF1l7j2j0IZL/rNgiqDzaW67s62twWsoACdmYndPFYoYD8NR0vWy9RR 4MDz5cEN/4i4RPj5ytntt5BkfmiuQ1uRCIcrsK6AAFNDT7gX8B+rp20KbgwETBTAig32 VZZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :dkim-signature:from; bh=ZbOk/Gqyi9LltFIdUYglAWdVxEfqass0k2Pwo4RSlsc=; fh=g56HBz2Cz8SyR4XVpvYi7noNfuEnVla7bTQJY2uGwpk=; b=GSPbce0QhKBaK+koTYlAhI8EvopU/vx5AznMEPKX5L965fghEwYt0ya9nBDctDFOQC eq0qV2HrYW+9GUIjsA+A7taBY3fN5XkZnEKjc7BQutznTd9tFTrLsR5VPbObJht3Vyp+ vgvgETyJO2HqgDETH8MZOnFNu4+5L2XWI9tk0YgEv3V+w4AVXDqD6zrcDGm8egLgq6Yi MwLo9IlhpGjVoavBJ4AV+MOO+l0NJwq9FP1qvi516vAqk4Jp1wEaVDRoIw90Ipc5nx0X 8Kn5Pm73AwfuXYgIX/jF6z2+c+lGRgcYUwuCxGQXr/hwtxbkbmoTKsFJp/uNJGfdD0Nr LwIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b="Q7/JDQz0"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-92903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j32-20020a635520000000b005dc918631dfsi14038006pgb.122.2024.03.07.03.35.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 03:35:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b="Q7/JDQz0"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-92903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 47E48B2A070 for ; Tue, 5 Mar 2024 19:41:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21ADC12B150; Tue, 5 Mar 2024 19:40:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="Q7/JDQz0" Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (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 BB67B86AC3; Tue, 5 Mar 2024 19:40:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709667631; cv=none; b=AKxEarD3G1FRXU1Px9rBdSGNZ9HCqJ1IwsvdN8PYcCuFswIirqg1C7UxeQYOGefEaz5c+HquHAV7NzGrR+0X0PRJ/QaIuuLWUPENwT0y5OhgPEaiMU/pTf0JmHLhaqzQOFI1oKneJhbNsYytHI6IsPShzaRxQYc0Viai6HDEx2g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709667631; c=relaxed/simple; bh=aYEnoEaK8lvdazf1apUl70SZAkWUVo6cPnMSWocdxf0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=C7uykNqpxahpboKfGmy+tcg+BYcHHKWWlYDIXj7TOrBOwqdeaP3NmDqqV6k61FUPKVHL5GX3iS7YxuhSVXoJ04+uhVX1Sju0qn1m7h3364CDadz+4IyHdM4D/QUBLk+OFNBfWEQnkOB3BsMDGdQifPo90DUeMvIotwEz6wr7b0Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b=Q7/JDQz0; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6e57a3bf411so3654246b3a.0; Tue, 05 Mar 2024 11:40:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709667629; x=1710272429; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:dkim-signature:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZbOk/Gqyi9LltFIdUYglAWdVxEfqass0k2Pwo4RSlsc=; b=t/hMEoDKfhkXEBnAf3TKOwwwbFG7lV31pdbS+DFdQLr5LW8kGqsbbDVUPIH0gJUyex ggWaCNFjJdepg4RElwOhbvXY20EMGMcpTLHw6NuLsS/iA2RUYVDYJn4L6dQMDbH5lQhQ MBu4rgXH5+g9/VWxAobN67CzxeA3RC/yTyFQkRGHTfLFNx/2t12A9htD7FbnsgH5NCaZ HyIx4lCRMR7HMrl092f2+yx1p18Y27TrZSL/k1nmiDvGFMr+Y9N+hLhrX2vgpLTH4nye PrbQsISs71Y4Eq3kjPiNhqidkDbESxOq0CSfBCpqsx991w53ULimb6AetK7YSxLfvMXt N9dw== X-Forwarded-Encrypted: i=1; AJvYcCX+Qa3yZcigJ2IgIis9ARWgf6XYKVCVC7bRWliiVb0w99rjrrKXkhrQ2dsQol6Jfvqo6n4eAlRn+2nROI/+2+u3cnUxN4sQLw+TqajO X-Gm-Message-State: AOJu0YxNG3CLJX4+jgbmb51qXjidJ/eDhjSckGI7jTD3042rnkloUvci jh8ZYcSggN81an0cVzUrGiA0E99NePLWyLuHNk2i84rFYRFKSVXOscrrs0txdV0rzA== X-Received: by 2002:a05:6a00:896:b0:6e6:4946:985f with SMTP id q22-20020a056a00089600b006e64946985fmr474334pfj.11.1709667628961; Tue, 05 Mar 2024 11:40:28 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id q23-20020aa79837000000b006e5e93e7854sm6012875pfl.151.2024.03.05.11.40.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 11:40:28 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1709667627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZbOk/Gqyi9LltFIdUYglAWdVxEfqass0k2Pwo4RSlsc=; b=Q7/JDQz0+772PuNm4IuQFgQq5HWmlpCGPK9jCCmEnGy+qZ7vHcRZp7vqEei/b9blQuADE9 nY7L/v0vlHZkxCT0Le9+pBUFye2yfZRrx0OLzz7UNkMmI3X5nBC1bl8orn0/fEqeIPlFU4 UvLS0mFfWP/A0wlNTU5abQHLxOI6EsAjYKe8oUI9GmqYQqqoEkde+O+RR9MemAMXOHFsOW rphaMwfDQlApO/961cvnYIpS8u/eBBCy9QMqbvZebMySTs6U54/Le/rYO/DWLdwFB3NfnQ xENSF0dtJQ0cpygKUsLrIdFS+Lah9dg+12btp2r3IAQHcnXk7MkCK3ZngZ6tkw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Tue, 05 Mar 2024 16:40:23 -0300 Subject: [PATCH] remoteproc: make rproc_class constant Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240305-class_cleanup-remoteproc2-v1-1-1b139e9828c9@marliere.net> X-B4-Tracking: v=1; b=H4sIACZ152UC/x3MQQqDMBBA0avIrA0ko13Eq0iRECftgE3CTFsE8 e4Gl2/x/wFKwqQwdQcI/Vm55AbXdxDfIb/I8NoMaHG0g32YuAXVJW4U8q8aoU/5UpUS0SSHDv0 wJu8ttL4KJd7v9/w8zwveuXDAawAAAA== To: Bjorn Andersson , Mathieu Poirier Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1785; i=ricardo@marliere.net; h=from:subject:message-id; bh=aYEnoEaK8lvdazf1apUl70SZAkWUVo6cPnMSWocdxf0=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl53UoF5WUvPGlq4VL+7i6YHDw3CvmBCkzhUVPg vKBiqxKdSKJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZed1KAAKCRDJC4p8Y4ZY pipSEACwnMbkOr2h9S8BDhLWgU2C57CHwLERMTpqJlUFRTUjanlY57NEbpYFjSuJ4BUr0p0B4B1 fpne2elnneCrI0fJ+A8qU05viHGeSBDdkyVXykbDKZboyP5w/GvsYe7jpEWGYPFar9WqfmW+ch7 dQO0UnSSEmdVub8ZlmJ4Lo/UmF2R5qPJSrgfJ/TTcXo7oFRf03ZbMwaoryZEoTE3kxbRcnhOR/7 kouVynUlCLalM4cLVqOvF5KDbCgy2rai9vOWFjaUCz8/Sj/L9pnobiBcNRdfGFwPijWXkC9Bngl IEOON0cxGxP1PgKGbed3CGh0RXrNhHl44u0aureCUsajpejt2JDq1MRl8bfGA0nT9PmIe4Wm8tt IPjHklHiYcoZxMM9KlyWvZxJwRN4+/4iwCNlD5nHBLRPuYcP5ea9FR/cjcYMUS4kPf8wFu+0r9C 8J781ru5vxPHSdsanUFDi1tnkNV/kmyWa+ggjwywWai1aUqFLozhlaUMOaBwD1/k5M16NvXmFgz q0DNfFq7a9O8/kCqR6lwhAJLl9+lfyt4+XkfapaJCiQcQqVMwVCbjGYviqm0OfchvrsOvqnc0M4 VMP3UhQg4ViCRVbXtPmCqGns4oW4ih2rtAA9urjcjXw8RD1tUEWDm6gG4n6ELVXWWoMc/vJkoHm Azd+bXJkljFPV2g== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 Since commit 43a7206b0963 ("driver core: class: make class_register() take a const *"), the driver core allows for struct class to be in read-only memory, so move the rproc_class structure to be declared at build time placing it into read-only memory, instead of having to be dynamically allocated at boot time. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere --- drivers/remoteproc/remoteproc_internal.h | 2 +- drivers/remoteproc/remoteproc_sysfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index f62a82d71dfa..0cd09e67ac14 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -72,7 +72,7 @@ void rproc_init_debugfs(void); void rproc_exit_debugfs(void); /* from remoteproc_sysfs.c */ -extern struct class rproc_class; +extern const struct class rproc_class; int rproc_init_sysfs(void); void rproc_exit_sysfs(void); diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c index 8c7ea8922638..138e752c5e4e 100644 --- a/drivers/remoteproc/remoteproc_sysfs.c +++ b/drivers/remoteproc/remoteproc_sysfs.c @@ -254,7 +254,7 @@ static const struct attribute_group *rproc_devgroups[] = { NULL }; -struct class rproc_class = { +const struct class rproc_class = { .name = "remoteproc", .dev_groups = rproc_devgroups, }; --- base-commit: 8b46dc5cfa5ffea279aed0fc05dc4b1c39a51517 change-id: 20240305-class_cleanup-remoteproc2-f1212934f990 Best regards, -- Ricardo B. Marliere