From patchwork Sat Feb 3 14:57:59 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: 196312 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp1055362dyc; Sat, 3 Feb 2024 06:58:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmkBtS2eMxBD/1pQFmRxJs80J1tZmScbvNDzFb3WhCVT9G9x9B4OWQssuRUfOzkG4ISZqH X-Received: by 2002:a05:620a:568e:b0:785:45a7:d47a with SMTP id wg14-20020a05620a568e00b0078545a7d47amr8152878qkn.3.1706972311001; Sat, 03 Feb 2024 06:58:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706972310; cv=pass; d=google.com; s=arc-20160816; b=tsEMIPzi5CN4JdhgyA6muDUUyvZ9XrlZ/HoEA5vaEIyZzOuOd0/2mXQRyqJBH65E3+ X4SbeUJ7jYBbBy+vkKE7W+it2c/aWEEzUHGMk4mbzp9Ggz6fo0lh6S49TEb5qlKu23PA lDlvW1qwe6+LSOTs7K8KXcPJ/lGNWuQ4sELH8Vc/PISBLEkK+nyeVA/RIWJfgx0vTlAY FFPZq3JXBEZBPMMAqyRAU41qqkAS8+3xAJxO+3Mwz6F6dO/5qVq6xPmOShjUORZVtJc3 JMvS0MB0fRWMbSyv7YxAfyYatuO7C7yhR/mkpNf0dt6Yn9J3821zX/qWYbI/0wFkL7kA JTKg== 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=iVvoN0wXfCgYng52T3ebQoQAp0KpMeD8Gkb2umjpO9Y=; fh=+Ge9ATqO1HyplGkp96tBBNI9szZNxEy9Bu/a5dtEb5M=; b=mMb5nPNVbgdCD9WUhB6GKK+PRJPkXrD3D3G9cYU8yO08bOan9t4c+ihaKxpwZUHERD 6qHPbGTlwL5QyuacLLN8WqVkvVMWkuB3zxhUC8BvC7vbv2mge6j+BU5do4xWRxMqxqfk tMr2EWUr5xjSFb78CxsZ17oYpJNsEcsZ0B7n/UEsNb5VUCW9YmQTSVo3LrOlFcCKS7dA bMHE8XaXx0lIAKQGMfvEdX2uJ57Sjt9Z/9amGwvO4CyNXcbsYaZvlF8GnnPK0eL2NgpD LlXF1+3LnBEfUjEdorFURjA1+XBCgraGQ8SPKG3+tRD3vub8HvvDsCTLBXe/1ee8Ndu0 O2EA==; 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=INjUJtz8; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51130-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51130-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUjowJ9u8fGAut877SSYfYqD424YT8MjjLJAAXyrOSc86+SDfiCA3G0ud5B/vyFtR1t8pj0Dpfxp2VDFmVyXhc4Ndw26Q== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id wa16-20020a05620a4d1000b007833b422ee3si4210673qkn.669.2024.02.03.06.58.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 06:58:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51130-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=INjUJtz8; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51130-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51130-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BB5C31C21400 for ; Sat, 3 Feb 2024 14:58:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 277885F845; Sat, 3 Feb 2024 14:57:54 +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="INjUJtz8" Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.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 813465F553; Sat, 3 Feb 2024 14:57:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706972271; cv=none; b=W7NdYurPVB/QT3LyHVxOCxhlpfNQMY9uIhpHag+9FatDtN6fsRtCnaf0JILRi5TygXqFSqNRDgRpxmrfMz7N/IiiHweMrjuSELoNdDRyjM7PpbGeEgiRfSyqL0kSEIhaqTNLRzqe1FGL+u4AWrO7E38wUFHqP+nwAPmd7Jo1vWw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706972271; c=relaxed/simple; bh=N6FUHZVz7nICU9v02WHrAmRqKZqNMR8e/cf9i/r7ubY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OITBQjNNZfzoJomexlacC+LucTqSkUIRcgQR2zkYEtG9KEnU6+xM9U+crc3hqi4eIhJ3MqTwjRaHrSzzFVvFCCXvmzZrUcg21jp8kMIexnHzr1XlEb1QRkriE2n9QesDzWIYcGit6o5z1guahbXsLQRWtPbY1zNmFoLDyftGm+k= 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=INjUJtz8 reason="key not found in DNS"; arc=none smtp.client-ip=209.85.215.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-pg1-f179.google.com with SMTP id 41be03b00d2f7-5d8df2edd29so2430441a12.2; Sat, 03 Feb 2024 06:57:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706972269; x=1707577069; 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=iVvoN0wXfCgYng52T3ebQoQAp0KpMeD8Gkb2umjpO9Y=; b=OhbffOEkZTreT1mgnmLZbBr2cDdHw5kQdTmLftwkzjHU8qNf3LpHLbNJgwH+pRap+R EYT6p3+U1ZMfm8sr3pZmZFH88VvbJQO0/E72ColMMKrV+pNA2302QCtPIorAQkdFdcUp aAV5t2QCZFpnyTO21SFSjImGFjRrLGwyE4HRVPgZEyjRQhv5NB/B6ITYTKVnO3jkmYbs 4Zg+n6EJYDSzxBsEUB8n9PJnbBVrX4Bu2J80/IuP1XzfguAvwcDi8ld0DgR4dKYdGZiF 99KIGfw3ZsffDeZjUJKarl0t4fLoKCPGR3Yt6RFUC7cUzJovuUtUkSXcGcBMdupwr80z O+ZA== X-Gm-Message-State: AOJu0YwgF0QnKP1f9qdRwluPtBBZnf7Lyux3YG5J3sQpgGoqA4gUx4DM LFc6xLGNhdrUHRL6E16/QlIb963B75Q8A7kJtBEM0rPp9kGCaDxg X-Received: by 2002:a05:6a20:cb59:b0:19b:125f:66e with SMTP id hd25-20020a056a20cb5900b0019b125f066emr7229393pzb.62.1706972268758; Sat, 03 Feb 2024 06:57:48 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV6Pe17rVITfrIst4h3i4oE2dzkNkWkMoqgGar+km5N7ztG3W/mKCmavoo3yXm8u5wI9+LTD1RpORrpkHC3NDdnLfiANCI+YtpM4OUg+cse/51zcnzGptOlZwBCENpHe1BGSNk+L8FXVsrhsU24Nkacqi7+LTVgf9how1eSo388JLu1sTqYJiizY86nI2LEUipSiUogdmgHmZjYSUui+DAS9lr6Lftwexj9J0de0Re6p3pvH0GDx2v61jR5UgM4G6CsOnoEoMPYd126F3gJLDvjQEeOU0XaEOH57aWEqqSCtY/iUlSxabHrz14Jq6ctvJqgT6pbNnunI4h4OX7wY4Dx/9QQySoi6Y8EyPzflF6rer6AN68jK0/EdD3RUsQv/r5DsyBZcpUL2yxSiUKSGhJZlcW0pbnpQtdMLr4Xrcw0jYlSSXwC5jg= Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id y12-20020a17090aa40c00b002962f35fb42sm1855377pjp.48.2024.02.03.06.57.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 06:57:48 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1706972267; 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=iVvoN0wXfCgYng52T3ebQoQAp0KpMeD8Gkb2umjpO9Y=; b=INjUJtz8DPIqbSPB0oi9DnXpCTzfz5qo35IochaMl9KhSs8YmCILnNcSTacdhYtIuOGtGs rWqFE2y8ntWahRi4AAIXM8wK5OTX+QXqN+Fp4qCuwecIrJ2L/lKYJPDWWJUNywg/toav+t sMGs8n1TRjEmmCYmL6zZIYpS3qJf1JTeCwPSB9wG5p/ieyRh5mcVaUJBODlIsUw5bG68jg gNJNSunbiV6lHW9PEFMV7s2ELYHCShKrsqj7glWxKF+nwxvCQJAdruq2EdSWy7ueTutrTp qqtsSIiYLRPLeIrEhmkncasu9tU99kRVTDiU1T4Galyu74wPkVFc/+TM9CzBhw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 03 Feb 2024 11:57:59 -0300 Subject: [PATCH 2/6] s390: cio: make css_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: <20240203-bus_cleanup-s390-v1-2-ac891afc7282@marliere.net> References: <20240203-bus_cleanup-s390-v1-0-ac891afc7282@marliere.net> In-Reply-To: <20240203-bus_cleanup-s390-v1-0-ac891afc7282@marliere.net> To: Vineeth Vijayan , Peter Oberparleiter , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Harald Freudenberger , Tony Krowiak , Halil Pasic , Jason Herne Cc: Greg Kroah-Hartman , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1240; i=ricardo@marliere.net; h=from:subject:message-id; bh=N6FUHZVz7nICU9v02WHrAmRqKZqNMR8e/cf9i/r7ubY=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlvlSAaI76EJeeVXoo8iaG+VhshhoYFeT2164bO RcuJ5CXZBWJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb5UgAAKCRDJC4p8Y4ZY poydEACS+mzfhuRF81tMmnPhK5zhdwkdrD7Smo4iHrRjIo3rGrRcPwv1oKSao5mO74I52AhKiPl NmAFaYdy75D3lmp6F8zUpCwOO94c9u9rzSzF4hGcDxCgwb2ec9VZQyZTOReLwEbzpjgsUsuHral FLXMM7CP277PWR5IdExKGEY5SZy78p58kphhWKlB3XCYfmSB3lRmtDjkFFrt03iKwyjaiYQRf5C ueZ8UQgC8DEvA8sgIA/OA90tO6OJqytjyv3JlbUYCsv004gqvwunlUwjM/QvbeM2X+xGMSMclEF 5A3BRzNWDzro/UnWbvxxpQ5SLc/vihE8GNLSsHnGRTYc5FEDUaHPBIy6nDNB1bb0gETZRzvPDGO +QCxOYB1kZGVx40veOQLJxUpTeeWeyHp5esxw1kmMZlbQ9l1rMpWVlAPr5YSGQ3ccbcZO3RjP59 dJL3uiNjlCGUJVMhU3/X8wHwh9zIfLk0zhQG85vADt7ZXHPhilW0ZeEmQoUNRUDECW1MlylOKV3 BWT93RNweFDyUIVpGWnIv7SBGXbkgih5/cXCU7buWPcKLNY/sPfz6+u1h/d1F9KSE5FzQBC+Z+I eRr1qrx2WNkaE2vR1wyeUG6tEcgVA+DMEI354OXqi5dLG5CLaxZNa2FRIk7d8VNXk3uoyLFguzW Z0QJNQ5DlGHdlLQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789890197938193474 X-GMAIL-MSGID: 1789890197938193474 Now that the driver core can properly handle constant struct bus_type, move the css_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/s390/cio/css.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 28a88ed2c3aa..094431a62ad5 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -39,7 +39,7 @@ int max_ssid; #define MAX_CSS_IDX 0 struct channel_subsystem *channel_subsystems[MAX_CSS_IDX + 1]; -static struct bus_type css_bus_type; +static const struct bus_type css_bus_type; int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *data) @@ -1409,7 +1409,7 @@ static int css_uevent(const struct device *dev, struct kobj_uevent_env *env) return ret; } -static struct bus_type css_bus_type = { +static const struct bus_type css_bus_type = { .name = "css", .match = css_bus_match, .probe = css_probe,