From patchwork Sun Feb 4 14:40:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 196515 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp382768dyb; Sun, 4 Feb 2024 06:40:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGGavij0V5xeqxIWOZxfPpq7bc+manvlKEhzweLINpfvM01BVQQAUqH5Gz+qoBc5A/EGva X-Received: by 2002:a17:90a:a096:b0:296:2054:ef48 with SMTP id r22-20020a17090aa09600b002962054ef48mr5816614pjp.25.1707057627041; Sun, 04 Feb 2024 06:40:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707057627; cv=pass; d=google.com; s=arc-20160816; b=fcuj+Gb2sDh0YzkbPebCDyTsL5/AjnsVVX5ApLrO0uuJETXURbmAzIoakYzREp0ROh o6tIbcP3vyxhIWbxkjPdpQee0IXmPP9rKUwIadIWhYPQHI16oIml9n3O2zgCFFXlXVPI KYTQxjKebwlN2i52zXWLwaehsM0DMn1cJ6wY/tEqdVQAfKdDEkGWBpy00YK6wMqwJRXT qTZ0AJ+k22XHWVXqVJ2CmZxAbxW7uK7kFdoygk3XxKucqt5fEF6rmmB3FUeBfTL8AGMo beXFkmBjn2FxhY2kKolpSoT3M2fv2n/KbImjgVE62jgqdwetbTrHuqnH2Ovmfq6vvqUQ gznQ== 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=VuGDIWyePMJPlEmvb6FvKHxToWSzmOOCGNIDM9oq29s=; fh=HUUgqHcaM9Cc7igFwtfynMmUBDT7tOghs57PbayG8AE=; b=hqY/wlj87iyMfi43iN9Lbrru6VjSXJB1YHmDv0Tl5fz35vAqBnn+9/4vs9kHiF7Xfs HAaGwVXZIX7igfgpLxOIC3YR6YS6td2ZD97eQO5SpYm/goHqaXnTWX6mLVUfDSvGwRbp WPkqWlk8lNh5ieDOkmourk55ydWkKstCKcvAi9/GqMeK5We1NUWggokH/5tEbLBR7vtp w1g0Mbsn+qsKc9Qn3p4DthXxHKotDES003TEkG2eT6LvIJYunnVtibXzwBSnbgq7b9Qc qwh0GAc/h4cJOgIV7UTnQU+L5IugyhAS+/Seu0tQn8z2vRuGj22z+rupPVoAxewl99fY ZVKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=qFu3M4s3; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51714-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51714-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVdBuBdqmDxqTFSRvsH8L57OlDiUMxAwOuTqTkVYZuHfQROkTIHdiKWIPRWOIoJOM1FCxAupoNae2HD/WbigwqVnK02vA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lk17-20020a17090b33d100b00296645ac0e4si2635420pjb.67.2024.02.04.06.40.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:40:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51714-ouuuleilei=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=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=qFu3M4s3; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51714-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51714-ouuuleilei=gmail.com@vger.kernel.org" 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 CC730282AEB for ; Sun, 4 Feb 2024 14:40:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68FBB225CB; Sun, 4 Feb 2024 14:39:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marliere.net header.i=@marliere.net header.b="qFu3M4s3" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 E22102230C; Sun, 4 Feb 2024 14:39:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707057593; cv=none; b=ukpMYaui5MPpS+zsquCKTDBxnTp9Lvd+V9nqicS0QO8ZfXXXDyjcSyP83qyuH9Kk6HeHQ5pE/am6LX2xALnjQnTnzyakgksGvIbBK7iT5f2k6wN9YPSSdphpgZ/tHKYhcUchzpfh7oYCAsCXjHbA/rpMgpJ1vqhZYqY9Hn24rqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707057593; c=relaxed/simple; bh=y7Np6tLWWpdCtIwpp/IJ4o4JZh5nikX5TUM9wJMdrd0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I6p/TZRgW/t5xmu9K0LHAZD78KfxOQ+dVIrPSKM9xNgKO8hirqMiGt8mRhgjxAyQqZwA/temOTnlFvcbwcpM30hrabyHImSc0MIqrVKti7lyO4ukBKfVCs7p8kLcZMUM/D5b/oHOz0h7iracEpt24N2PfJtVXz/QhXTOQMV4cqM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=fail (0-bit key) header.d=marliere.net header.i=@marliere.net header.b=qFu3M4s3 reason="key not found in DNS"; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1d72f71f222so28662375ad.1; Sun, 04 Feb 2024 06:39:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707057591; x=1707662391; 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=VuGDIWyePMJPlEmvb6FvKHxToWSzmOOCGNIDM9oq29s=; b=MKIdvNbmeeXmM/f+KLd0BIDxM0j0AxuIUG8hOraIk2sv1qMOELLzA78m51zbvuoawD 94yURhAhMye3ZAoS4RlXSJm6+5aQaM74eyYd0rOgjBKpsxVCqD2IghXOnf+2hM2MhYEC qy6GBuaipCGbrWe2kQlUSxcg53JNwfZCpDSrJyYLIavNJZm0JA63P7wds4VJznsKh7c+ X0CFylmZ+WT5fHv5ZV45IH4q5d16ttn6c8g9vZbHoTPeoF/ATkYvwEC0tPdrT3dSqs+f FovtLhVItp3Zw1lLXKnoatC685nfg+xxjhaNAJjjlrgH+ui8LXrPT8EDPUsa77oO66qz 9UWQ== X-Gm-Message-State: AOJu0Yz2292xaybT33sMx6WOYMT1U7Q2uVacb8I0xnQELpRoCq9Q43Ab 3Blmavkjv9BBXKvqJxG0iIidKx3Ep1PxDIBe09VmBU7H6zze52rM X-Received: by 2002:a17:902:e84c:b0:1d9:7124:a89a with SMTP id t12-20020a170902e84c00b001d97124a89amr7804611plg.58.1707057591144; Sun, 04 Feb 2024 06:39:51 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWFaRJwAH1XwZS0PfMdlYUm3Tht5TlPq0oTP9SkuD8imQOdoeZlxBlyz+AkjdSAkrVxculM+OGPhk8NryA23bT+3LSBYRssc78itKLXZRDjk99+hvNyLYPl8qDC0NimOZmizIHH0z5/AwNoUSXp0m6SOVUTB11iqVxqoCgplayaOjbcwlknyES76d+Nf79WXBFHT3FFGltWlcbxb5o= Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id y10-20020a170902b48a00b001d7365fe0c7sm4577546plr.164.2024.02.04.06.39.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:39:50 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707057589; 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=VuGDIWyePMJPlEmvb6FvKHxToWSzmOOCGNIDM9oq29s=; b=qFu3M4s3NjOyG/OVSa5MPeQqjFNignkRuIMmBHMbge+l8bxYGHnonXGUiho3JiA0edI7SH jQHfa6grewCkQ1Vtem9Y2HAhD8aqwuOkaopQOzTM11zxsrsSsWog7/aBuzUzRxAuN5vxBH pcx4vaTsrmOV8o9zz8409hWIKPZ2s0Osqn5FrUwVfwdOGw+/nxCq/ytApra15uu4KsYXPz YV17aBBbtZvbdcPvQosbyNDmU5jxTVY+MaUZ7z+ZzdLP2SLZHEGJCDJfcXxZ3ttZWXHQyn mTGnVu+QJ3tEIH/Vsnst8M5H3KLfT11ZA7Q1PTzu+xJqcym9koLYDegalHBlQQ== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 11:40:16 -0300 Subject: [PATCH 1/2] platform: x86: wmi: make wmi_bus_type const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240204-bus_cleanup-platform-drivers-x86-v1-1-1f0839b385c6@marliere.net> References: <20240204-bus_cleanup-platform-drivers-x86-v1-0-1f0839b385c6@marliere.net> In-Reply-To: <20240204-bus_cleanup-platform-drivers-x86-v1-0-1f0839b385c6@marliere.net> To: Armin Wolf , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1207; i=ricardo@marliere.net; h=from:subject:message-id; bh=y7Np6tLWWpdCtIwpp/IJ4o4JZh5nikX5TUM9wJMdrd0=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv6HQaxYZFNBmMncA7xzXrILFnq+CIS5//996J 4coroW5A/GJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+h0AAKCRDJC4p8Y4ZY prDWD/9wfNaXVEL8ZY9gWrC4KrtGnss3tvYm2Is7pKlfPe9GvvBI/5F+JsoVXj/kf2K2kQyo+NN 9nP6HKRwrXPRiMRkkQ2uRHTKx4o8ddDNbraYOI00dY5uyYNoIRiupM4UoJd/1BR02UDawgl13VP FKvn10dm6IQdFf6vxz1AuLOPRx136gYGWGl9UojjAOUkp8XHg6bosJ36vYvTltRDaqtfsQclMVs UJZR4Vg3ACBaO8Hew3sUdMGHovMmMLIyKVe2PTxzrdNj5iZdvzj8iYPyHCPnyM4IuvKQo9Kqav2 7bq7grCsWuhD6rMz5tjFDitScOOnykkkQKkQw7+tHMl/4OUf5ZH/+HY0iAC2+2R2jC6dO3p2ob+ 71bQgis/p0+n6YZwCXS2tomfK6vdET06oFbxDuhNVoBJmOj0HqA9Pgk+WcZJwZI3aO1cHwl6KyE TCUIExenNbWAJLh3NB6TiWyw/NTBvcnKZ26WgVYgaLZiEFdm6JEBRxft5NaYChPciQ2dgbNI0P8 V4o+UfIQSjLrrKO3ErUxG/tBfCJJuWezPH/NgLLbWMWhxr1TowOcJLeaVpsMsvTJl7wZX6957lU o/Etm8xNHxZxVN65Kuup5cSUxu6yrmEUxgr9VElVNLmI/yvBThQ+S1v2uQN1S29HMkwQgE/jMbt 6gUUqEkE8b8Jhog== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789979658162006679 X-GMAIL-MSGID: 1789979658162006679 Now that the driver core can properly handle constant struct bus_type, move the wmi_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Armin Wolf --- drivers/platform/x86/wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 7ef1e82dc61c..859dfff515d0 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -219,7 +219,7 @@ static int wmidev_match_guid(struct device *dev, const void *data) return 0; } -static struct bus_type wmi_bus_type; +static const struct bus_type wmi_bus_type; static struct wmi_device *wmi_find_device_by_guid(const char *guid_string) { @@ -899,7 +899,7 @@ static struct class wmi_bus_class = { .name = "wmi_bus", }; -static struct bus_type wmi_bus_type = { +static const struct bus_type wmi_bus_type = { .name = "wmi", .dev_groups = wmi_groups, .match = wmi_dev_match, From patchwork Sun Feb 4 14:40:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ricardo B. Marliere" X-Patchwork-Id: 196516 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp383047dyb; Sun, 4 Feb 2024 06:41:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHR1QJrWBKGiJxqs8oKQCoA9axWutLgqo7P7coPCC3HWBtp282BuKGN2GNQmJsmgxQ1kANS X-Received: by 2002:a17:906:f107:b0:a2d:52dc:1841 with SMTP id gv7-20020a170906f10700b00a2d52dc1841mr7542263ejb.18.1707057669798; Sun, 04 Feb 2024 06:41:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707057669; cv=pass; d=google.com; s=arc-20160816; b=th5tZSLIXH+OvNz8HBHz6hjASiTdRB9pVtlAzw4LUzuKITTZaPUMn/cGg8Tk05OfRS itIj+Eg+Tfz/t5vgsw8imHUkdnMC+RfK/m2IuJsrKpQVOhL0gnNb+pQhd4X+FacRn+Qu LuWyQm9Zx+tbuWJGz/D7n5qQHLUle/Hrc6K23tVsAJ+t/mXxiUQaagr0Uz9NXa8cT6Fx k4O/ckRvl3Qy6wtBt8kSKv3UU2ctAjZDqoDSm8ZS6c6Qrcax4Z8Jv0bNBNrf1pkuwhAs k+xKRqX1BqA0dwAw0aoNiidMmLqtYhPFkUVMCEEuI/KpJqxFFIm0GqviqCOlV4l/EMIO MtDA== 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=ezYYHGSX/pcUtiy9cJ9ZdjJ+J+xQpwes4VQvX7jx/zo=; fh=H+tWggxmi5bTCJA8Bx/T3MIgA7UDrIiXD7YC5aJzoA0=; b=scOkank88JB7X151daS+KbU9MRaOINJZOyDZgmpG1GEsRYKiMeii9u9+qgyfOv/W8F aq66abMRxJlfpSRh910eklUkCax6gw+Ksg5xI0pkyQoTZxHNQ75ZO1Y6tgT2mZceqe4j BY4L2CzedRp2cWDaTxwUPtk9GlS2nB+OWZmFJluBUNZZvdXthSdNkByjy6+4998tG5au Fs5FtcDrrV84au+3rRWly9bv7TqDRMYv4WKLMPxFH8HUkkvIrXZMClJ67Fi9HQ2V5ymd tSFBuX2ZcU9pWr94N64CBPRV7QanEbsbzW9UhD1Z3Hj928F6RZjzo7TZOswMv0QBeKeo J8eA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=Z1myHvU3; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51716-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51716-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXPX90+jfzaH5K9UWoywQjKEH/aqIoaP8mGxpxhDIYcwA/93pLBXIUXfJonQE2UKciDWkwFmHEINfxbYtcKRmkNLZsXuA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m13-20020a1709066d0d00b00a35e5aaf027si2845628ejr.741.2024.02.04.06.41.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:41:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51716-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=Z1myHvU3; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51716-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51716-ouuuleilei=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 408AF1F22424 for ; Sun, 4 Feb 2024 14:41:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71C90249F0; Sun, 4 Feb 2024 14:39:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marliere.net header.i=@marliere.net header.b="Z1myHvU3" Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) (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 1E07E2261B; Sun, 4 Feb 2024 14:39:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707057596; cv=none; b=GoiexaLFRVVegujJJNlS8GVU5hnPWmhFV44u1xOs1RF+x7uPz/zJM2h+zi64UqLz2PZRlMrFb7BrW3MWDCC9w4JH5aWldBQv/C6VU9fJ7as7XcP/LIsX+o6SBTYJKjMpXGE9D3uOW4IBxdX9X7q96h9Wbr6ZSa1sgVO2zVuQFrw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707057596; c=relaxed/simple; bh=DCD6AMLvjzfV2dwxayyk2LAMb3B1QNeqUuCbdIScgfs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gA3qsGgVIHO4sDz0/auU8bKqlR4/r7iFknbyrsDVxLv4a/takJusc9b6SbPXkexfIrpxcK0YoJt/pbDHJ6fwz5coS53aPhmV4tp52uwiYH0P7EHRyIWCwPtbO+oFrwnkrskKn8I8vB1EibM3zeOkTvczkPN0GCoKsKRrYYqrWJU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=fail (0-bit key) header.d=marliere.net header.i=@marliere.net header.b=Z1myHvU3 reason="key not found in DNS"; arc=none smtp.client-ip=209.85.216.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-295f3bf41d5so1599887a91.0; Sun, 04 Feb 2024 06:39:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707057594; x=1707662394; 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=ezYYHGSX/pcUtiy9cJ9ZdjJ+J+xQpwes4VQvX7jx/zo=; b=RT0Sgu0aoNjulOc7Zycjz0j3UtUZc+foDlikSGkLfRxvsJEcTSIlKWmTuXhbIV87Gw b6SqDlEvxMS9np90zxUSatvwKkXkQTK+c1JAw/Gv2Euhg0MbkWyY4HlgFydxjos0LYze CNeGFdzsMPYNBA8o0O1Rrn0kySQSDi7ln9GV/r+ha7J9lmflb5DcGanopNNHHv/MPjPt VEpnv4BGP8qEkc0Eek9hOa+eSuiZBfwvoRcEx7VaQW9LPTivzUprPm6NNLT52u0e9/5D dgYc7fZGDnLNmyn49r6g6xve5fqFf9EStCq0Xgl3pb8+6Wi9t4iLdo/xaC+KWQkvuCSH ac0Q== X-Gm-Message-State: AOJu0YzEIAXjvdXRixhQ99MCdZ+gzKMDarXbRitxu6pXUTTxRmCawuvJ 9NbUZRytSt1mOIpTrdxjqK9JO0bZdfAMIVq5RCnthsK+dvG2JiI33tQyNRLPMd4i+A== X-Received: by 2002:a17:90b:4004:b0:296:2865:cc17 with SMTP id ie4-20020a17090b400400b002962865cc17mr4844717pjb.20.1707057594330; Sun, 04 Feb 2024 06:39:54 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUiJQ+lFPYnIgtSHcOMHhIoRsTg1y8TX4eG3ha1gdpvWlZ8DoutWGCstkDBbT2AyJ9AjUebTbvOsp2OcX2p6SieVVUMfFlEOvyItA3uk/xAApO+w/89aHEkQtAzamj5MVhejKf7TaCTPCJ/mwghU41I9zdHASE6LndooIXlYl1q1AgOL8domq1ITFDmvZvpGgOWA8CHq4WdoiVtizc= Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id c3-20020a17090a020300b002965e463ee9sm3536633pjc.34.2024.02.04.06.39.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:39:53 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707057592; 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=ezYYHGSX/pcUtiy9cJ9ZdjJ+J+xQpwes4VQvX7jx/zo=; b=Z1myHvU3csMaqFB7GKFE3I0v5WQk4GK1zNW4Bb4qUrz5maEWPuvglehuNuL1BFocoxDO+L FEZwjdHTq3TTOxh7bm9gIZLiXjqw0SH3xAo+YTVaz8nenpn8fdgPyDrhT81uVnnwX68frP aFUDCQea4Qt72A+VaC7R12cxoyC6VVAo/R54m6j1jrbO6UqTEYSQQpr9yxJzmmp2t3MY5r yksHNK4pQnexU6BrQbehR8d6K65riD5jMn3LXKGztQKV9ZTCkb8c0kiWcNDV44rRCwAFgc Vh3BBvN0AYeCk3qFmFJHu1fe22jwxZxzIdfMvBpyACRF15Dwxl0HYnK5ZT4hkA== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 11:40:17 -0300 Subject: [PATCH 2/2] platform: x86: ibm_rtl: make rtl_subsys const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240204-bus_cleanup-platform-drivers-x86-v1-2-1f0839b385c6@marliere.net> References: <20240204-bus_cleanup-platform-drivers-x86-v1-0-1f0839b385c6@marliere.net> In-Reply-To: <20240204-bus_cleanup-platform-drivers-x86-v1-0-1f0839b385c6@marliere.net> To: Armin Wolf , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=923; i=ricardo@marliere.net; h=from:subject:message-id; bh=DCD6AMLvjzfV2dwxayyk2LAMb3B1QNeqUuCbdIScgfs=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv6HQ3+29jKxh1mamu111xgE2/ToCrm5moNnId 9Ra8XP3s7iJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+h0AAKCRDJC4p8Y4ZY poAFD/4rJaNnFbM3l1qCLz9O/ci74mgChD/er5TjAFUHPNVYWPFXacqN50/ui04UubrqQTZtpFV aEOIxPcG7vwsbqgump7v3M1z0En9e8EXDqlbCyL9En81NP36ORYJz14qha9G1jwUqVmo6nU23kX v+PfuwQFrw8RrDQfVJo+/GvTfgKt1EFoZwNK2GaR/9YHTqSHLnclH4+wU4wKVciaLLLgHfrJ704 8qUcY0zqRhdtXDf5hcUtJvXj73+KOeoyNRPmyzo/7b+eryawwVOYRFD5PihezfNEBzkjPuelPue 7UkU66iptLqoWoI64Pv7Dlh7nWC4ddXDFnFCNUYBTSzeTBnX32c/PiqdNy/xfgmmECjmSy54zox E1Vo+9wVR8oY5HNCgJZBuY20ebc8tRzl5QIr7UAIbj9XFXmXHb0aHd95SyiPQ2IWzYsLg+aHr8X 3cQ1+xtVYfvr1bWHXw21tNeUKIxKrgPLova+CpADd5hio1MSlWBOFM7DLXOUN0ZQdi3KAkbYNiA +Mju3mFGxYZAUd61eWqDZTeZGwF/3bwXsHBTQ+DsTnJvCrQz3L8RnOvXFmAkmoYBJI6rH3sce/w l8OfXdpW62WBCFSLiYPA4wAMiwUmZUEahDWDk1TMhKiYtxSB2SJioLEsCTtZ8FaTH6Q7z4lWw2L 70SIcne5QNUP6IQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789979703204217994 X-GMAIL-MSGID: 1789979703204217994 Now that the driver core can properly handle constant struct bus_type, move the rtl_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere --- drivers/platform/x86/ibm_rtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c index 2ab7d9ac542d..1d4bbae115f1 100644 --- a/drivers/platform/x86/ibm_rtl.c +++ b/drivers/platform/x86/ibm_rtl.c @@ -179,7 +179,7 @@ static ssize_t rtl_set_state(struct device *dev, return ret; } -static struct bus_type rtl_subsys = { +static const struct bus_type rtl_subsys = { .name = "ibm_rtl", .dev_name = "ibm_rtl", };