Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1087915rdb; Mon, 19 Feb 2024 04:04:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX/0JkcaC+vGFJajlseD4ALfABaJTImPN7Hm1mAxRMGQdOLyCILttNdlQXl9j+3mFsAFEg9B3hDikB1CU0w6g1qvUeIpfIjGn/qUWdCdA== X-Google-Smtp-Source: AGHT+IHbErlaw7IM2di9eknvRlFDQAaBPlcytL2x9dhgwFdAw3czc0EgYfD5elPUPUzlOpAaWF88 X-Received: by 2002:a17:90b:234d:b0:299:906b:488c with SMTP id ms13-20020a17090b234d00b00299906b488cmr1957760pjb.45.1708344286591; Mon, 19 Feb 2024 04:04:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708344286; cv=pass; d=google.com; s=arc-20160816; b=L/8IU1QvWXFzMpmfsYVA8Uj/WZpng+ZQigHyhBjXPmJX26paoypTfDOksLkJyTUhJ+ tNhGfuXtvzrEkP+pKgGlon/oh6x3PlIZn8Dm28HnHNigQqQig9Xw9ECHXegUrjVcv9X+ UqR0dxGNeL71gByMfWB6DKXlr4yaFdGF7Z3gmxrz1ZzdjyTtCi41YAW1Bem7Aj1fLAhp toTUOhxS9lcDe6ZTU5exzmj3zUn9Mo4+MrXf06a2FY53CaSELd92Z8xWdKPKfKD0hcRN QP+exemIU9Ze3vGpernOvIiD+rVoS5mh5M89jxrLeForRJ38nyivaxenRPhulKIDs39T 5xtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:dkim-signature:from; bh=Gf+/StpFhv1wGC+xwGNrw1gaGctxECTBqKAWS6tncEs=; fh=FpBp6czHtGGBcB0DxuhIY92B1Dl9myuDwMzL+NZRsas=; b=CUfec5oi/BeenJQPg7GxG/X1umEcZf1UdXcRrqaxogm2H1ggLtwQilodMZ+yikePe7 Js5ui7mwrAC0yqG2sEnNq0syfzRnnOAvFM/AyHjb2VLzTH2SuAQM21IwiNIDZDvrbu/+ fMfUNwhoDYtDrFQu81LkcvLOT1tB01RySbranzXTLAmjlnYEcsBxshYR901V4jQ0jtL/ 6OB05le0/BB6bhxRHHJXwAxoQq0CkbV0iTg7jRjFbdPud4ovV4F62Y7+6VD1kG+UJ+3t Olsl5rtAHXRFq+lEfrCRLpDJ78GzWmKAHMOjIxwFHbmPVoMoQcXusJAzlZsKsk4s2X9B IyAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=dyBZRXMW; 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-71272-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71272-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x2-20020a17090a6c0200b00298985d0145si4486808pjj.8.2024.02.19.04.04.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 04:04:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71272-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=dyBZRXMW; 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-71272-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71272-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 701F4285299 for ; Mon, 19 Feb 2024 12:01:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 941B92E645; Mon, 19 Feb 2024 12:00:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="dyBZRXMW" Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (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 474762D60C for ; Mon, 19 Feb 2024 12:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708344022; cv=none; b=Jg7IyguW1mBbYvNEq/71dhe6RDGFFUabgN0/S358GWKgsGvJgS5nzKU+kfJtDfuPGItddZmB8V8gqpjDWboynpsKP59JqBY8AMG8z57W/D9cyKEUtQeAA2GpLlQlwfgiCIt8ZvvvGT+FRrubdPsViIEngnIGig8MSM2FeMJBi8E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708344022; c=relaxed/simple; bh=GLhryFMKh2WBSRQ9ymMITx96mTFPQModMPS8GFFoJck=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=i5wcCKmlbtCbGUwHXsC2530idlJeHs3nWsdy6pR6O00hPkzDwjrkWZKTNDk0eBrzk+o+byaW5LGmBfhdVcPn1GgucQBDC6KHjnQsIA1Bb93vCTncoI4dFbIiV7ljN9987hfoPAKWFLORiJ6LQ0q8onM2Qyb0g7Ut/RgY2Ohg6zI= 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=dyBZRXMW; arc=none smtp.client-ip=209.85.216.50 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-pj1-f50.google.com with SMTP id 98e67ed59e1d1-290d59df3f0so3605700a91.2 for ; Mon, 19 Feb 2024 04:00:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708344020; x=1708948820; h=cc:to:in-reply-to:references: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=Gf+/StpFhv1wGC+xwGNrw1gaGctxECTBqKAWS6tncEs=; b=XZ+LTog+enIjM+SvJ3Kncfkeqqe/lIEcv3rdqbmymkFzIE6yzGmMYmYmk5JuxXR+ge clKV8SfnNu+iiTD5ULe9r76Wn3akafOzuKM4M49HBRJH2dRWeC1czjKu+mneFNXffRNO 5rq1RrlYmswfDV9T7YIxlagPMrE9gv9wZShZS9s6xYD+1rfYKzz+0mCYdLWW3YVXjUKy kLfx5UYSYssTadkX0mwp6Fr69tIQczxTcEHUDkLB6CPe58EPcpFQTMvGiSQf1WpNFweJ AuO+RKP63YNdLpGcAFHVFLm2NYPWZLQEl1+u6mC4GGqkCx+bOPnOhSVvzP+z+LsY6Gm/ IHHQ== X-Forwarded-Encrypted: i=1; AJvYcCWDhBWTuUxp8zMVMHQhv69zkROhrG05CvXLacyZ6P1eyookt9LfA36BHn9cyWM7yn3j4Vv5VZ6cZ8faMyau+14IEZcbL401115ewBS6 X-Gm-Message-State: AOJu0YzRUwey85h5EiQuVWviWfnw79AgimzXwUk5ymw98LkmKvTQobyT xyoJq9UxXZg12UFKewAuC9pklMWf8k0LMhnl7AmEyTWSfvdYmUh3 X-Received: by 2002:a17:90a:d157:b0:299:64d8:10ef with SMTP id t23-20020a17090ad15700b0029964d810efmr3570926pjw.10.1708344019905; Mon, 19 Feb 2024 04:00:19 -0800 (PST) Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id ga16-20020a17090b039000b00299101c1341sm5082295pjb.18.2024.02.19.04.00.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 04:00:19 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1708344018; 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: in-reply-to:in-reply-to:references:references; bh=Gf+/StpFhv1wGC+xwGNrw1gaGctxECTBqKAWS6tncEs=; b=dyBZRXMWBqsYF0mkw1JOVVKr7LjZtp+N/CP6kCVEBiZGwvHqhO8DOf6pSeK8/nOlwsF4xX Ws/QMnuITHlDi8/RR6pA5f+YikmukPlPxbKnIMtZ84zThV1n1/Ll3h17Aj1Dh0viz1JJTI hFgj1RGkUiSCIqppNZz1qvbnhcBZhju+YeXj8/RngU7PheRyco/vej+CsP76lNPV4qox7R XhE3tRVeEzCWr3nz/fh6+W3wtG7TmpiRFSr3gsh5lP9fpv48IFwSazEyj8pxNm563p6t7u vqEm+SHbwHOSe7Tg6+MeUIIRCPsg+2wpG5pl5EjZm8Tq8a9F7PC4gMu8F8GLNw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Mon, 19 Feb 2024 09:00:53 -0300 Subject: [PATCH drm-misc 3/3] drm/sysfs: constify the struct device_type usage 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: <20240219-device_cleanup-drm-v1-3-e2f2acb38bff@marliere.net> References: <20240219-device_cleanup-drm-v1-0-e2f2acb38bff@marliere.net> In-Reply-To: <20240219-device_cleanup-drm-v1-0-e2f2acb38bff@marliere.net> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Hans de Goede Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1090; i=ricardo@marliere.net; h=from:subject:message-id; bh=GLhryFMKh2WBSRQ9ymMITx96mTFPQModMPS8GFFoJck=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBl00L1OvONJejDXxTcgfR0t3mBVczltwTUHMilv KpAEbMF1uaJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZdNC9QAKCRDJC4p8Y4ZY pvpgEACCDwjMH28f3S5w9ZhS5pgJhWn+tr+Iyl3U4iDSAQTGJzcx+hVXpc1b2O4E/Vshu0Q8cIL YNab8jUI2lIIj/4EcNqfHgjNG9ZdMLtSHQ8dSb0/2dlUPtb0uQ6iYuLxd01Lno3X7OZp3BbBCve /GuhhKPstdnMUj+12pXjLaudbnHi/HUCFfLZJ3TKfpMSbSXkhrtWxWh1BM5ykAe63PtB8WcXaku mj22jMKbitllXfXHLHdjJlQqObQnXPRShhJq+EKOiI7KBDfd2ccDhI98EQymFxcY/MkmZwGtKy5 6AINhniL0e7GWL6+4TJD5s/YLuwkIRl9xr0+dcfWVpG9gUs211bP0njrGPjKMnayAvsMBu6YqRp bomh2Snrxdpr/jbrCtjrQbQWKgebrB0m3a5l/vBFrVRLWbfqard90t8CwG3txHP0HAG3/nceqIy W0MrUsQ85cCtLTrmAowcqOUunHzUUHa7ciTZ76pojBM77XX4Jq1eV+/VBTYTK6VnRR0XYv4YUaP OeuRo+2wXxhAeAJMs8Qo8wIsGXs8CRbkTkUHWYHvkw4BcGzOFVLCLG2Z8PRGonw05JZw4mXkfXQ DkUmW7om5jKRZ0EWR8hjGUu/F+QAUWC2UVVbenPrH1IePqAGL3LnWIFoPYyaKpvyjk/y1bEJXDZ eDsv02Z2i8RS4sQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the drm_sysfs_device_minor and drm_sysfs_device_connector variables to be constant structures as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere --- drivers/gpu/drm/drm_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index a953f69a34b6..6d72dfc4b25a 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -50,11 +50,11 @@ * drm_connector_unregister(). */ -static struct device_type drm_sysfs_device_minor = { +static const struct device_type drm_sysfs_device_minor = { .name = "drm_minor" }; -static struct device_type drm_sysfs_device_connector = { +static const struct device_type drm_sysfs_device_connector = { .name = "drm_connector", }; -- 2.43.0