Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2522498rdb; Mon, 5 Feb 2024 09:03:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7Sxm+/H2KWl/Qc/UCD7Xa6x0hDLjJPZujxgAvIt1do06pV7A+TH1SzTvHwiznmcoei+pU X-Received: by 2002:a05:6402:1647:b0:55f:e147:2524 with SMTP id s7-20020a056402164700b0055fe1472524mr5161732edx.38.1707152585392; Mon, 05 Feb 2024 09:03:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707152585; cv=pass; d=google.com; s=arc-20160816; b=iDUuhxgPDuzqQbcnD1Md1E8TjHcimow6dipOErvVHXtOYyaq+WP03IAVzspYoSRBln djnzFeWYmiKo3GZ1r5O3nn5bltbKAhu7wreiPADe40QbCe15AwrwXbF14pDy/otPrdZw IiATkg3K+qn3zUUG2yh7pntiCIHa+9c1ACcfQ1yFwWMApCdoUI/SHBa88IEKNZ0QLKJm OkH4ldi95+rg1ewVFG6CDz2upI9xmlAUqzorB3dtQf1jEV1iUO4Z7F8o2YV0f8Vx+hEH veQc7TzKuFh0zYlH3IBmfcd7Q/HXdzBaHoMHZjUWY0iRudKHFh6UM1j3RBqmsQWRb2Ur LvNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=LdFD8VJNt8KtK1tcLUFenFSTLcjwpdqGqWw1sz5bHCM=; fh=jI/0QU5s6NSXHM5AhCIm6mQ7AE694RardVr3heQnKFc=; b=p6HQ0HSIOkX101QDTnADZd4mc8KfwMQMJOIWnEWezrLxjP03weprElG/TgYD7YmyPj WM+LYXFWiS0VUgzRtPQPAKS0I8WeDW81PSz+MjA2+5FcIeuYRw7vbsBKA/kwBPiYIV86 HBPUvU0sy7J2K+Se8KvZX8L1rM+O0+ML7hvFAsAsg+wvDYDrpQHVhMWd6q9j6FI0Mp04 IMNxM9fztA5FdcLH8Q/DBPJ/2B5Hq+G8/C0g/Lj54FIoIl45QbxaZYE0x7Es4IyjV/Cv HEjtUwmXv1JYDpjktV5j08nFwXRIocvQM4h6uXoDFgw7qGPUjxFV6lH8RGIV4YxRpfS9 Gk9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=RP60L+uD; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-53058-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53058-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de X-Forwarded-Encrypted: i=1; AJvYcCWRJgCY+OgnoSh5vNf7hgaLu61u/mBRx643bS6CZTBBb5w/CB8EFG/kPdUPlC2xWZODanBM+Y6dSfUwaMX64Wu4xCm3rKJpkGHKZe0x4w== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s9-20020aa7d789000000b005600767a456si72343edq.281.2024.02.05.09.03.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 09:03:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53058-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=RP60L+uD; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-53058-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53058-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de 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 279D81F22B06 for ; Mon, 5 Feb 2024 17:03:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B2D33FB34; Mon, 5 Feb 2024 17:02:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="RP60L+uD" Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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 2B98344C65; Mon, 5 Feb 2024 17:02:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707152576; cv=none; b=F0nhvLDjZAdALJCnJ2z5TxA832EuFWTLv+63Yyxw/JmZ/SQ0d4jCxUjyEloBs1UD4rmE1y+haV7nOlT+PE53U2p38OsZKQZ/G9jd0GccIpuIi+cCxJ1vPbSpIfIfle1pTXaW1D04nayn6myRIPfJGwBlxJjaXFeOjKJwWjHn63Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707152576; c=relaxed/simple; bh=FEtoZVTwX+PACWbp6Frj5Ro7fkXR231I/T5/PExLQM4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Tv0l0Ee6jqku52sQoaTP5QN3EAFIpgUrDfqHOEflkBbnCiy0RbtkbcoSrMmJNwobeJeRiZWDt2rUkKxgj+GdJGxKBqn6Ex/Hyn5SIdRlK5x8vH3hy0iYTOCb9GB5mZDr/kuqquXjqccsEjOmY5xm7aey78IOmkt2MQIlbW9R+oM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=RP60L+uD; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1707152552; x=1707757352; i=w_armin@gmx.de; bh=FEtoZVTwX+PACWbp6Frj5Ro7fkXR231I/T5/PExLQM4=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=RP60L+uDb/uLFnb+Y5loiofiyIVl4L9DX2f59HvRPMR/IBFHo+0ESMvwsLEUr0yn +FP9WHF2m2f/gKW7DHI5T2okY8Grv/ti2BGu+aVlJ6bWkSZU63S9NmDHGcS2ZG0ze hdsmtdXm79jyhdjebbwddNIdH070nCdgvwNElMHDk6cnfv/ejvPkF/qo1ypD5tXwD ffkvTDigutlP44lhUnwp8inXky8Nzx1MPBVKz7wgmPZJhbr5IgFWwlwwTRVUnf9ng zDV11q46UXPmXyYlk0NyK00za0pKzRb/raQK4ehimJEssKZ1GhY8v6/hSoTPqovUG c/usbIX5woNgnLW02w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.0.14] ([141.30.226.119]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MOA3F-1rLpAn1jdx-00OXUk; Mon, 05 Feb 2024 18:02:32 +0100 Message-ID: <93e93056-d75c-4b12-a161-1e410f3ac354@gmx.de> Date: Mon, 5 Feb 2024 18:02:29 +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: Re: [PATCH 1/2] platform: x86: wmi: make wmi_bus_type const To: "Ricardo B. Marliere" , 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 References: <20240204-bus_cleanup-platform-drivers-x86-v1-0-1f0839b385c6@marliere.net> <20240204-bus_cleanup-platform-drivers-x86-v1-1-1f0839b385c6@marliere.net> Content-Language: en-US From: Armin Wolf In-Reply-To: <20240204-bus_cleanup-platform-drivers-x86-v1-1-1f0839b385c6@marliere.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:+cVT64lPoE6dBRMF4R5MerrSeiV7gtTVXbm09zwG/JeVBwFSFsy mvq8CEHN1GKP5ce3Ye5cjU3pLwtgqHPTJ4rsEe3O5Z4wxP6RJxq+Xj3Edi6evo8ggThkNQ9 4G3Srd67mIsIEO93HhLkwRF5r7+kAojEfyzcW7GMhO05mS//1Wp0LesWoR4/Btd3kM4T6dW Wr2J2cf4xA2/X2mmKhPRA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:MHFPugB5Jnk=;4B6ZCoPeD6lAfMKPv8cmx6wcsjC DwisChEkJqRmA+9kKH5GgptfOFNnSrFgl0Y9t6rMpr9YM9ezS3lKg81y43FrKYEEnWZDTuL2w H5G7jvsqQ/zvh2t/17dJsQPKGG8FYL4B7NUVNvuJBHQ1XadtcnueCKdmcTsLzQOTUrJSg55FV Lu6ou38z99i4uRfqOcQQZpD4i/DKLsgAeU6PVB5gwqiPh6D+PlUDZxJOzxKljT2tl7tiBYDPx SREM/+Luv+JIFZ7cdxnFyCMSDUUwcLdIaHtd4eXFCtJ6oiD6rQ3iBKuIxaKEMGHaP7htr09NI 4mHLK5DheCGBw+t+8j/dAAC29jYfjkaBe4VN2xljFItadYM3YjeCfboYR43rdmf3fez0uYkSO 7RIQNfX37eBcdzCYOYC9wkqrlMXssqimbO4HNucxHfKw3ICjkK/XLHxiKkVlJXmi+8cR0ehep i29ph+0nXYPmNEdw5QcE5GG/KHYDzQ8wlWp6pYMn+b48lrkPtGy852L6gNbSbA09G8sJUddXs iLaXBJgcjNnKhEgCyaTNstLQGIdl6Psc/LsSaKXPKWDTyyQBYxvaBLxeQX5FeGa6fO/dHQuaB Kik8RnRDUN/VFHd77YT5W08N7n9LASbry3A3mPZep1MVK4eWmdB8ApnztKqhPSyEpxJV/MYpV mXAfjWKrz60eUoh0608dTbZQa0HLW9xqZ2RxluQlrWf+UGTxN8h32RiQJPC5IOn4HLxF0QcEA dEOcWE64+iXo10fmB+Vi1L5TtuPl4rgvCp4viPedrBxmsaqr95eilGFRjNSPAIiuDlTfsiX2r Io8t//ao1SzV5JO/d5j4gRgF+JEGUGOd1xVYWJAGecMyI= Am 04.02.24 um 15:40 schrieb Ricardo B. Marliere: > 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 > --- > 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, con= st 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_str= ing) > { > @@ -899,7 +899,7 @@ static struct class wmi_bus_class =3D { > .name =3D "wmi_bus", > }; > > -static struct bus_type wmi_bus_type =3D { > +static const struct bus_type wmi_bus_type =3D { > .name =3D "wmi", > .dev_groups =3D wmi_groups, > .match =3D wmi_dev_match, > Reviewed-by: Armin Wolf