Message ID | 20240204-bus_cleanup-hsi-v1-1-f9318131e842@marliere.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-51787-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp431269dyb; Sun, 4 Feb 2024 08:32:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5mdrMjuZq7qsW7AlkvOraMEvCg0vI4Qto1UlJ2WyQwjHpEEQrMtykKQeAb/PVXlL7qUUd X-Received: by 2002:a05:6a20:1327:b0:19c:6dc3:a500 with SMTP id g39-20020a056a20132700b0019c6dc3a500mr11688126pzh.19.1707064324060; Sun, 04 Feb 2024 08:32:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707064324; cv=pass; d=google.com; s=arc-20160816; b=0P3MMkfC7YlZbigpJ2D1nSkqvwdOk34TgiuHMfnrK6HbBWow+A6eqljSYtdqRH3Xxx 0I5dkjzL4ql3e0ljmkulQ5RZGBVpYvkSi1NAxQSLt0gxORez0uvVc0VPMIetrQbPCVcl CDeP5tHTt96C915jO9LcxO5btaAS/wLnbyrJpWVoAaAfCri5OTkLb+8hH/+Fg3lVE/2a rJU4SUTvLxIvt9dfOmENkDOwzNQrKQ/k/4WeVVLHbQJDFd6KZIQFmY3ThglQhWzzsxbR +1tWS1DEao6jnzBBRpWdsejmemZTFE18ArnYi3V5sXewbsAPOyEmo30XaL7Uvb7ogiia jPZQ== 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=XNhSAcOQsJgzxt52AFrV6cIjy7K7mCwx+eGcq1tfVTY=; fh=VbCZ2e03rF5HQOwkB0wqMQ67KnpYJenotU0M86xF9vU=; b=Q7qLD/hzSlA9e8mcsGckNw2ZA+nOWXk3ULD4KMs4HThRefJKk1saEFBcL8P2wzc7tw egoQnqdmm1PTNoVfkfXnfonZp6+SNfmsqa3PiMZGfMWX4Be+Wisv0c7yrAB/YtD9Kxzd 4HZI/X1whXkYqKDW6Nu/J1RyYy+Wa9/mn5U+nxm/BuVYSEn/c455nN7oS3lrvZeHGziU A8qUSc0kkPsrtHoMSeSrzL6M8Qv+r7V/QhcmEmFlNqyoTdd2roWVVXl24GHrQ5iZKV2t PIQ1rW/czC/il4J80GhcGxyjh+HUvLmDkpeAVv9+oEKWUxWubLaSWXXUxzUnFH/o0T2s 0wpg==; 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=cbsct1H+; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51787-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51787-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWv9GR018lJ6Nm5gXgscE6k6yFwiCagxELm0g3lcAMyvrRW39xElQ+AJyeKPohynlLYFwzTJsSizcFxMS3msyLazJBt6A== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 31-20020a63145f000000b005ce016cce21si4575126pgu.191.2024.02.04.08.32.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 08:32:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51787-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=cbsct1H+; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51787-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51787-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 CB323283B50 for <ouuuleilei@gmail.com>; Sun, 4 Feb 2024 16:32:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C76652421A; Sun, 4 Feb 2024 16:31:49 +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="cbsct1H+" Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 7A0F822EF4 for <linux-kernel@vger.kernel.org>; Sun, 4 Feb 2024 16:31:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707064307; cv=none; b=GQBzifrrNkRRP1ZOmvXz4tUCoKoGxhxNj0TohzxrQf2qPfnpIQrsGHLZmY4CaDsfh7tDKXFfD9DgLboXO6aDLIM3e/ManKjCxk7tJ7f0NsT78nj1wDbeFA4t6i8E7amImpWKXVZYIVm5dgKbnymGhjNBTVUdJhAhWyAZKBiEQ04= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707064307; c=relaxed/simple; bh=1vCWtqB6ylOUUALqfuFHp9gDM8uqiKTAT9Jq9akjcpE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=sBSWvIoX5xwCRcNV3GbdyyK/cPEh5zHGqbp3J21HknQ6nNi4Spciw4FBARtQ0T2xReVm8FeeIrKbh+PqXTAa+xWimU83fBk3qG4xNLIGL0b51zw11n0WSS9H3DRRTu2+yesRYIdX/DW39Wj0Z0OjTPuopsXA6tA7xHmjQ+YgQeM= 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=cbsct1H+ reason="key not found in DNS"; arc=none smtp.client-ip=209.85.214.170 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-f170.google.com with SMTP id d9443c01a7336-1d7858a469aso26170805ad.2 for <linux-kernel@vger.kernel.org>; Sun, 04 Feb 2024 08:31:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707064305; x=1707669105; 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=XNhSAcOQsJgzxt52AFrV6cIjy7K7mCwx+eGcq1tfVTY=; b=Pq6bZTin+TD6klt9HaRLMECDTCPX8ecMsxvlkjNwMRKDU/wX+WLJtchk+dbOI+V9Fu amzTEsBHz0grteQZg38HqSfJBTPfWB5GxuGQwIToU9Dl89lYGkuyVW9Hr3N6SNRBdCJT R2IMKnbQs3BRx6vAjc/wxZ1/VRNOXMk2GGB59aqumHCUYxMaf7TLhBiZ8sOXGo1WFfMV //r3kGVZTqNFyOqVsbWdz5f9njst3MGZiAF3g2Ytt1YhyyhGY5jUOMftlTKwB+JHbTJu AXUbNNmL09/SEV+2Hkp2jBciB3qit9Zgk7j9b51wcDyPxosk9y3pH7R4lBbuNz/5EpY9 uHcA== X-Gm-Message-State: AOJu0YyjrulMrNWcb6Iu+5b3c5MSLphSfHK8usxRhJneHxY+0SAchGdn dIbZ4ompphCGSxwaMQ3lK9XF2iw1mkXLWEGUzwaoiIN+60UFC3fl X-Received: by 2002:a17:90b:357:b0:296:37c7:3b6b with SMTP id fh23-20020a17090b035700b0029637c73b6bmr6387497pjb.2.1707064304701; Sun, 04 Feb 2024 08:31:44 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVL8oBMiXRE28I9z0RYp7DMI69Cmda749qFoQca9lpG/ctgRv52RZYxchbRK5aI1mS0cMWI6i5m4nCOphEm2KAQUkgUKXdz41YD9A== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id kt5-20020a170903088500b001d8d1a2e5f2sm4713157plb.216.2024.02.04.08.31.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 08:31:43 -0800 (PST) From: "Ricardo B. Marliere" <ricardo@marliere.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707064302; 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=XNhSAcOQsJgzxt52AFrV6cIjy7K7mCwx+eGcq1tfVTY=; b=cbsct1H+fF470xncsGDJU6p5IMifK2Yc5Xp0PmFluBsfr1/JVy4dow9NIlblaosAPSWTnF 09p3YXu0/4AkBt+Aql5gTIa+629hkRSQIn43nP8C2obify+4NtDI1ognSotQn8FdRLAwjO fWTOCBV735iUmOrhcJi0JPPUPQXdCRhhFGJfNpKspidqbVsWD503eBxcdM6/gvz+EXoyFd dHME307X8Sk1+d9+1cxTWTyCrdQ02A0DiE9tAUNOov+rcRtwFHUYtT/riFVdslt18YM4J6 RkMbreFaVrUkhnZKrbXgsDxYu5JbZwN+9oDt+e0Trbe4xVxbBmL3/8rGfSE33w== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 13:32:13 -0300 Subject: [PATCH] hsi: hsi_core: make hsi_bus_type const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240204-bus_cleanup-hsi-v1-1-f9318131e842@marliere.net> X-B4-Tracking: v=1; b=H4sIAAy8v2UC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDIwMT3aTS4vjknNTEvNIC3YziTF1Ly0Qz0xRjY/Nk82QloK6CotS0zAq widGxtbUAOZpSjmEAAAA= To: Sebastian Reichel <sre@kernel.org> Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Ricardo B. Marliere" <ricardo@marliere.net> X-Developer-Signature: v=1; a=openpgp-sha256; l=1109; i=ricardo@marliere.net; h=from:subject:message-id; bh=1vCWtqB6ylOUUALqfuFHp9gDM8uqiKTAT9Jq9akjcpE=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv7wNE4d5I0fZMJtZNkFvHsjD8g5XL0GH8HguA 5tqfSTzFPiJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+8DQAKCRDJC4p8Y4ZY pvd0EACikbxBqfUmQYuu9co0zY1N82UGTzjuk1O2HWaOTBx7qBCyHmacCn/zM7VCgT/ZsedGjGx GSknp0XSgfgiZyzIqW79oAi6kMpyulwmaTojWj1KSEwFkig6JJ3vIQxQlANwQoGKdBixhMBmSAs 9oVCWO0b7eRfOq120B1YcIx38WTXkrA73kkpCKrlJgFxCm6yO9slHoaKhC3lXWSUISgjQolfLFS aQKt1AM9jhKglbgM9BuTwk06ddPcTv2S01LFmWyXLxvsPX1r+x0t0lXBMJarWFIcFn4FE875IxD s4ZCsJJfIKClldvjzewrWiktKv/JQc4uRip+DkHBfV7F6JJY/9oXNn+Ty3FIMc8vNbXQkAdcxMx W8r3nuXBE/7j9gYrwLZoAGNKfccRcKWnZxVc1FowCcX7l8+taWAqQF+plRl4Hiurz9RhfJmlDLg meqN8vkRtACwKdID97Ts7S/IT6tZuSQ3BAaJgbD/r+nmvaK3YvpTICoaJsK/4IjX4wpZlgUEDin Cmak8gFh+c8suOWQnWkNSPQiaSLHpUiI2BGup0U6gRPTxlNQv2jrcFyz26p9Qe8o6hhfWkBS9al Rrs71IM9fJ7cx6F4Tg3NRwRu9j71BiI7CKWG72VfGHt+/TRQeAlnen++XIs3EzkO2dRhSwDTEta 1YFdEqWmgW7rY/w== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789986680217113746 X-GMAIL-MSGID: 1789986680217113746 |
Series |
hsi: hsi_core: make hsi_bus_type const
|
|
Commit Message
Ricardo B. Marliere
Feb. 4, 2024, 4:32 p.m. UTC
Now that the driver core can properly handle constant struct bus_type,
move the hsi_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 <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
drivers/hsi/hsi_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
base-commit: fa72d143471d04ce3055d8dad9743b08c19e4060
change-id: 20240204-bus_cleanup-hsi-99a65d337c7c
Best regards,
Comments
On Sun, Feb 04, 2024 at 01:32:13PM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the hsi_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 <gregkh@linuxfoundation.org> > Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
On Sun, 04 Feb 2024 13:32:13 -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the hsi_bus_type variable to be a constant structure as well, > placing it into read-only memory which can not be modified at runtime. > > Applied, thanks! [1/1] hsi: hsi_core: make hsi_bus_type const commit: a0e35a173a86d93040d0e08f9c38526b6cf6c1d1 Best regards,
diff --git a/drivers/hsi/hsi_core.c b/drivers/hsi/hsi_core.c index acbf82f755a8..e3beeac8aee5 100644 --- a/drivers/hsi/hsi_core.c +++ b/drivers/hsi/hsi_core.c @@ -48,7 +48,7 @@ static int hsi_bus_match(struct device *dev, struct device_driver *driver) return false; } -static struct bus_type hsi_bus_type = { +static const struct bus_type hsi_bus_type = { .name = "hsi", .dev_groups = hsi_bus_dev_groups, .match = hsi_bus_match,