From patchwork Sun Feb 4 14:21:55 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: 196512 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp376243dyb; Sun, 4 Feb 2024 06:23:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZFH3CCBikJvDZal7zhQSLbCvGhnuUK19TQrnj/vrLn7XfN5OhlEacflxsJtO7eRj2HRNf X-Received: by 2002:a05:6e02:1ca6:b0:363:c919:2713 with SMTP id x6-20020a056e021ca600b00363c9192713mr865891ill.22.1707056604326; Sun, 04 Feb 2024 06:23:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707056604; cv=pass; d=google.com; s=arc-20160816; b=Di0qVZkmqdHhXgciO+nP+n94tL1qumcLCoW+OzsZpUpKdpaj7u0AhDHmpQLfr3DTT3 UtnBpmyIQzUd3H9nfa0y9HpRIVFJCN9cF7hP5W34MYCK2inT4cyd5A3yH/JZ6IdVUn5y 1svDAXn/qnYuxjHlN2VzxsVcmFk3DayZHbnWkAC9XtW21Qn5loU8q+Wx42kro+UThAYI VtXOnZ6mjAtHh203pNeGj+dF1T1F7VQdyNpf/n+Etqk0UO4qBAv1ZelmY+z3KX4V39uS 9GDWvfbzSp+9W76b7xcYn5KoiMfG4ebqNuVnG1nU9ebXSye0/5k4qNxL9YO5gxypuxoQ b0aQ== 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=KWCI+vqvVxBiSG/iqzOyq6BSjdvQw/1IHnThZEarm88=; fh=sXCYXqnLTzXpCYhiIfp7XualtD5R2wOqwCquXLs+D3Y=; b=lAwcqNAQ4abatOG7d11DcgfP6YWP6Z4MTai7cOKE8K1dGzTItpxsusfGi1T6rtUEZW h2fR23GNQlQuqs/+3JMtKVKZOaImrMlp1q3sc7r+vW2mpDtUPAWOyuSYkoO/cpYKBPqU oOUoS1VBIGSCHmpjKeVd4IB+bMh8YyacwGbNfD0855NhhEeriA6dCKPCdz9STm0bElG6 +esvZHF+/ckRPCf/V/ysD4sjjaadknh+FU6KkgZMgYUBWhFGR0UdfHFOpcLFvKXB0keh qpcTtgY0sUpSvfqs1Nc8eqVrHweaglFQPmx6HMSc+iQN4PYWzuvb4q3OJhpqjgWg/hdC RgoA==; 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=cbefjGrk; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51697-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51697-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUth/9tHE4+cqt+YY+kt5rgg2zegfvP6V9ue6wFXBJbel+ANSuf07q/C+QLTaPY9y+W23yJlH/wG2axQ2scw+sV3BS79w== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 34-20020a631962000000b005d8e12c85d9si4648199pgz.738.2024.02.04.06.23.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:23:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51697-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=cbefjGrk; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51697-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51697-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 1541D281038 for ; Sun, 4 Feb 2024 14:22:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E28D422EFB; Sun, 4 Feb 2024 14:21:43 +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="cbefjGrk" Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 7C189225D2 for ; Sun, 4 Feb 2024 14:21:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707056501; cv=none; b=jL8vvi4Qd4IpvPNPeLDz45MnYimCKGmkGhAS5GKUcFk13DuDojwEzSszjnNSh67ZRycyZ5aHkg0KG/w+6P/dwZJOpmGSarcZJhFJkDMhVyKKqCl5dRfh2VNJj5dWR1HO6ztC15vNrMktBg9pyP22PAOY7qgZrNH8bcDqDsAgg3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707056501; c=relaxed/simple; bh=g8Hjw0Un2UmuNrx1HKqd2DuS7J125zeqL4Rufxc+bvQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mAzEdpVS2jY6dnW3nfbrh7/69XSq/tBPoH3nckjeIYGa1HIm7N1t5rpVSk7dLmA7LbIFOHp5nSBMdcX+uu62/mBz0j0v7nAU3PNhOBV049vLoJt9hjODddn8JFir1BDVvnDrdeeY2fD7uMq29/9RrfM2zalY3rJT9PwiJjnGSLo= 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=cbefjGrk reason="key not found in DNS"; arc=none smtp.client-ip=209.85.215.171 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-f171.google.com with SMTP id 41be03b00d2f7-5c229dabbb6so2285054a12.0 for ; Sun, 04 Feb 2024 06:21:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707056499; x=1707661299; 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=KWCI+vqvVxBiSG/iqzOyq6BSjdvQw/1IHnThZEarm88=; b=Q+JT4qFEQYRrX6bAj4ZpF8diuebUgswkx4bdZYlMiRMf8nJJJGJWxyg5F5CZbGQ9yy XYSSnUb+1WxQMt7169bnsSPaFkA+XfcOdxuEl7tzcgb+qxngMZ31V4HZdN6kXPhZLiR1 p3gOrDsFu10elDvj19k7r+XxrCf0ESzzmZE7ImymKybS6QgA160qCShml6GOWY28jt1P lZ+HAgUmpr/3dznbYnqe/NZq8JksRUVlMYFrz6ko6ubzpiAg4nkAXJdezli11Nwc1lcE qzKnikJmQJxH5W8TRezQGuTQSp6GDVpaAOk1ceHHmsI241gaYEXPLfy8+AxFATtyUh/V dIfw== X-Gm-Message-State: AOJu0YwdD5FREs1DrxvLUCCp80cTvz0uFNs2QJ8melo+83gZ+1bZanCZ rw5PkOgCLU00vlQlTWEKBeNsQRmj50/2YdjcHdlNa9PdVzYdzED2E8iFB5ebkWC4bA== X-Received: by 2002:a05:6a00:2314:b0:6dd:849a:d2f8 with SMTP id h20-20020a056a00231400b006dd849ad2f8mr13150112pfh.16.1707056498683; Sun, 04 Feb 2024 06:21:38 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUivQXCaPIDOria/tbG8UU+udpoEg1uo70idcJiJdt9QxcEycuIItUR+DkiVouQdX/Fx6wLa8p7qSYnKRiNBLE6tLMTdV+C2ZoTEQjpxvkIW6RoNehyZldbnkDjQiLzw3OguMomfLZ17FxLhn9dmzHs6+f9Vs5J/8Oa9w+tc4tJa+ZgCitfw5dV/kTU6uBOZ/L/Gs87IKpJRgPcb+q9VBbNYrKq+4GyBjz5v5DekEf18frvDqfLbFcG1O1m7zzV0DOx Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id r26-20020aa7845a000000b006ddc71607a7sm4844563pfn.191.2024.02.04.06.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:21:38 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707056497; 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=KWCI+vqvVxBiSG/iqzOyq6BSjdvQw/1IHnThZEarm88=; b=cbefjGrkGnGYMopgkkwo/WkMlw3RZvKxDFRronR7XkZQkcFTEPlt289xL+EH5Z79lIvuwF Ijfhek0t99DqpN3Fp8aqO729fE53m8RaUuXmQj2+y4fgkJZyIFhr8wcYSPc6gg/P9wU+kl evfcGQNPwO7aAWre/k0Mw4pQYJdmrFlJC1VhkSmZrT+zqpqYQuypJJiTZmBHVpUOnVN3gD eiG0S+bG2AH4oTe8eMXR349QJWGqxSiNYj3h5TcPFZwFm/Ie4UFX5dFIYKJK5mrU/C+zON 4XCyT+0nmdczEIVfryE5gUQnTs5Deq2voEO4qrTpjbfJe0uh2ck7hdpTnrEGFw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 11:21:55 -0300 Subject: [PATCH 1/4] powerpc: cell: make spu_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-powerpc-v1-1-c763f0e142e9@marliere.net> References: <20240204-bus_cleanup-powerpc-v1-0-c763f0e142e9@marliere.net> In-Reply-To: <20240204-bus_cleanup-powerpc-v1-0-c763f0e142e9@marliere.net> To: Arnd Bergmann , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Geoff Levand Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=971; i=ricardo@marliere.net; h=from:subject:message-id; bh=g8Hjw0Un2UmuNrx1HKqd2DuS7J125zeqL4Rufxc+bvQ=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv52ItRdspNrLF6cpysl5pfj7tSlSrSpBs0/QI 2LP21DjGReJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+diAAKCRDJC4p8Y4ZY pg6YEACmjkpEiBCvlmFcn/tAz46rR5ZB9JK9GTxto8yThevzrnnVWpbKNlViKQkGqB4thL4uyl2 pFle3tE7qQ3WUy/vr5rZkWd5nNQbcBlXOHo/EyXcgz1cA8PSKSG2NJqPbWMEjd0JCYqA2sxfMth dg+aEpmBX9Y0bjHVdBUyOPf96wyqTboDxM5oG1BNVzavQUSN2bCHgqNmD5VU9pdppb/Ma9bkiN0 Lz4dKQUvYNGBkhYXG9QkrrwJyqTvh4qsbpper9rr/q/FmpNS8wIitlZKRJv3jq1nFX4E/qoaOMj R5TtttKuONMpQ0jgMeMjILLnv552lyIdDsMll/HsweuFEDXYQVf1TPc/PSAdDfj0zaHQqQHkEQ4 WjSrNGDWjRIZ5IDOSz8XNZXZT53y+RXKTV+pYiDGXxNuVwW11U/m3Gkdny4IstvqnINARS0DBmJ jJcyS1/IfUf1VQT7CRrGMBKxLb8qylcqVthB9BjqGyAWJ9MWX3RkH+NjTIYjaMNE/6LDBZ1IKz/ +tJDHzcSL5c6YfAEmmGRK0Hu4EOv8ctlNjGR0T676Z+Ajvla7j0eEVm3uk2BD2TJXcBBolAGfjq aEac2jYmgUOYyMW0ol8I1KQkQKFxRB5Yb2OISYjWWWZwdWRYsIag41bmjaXXoTNvWhQC9+zoNMF rpEVID097hbs+VA== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789978585978395152 X-GMAIL-MSGID: 1789978585978395152 Now that the driver core can properly handle constant struct bus_type, move the spu_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 --- arch/powerpc/platforms/cell/spu_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index dea6f0f25897..346e433d2706 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c @@ -465,7 +465,7 @@ void spu_init_channels(struct spu *spu) } EXPORT_SYMBOL_GPL(spu_init_channels); -static struct bus_type spu_subsys = { +static const struct bus_type spu_subsys = { .name = "spu", .dev_name = "spu", }; From patchwork Sun Feb 4 14:21:56 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: 196509 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp375953dyb; Sun, 4 Feb 2024 06:22:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFW51MleO8cNWdwZiGgpyc1PRrhSYpeEvR8R+AgWE4VceoS+PvB0ShoXxKLgg3RaIxnD2mJ X-Received: by 2002:ac8:5346:0:b0:42b:eeb1:d575 with SMTP id d6-20020ac85346000000b0042beeb1d575mr4819138qto.26.1707056557157; Sun, 04 Feb 2024 06:22:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707056557; cv=pass; d=google.com; s=arc-20160816; b=nbIPjz2hyyZcRTgnV8Rm8EuEO2PQ3hWj/vNI8CDhHOD31mL7MfzJji+RWcg81AFp23 OcJ3PLRbp0UWaNpNjrCOf5+WK7D/WQ1KNn6+SzOBhVbZP5h8nL82/F15bwCGM6qMTxvv /Fy3knPGxyPpSvnMBUYobMc9Dbjh7sHdZ74Vw7g0FexBaC7W2wCWI4E87tTlQzrquPrh 0l/SaXXmRuVhet/nfkIxCWhxdDkrI6bBhfswCLv+9bNWHTGaJvfUbYemb+QFtgg10v1e a4uQKCpRpPwEF1HHxKNmtOipdGaMWyGFOWA3/ZhvA6AqrKqyuC0Tq8Y20l86n9zvEnLi NxSA== 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=eRP9nwVzfqXzZs06/31XhntREIV2z9OIdaJ2cgZOe4M=; fh=mlkTRhqzHMvia8Dw/KAXvzN58LEOrY2ghXy7Lw7F6so=; b=SDtnYoLESNzHVxzuToloTCg0a5Ff6U/JyKMWEW/X1DM/t+3ygIcFd5KWJxD4jJqDCu Nl/TfQrEw+RAU7V/xQk2PTGf8WXH/Phiw8+uFWYBsg98vc+RXVQb/CPibeXUz+DxTgAy 9KKD/9oTIi3buHkWo9FzbanOwGXN97cThM5Oe89qEzFhrG4JWEf5kDyI8GaDSkXWwwsP /117JHRCZN9bdjcpcj71SEIa9Iu047cDycM6byxFsiQRfAiq+nOBffv8AyFWz8RIWl+O MXe3NegMaKxn5E0aaV8pcaeQaAzaczmW6vyNE+YLCnkIu7EbvV66PXo+/wemAey224BS 4fCQ==; 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="L/nerkr4"; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51698-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51698-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWZtIk/12SzSbGFimid/4mS/CnHwakg1kxaRy8T4Z8U5eNuGDSOCtguD2W02jGGhjJPax/w8q9OYpwvE3TBRmvY29XdPQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h20-20020ac85854000000b0042bf30f81c6si6541228qth.242.2024.02.04.06.22.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:22:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51698-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b="L/nerkr4"; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51698-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51698-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 ED5C61C21425 for ; Sun, 4 Feb 2024 14:22:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 608C624205; Sun, 4 Feb 2024 14:21:47 +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="L/nerkr4" Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (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 BB76C22EEF for ; Sun, 4 Feb 2024 14:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707056504; cv=none; b=UC+YCw2oH13Nz7YrRSQR8kzPZLf5O3xHwxEf90Hq6R45AN0qctgbKo1EIccb19T/TolK77hs/8l+iwGamNfmgAPgcX2yR1bmF7jx7HBWObwNoCjEN3ZkFNC14vl6J18xGGJ8mUPLvckdbZ5/IofF3eeCYfn/dZglvRws5fzweSo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707056504; c=relaxed/simple; bh=LbQtBWIpeayzEKkseZGs1TpCkdNEpDoo5qvYZttcz4I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h47boYzy4otrC0d0R47OiAxd7mPwjgjawcN+uw+seKfuLyjTUbPpEqF0jMm8cfRtXsmXEfdwWWoircIv0ep773HgWpD81zUS7/omnc/Hi2vCVIqNXlcf0pUpF2WX2NFWW+xcfkpfxMM9d+WVEnM5A+XBUW8+kMP9Zl8RNisn7VI= 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=L/nerkr4 reason="key not found in DNS"; arc=none smtp.client-ip=209.85.214.174 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-f174.google.com with SMTP id d9443c01a7336-1d958e0d73dso17941915ad.1 for ; Sun, 04 Feb 2024 06:21:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707056502; x=1707661302; 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=eRP9nwVzfqXzZs06/31XhntREIV2z9OIdaJ2cgZOe4M=; b=HXmfTqSAnbdo1KmcdAYUw5gxe7ad7l6HFotzQy1hgJ3itHx4jK9UguUiFjP7ztidX0 YxAxhCUwb+MpJWMxXe4HkvWZpAewDTFh6ruPqWQJDT0Si231aVrWOyLXIFbm2PU+K46g Mcwjuse9uvM0XvtSvw0VsnBSP00jxhVRYptCjyj265voO5Cuza+DwS+dFp+9PbYCP/MJ 4gTqFGSJPAGBkWD6/Z+6Fm97+1wuPDgNsfk9oOrMhzvYEGu8i4xCVRc72khVh/q2aHQy oYHGB4wN12wamLFKyoualmuhxLK4qWfL5GA5Y5MR37Yi2gpuiCi24SNkpjzlLWa6wBGm wZVA== X-Gm-Message-State: AOJu0YzVDRw0oa7hatY31UobSdvJapB5k1E9pVo6rznV1SVx6tlQz/yf 5wL1wc5t5bU7MahCTOH9sj877/iN3TibAFlK5IRbkzXW0IwteAYN X-Received: by 2002:a17:902:ecc6:b0:1d8:cfc9:a323 with SMTP id a6-20020a170902ecc600b001d8cfc9a323mr4992402plh.34.1707056501987; Sun, 04 Feb 2024 06:21:41 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWW4FczAcBkmGlHAJ+dvfK68fXImfRdnKSkBOQMt3wW1NpIACutc/k4RSg8GF09gZyVxscPCyO4o3ZPSj0x7DtYC7jujJ47GLmjrPUDeqary7FlMKNGrzSnzQp90nLs/I6e7nDZGnl9KxkRuqzO4hDpEYqjIoW4rKJ2jE2b0sBtsbvdIymBiqrM15LA6b1nTsDpUNryIMp+Oy1tM3Z/fwzLct3WV4Bzv7bBvjVwJdF8ezT1I+mj5KyBnEnVkV+iUxAI Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id mq3-20020a170902fd4300b001d8fc81611asm4625617plb.306.2024.02.04.06.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:21:41 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707056500; 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=eRP9nwVzfqXzZs06/31XhntREIV2z9OIdaJ2cgZOe4M=; b=L/nerkr4PmPGkN/pcEGf+K/Adn0fgm/QPUJ+LwFeKoe/A+xG+IrwR6Ud/YxEizC1mhfAR1 9H8+LN0fv+0ObJVoD0Y+RbOnORdwY29ybiPp0+5A3LlNhcH9td+4fCQbnhAKBZoQI7WM0Q YfkR0Nf+fKUf0Sp0ZPPJff7ucCw6qF57J3DoXgrj4H8NIO7xI3pq7V+CfjO7/XjVkMTh98 euKoBUggBK92t7TRB3X/3pkBE6o6hAhNE4uCdvF+ZZ/rlyjYGA87aZteocMg1SYlpb93y6 aFpl5s4IONSVXSBXsEdieqRVZ6vKek5QUlFwD5fzkBfPJ6KJ5fEc3NfcjqZSaA== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 11:21:56 -0300 Subject: [PATCH 2/4] powerpc: ps3: make ps3_system_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-powerpc-v1-2-c763f0e142e9@marliere.net> References: <20240204-bus_cleanup-powerpc-v1-0-c763f0e142e9@marliere.net> In-Reply-To: <20240204-bus_cleanup-powerpc-v1-0-c763f0e142e9@marliere.net> To: Arnd Bergmann , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Geoff Levand Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1075; i=ricardo@marliere.net; h=from:subject:message-id; bh=LbQtBWIpeayzEKkseZGs1TpCkdNEpDoo5qvYZttcz4I=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv52JxRO4eDxV10GK+WPJFjLd8X15nJiU9EnS+ 7Ak+fD1TmuJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+diQAKCRDJC4p8Y4ZY piDsD/9IzMJ5fF2wreTnLUccAe/wz9zWMeGU9aR9rwr4ggq79drcDnVgH0WRaD7ogxbFbgmbYtI 7b86UCiuNteVR5s033t9FoJ48Hh5Ej4odBY+WIfDRJdfN3t9+8ooaWougp9EA7pY4PrsvO4Yi5K 4CNI0fz8ekmBqe8kvQ40AuM1MmnpS0whSjXPekMDtD3tE3CLtXn0VJkJHqtiJgYPWOf2/UoeCYs /N1XtUCPDGwa3v/FZmXHQQqQmS/rkiqgTWtWQBHdMN5uMJANgTtyzhgFjT+NUKBgl10Y9X1GTMW xb7CW57/X3Z4x+Z/JYaQDvtd4021khd+5DGZZgV7oM0M2J6C32L75iBJPHrzbInk91klXITrpcL AVT1qRhNWsi2efhwekJBruQnBBjXYx2u1c67Hy5FTczv4JRoYLumQWZgMds/od91gztiESG2hYv K+Sypl0fTuMIcjEuu8FLUwKX8RU0JemVnLa+ZSvY8kNcT6boveUxSe9KQ3GstpdTGLqCrLfT/8O 0UERmPvdn/0rjMMVt5+XuKF9XbYUgdLMwSrDGbmylAK5BkvgRfb8fYudU0j3ufvrwxocCTBbGTY DjRBAVS7Ftu/t8NG0cnEle1v3YXfhg9WzwUpA2H2FSzK7kkEUv9erzWyDn92WBi39/AU39udbc3 smk0cBahnUJmeIA== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789978536530307434 X-GMAIL-MSGID: 1789978536530307434 Now that the driver core can properly handle constant struct bus_type, move the ps3_system_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: Geert Uytterhoeven Acked-by: Geoff Levand --- arch/powerpc/platforms/ps3/system-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index d6b5f5ecd515..b4298e98ffe8 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c @@ -466,7 +466,7 @@ static struct attribute *ps3_system_bus_dev_attrs[] = { }; ATTRIBUTE_GROUPS(ps3_system_bus_dev); -static struct bus_type ps3_system_bus_type = { +static const struct bus_type ps3_system_bus_type = { .name = "ps3_system_bus", .match = ps3_system_bus_match, .uevent = ps3_system_bus_uevent, From patchwork Sun Feb 4 14:21:57 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: 196510 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp376081dyb; Sun, 4 Feb 2024 06:23:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFfMawZeLYLgbRG2K4v2l3lKG/taU1UVkDWj4lzBPJPlv7W9ZFOF3zlw9VsWuwyK3lMintq X-Received: by 2002:a17:906:b754:b0:a35:fd93:8be3 with SMTP id fx20-20020a170906b75400b00a35fd938be3mr6769114ejb.2.1707056579892; Sun, 04 Feb 2024 06:22:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707056579; cv=pass; d=google.com; s=arc-20160816; b=aqv0rEquUsOcV/lhklTvAkJnuFpJja6Bz2dSWIf2gOxUxTr7R8y4v3UyPODhdgFiN6 qv2UwV8jX7BZ/id8FK7vZn1LVlkNpzsaUf/evKJBQ0emxS24ZS4E1h41ik+qXjbORoYr C4eLkw81hA1q+5kWA3sRlW6Iw1T4lU3pctCfCDgseonfyKr/01GYhrrHxkHWkJMCEAQZ Rpv+sXjdMH8gujEQlrZKSxBMje6wgKJziDNqleUVN9RlNTbtGg14nIFMLf/lhu79Fg8d rAohBj4mBmrSxcxcGDyi6cCku/+1/If8BiBMINJa4bIkMUm8ldn3fWgcH4PDV5wW4Z/s Xn3A== 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=VHTVR82oJxjzskpZPEdBmE91C5T4iAunxv4wjFY1nfc=; fh=8pAJIdP3dOciAgyEKWFlWtOmC1cu8ywoLKaO60EdwPU=; b=MyTGKwtLKfUpAKb7d1X2Ao9D/6BWjWRh1yGjoWlAhSBG6FIeRv+a4h3XyQDsty3Itu Mq9uPDlzIZwKec9UqC/FxQ4INgyfjvMfLGgf+p68CaAU/jvU+eUnv1L7RrCgkzn7GgYc rCeR4bpioOXn8nZYDvlZVvoWYVT6uz3XfWVGBPV3fBnkvCam17E2wBYd8+gsd0WZS3QF /EvXd5lY19ti5UtkHDa0fc7Bu2h9OZZQjf0bSLSugMhsNUWPmWlkFnHo56WioHc7sXtG dZs2OT8Vks+7RFxZhopGA7/PQ4cO7W9Krf63PTi56JY3jFrTIYicVW9LMF+TeEhH0EMV Isow==; 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="h9RJaU/i"; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51699-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51699-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCUgkp3xLZ2C/scW7coVpZY6elHkTcjbkqqncHF+T09WODQAYm5Uab3BPb/cGZDdvRtkCxLVRdIiXRK3618DKAD+WKM2uA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id mf27-20020a170906cb9b00b00a317601a8b2si3063309ejb.350.2024.02.04.06.22.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:22:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51699-ouuuleilei=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=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b="h9RJaU/i"; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51699-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51699-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 8C6E61F22507 for ; Sun, 4 Feb 2024 14:22:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CCE924A12; Sun, 4 Feb 2024 14:21:50 +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="h9RJaU/i" Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 0786A23751 for ; Sun, 4 Feb 2024 14:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707056507; cv=none; b=ayq8MqQLuBd7w+KjdNeAf56+I32hbtBJ5cVecDUkzg/lNnzZk7/ZcSc2xakOZB8DOZnsb9lNeEYZ2B0zbUcwTxDCf3LdneU/mvgFP0Tdc7TMGynbxG3T5ZiOe8wrM/vtWwYxwijdT6c725KEbqYWiIRMLKfiRZViadmGv0hxaD8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707056507; c=relaxed/simple; bh=vX4zjhZKqFa8JoxKRN7aX2nEk1pJYZI5Yuxa5g51+Ic=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Nk4X1EG8lUl53mS+uIB0b3q6BxjZ63n3hk2HxQSRykAMA9R7l66EBYq4LaxOGVgGPS8s0bmQA+gbz0PlwmL6/tVEFw6Q19mGCppb/QO1Acf9gFQNvT3W48IGEbLVAn2aVYliLI6wbgkfw1Tf5CPBPYuI+ld273opZ4LNpWsuF3c= 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=h9RJaU/i reason="key not found in DNS"; arc=none smtp.client-ip=209.85.214.180 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-f180.google.com with SMTP id d9443c01a7336-1d9b2400910so628685ad.0 for ; Sun, 04 Feb 2024 06:21:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707056505; x=1707661305; 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=VHTVR82oJxjzskpZPEdBmE91C5T4iAunxv4wjFY1nfc=; b=DCKLydOl6TXdllKE/h2SnyM/c5YJOjV6YQHTu9lpGyzITvDFLLchHyZbCXuvG+dMEd r9T664O2ZeKvR5vEcbEHRnaSqDjY79IjIVf4M8Ymv/gZzqsTDtjsxMigccXPS6nGNFeD 8DbmgsNUEAAiPtpqM1HzvBTsNhtyUCqEP0LcwiWPiE44DKHUen3LOaERgYe2cxDXJcos hGsHONa/4bKnqo8Ai2nCjho981SLjoeJ+hdB2C05pZZZEkaRRN4eqOV+lE/ZjeZsOgDI 0LNO+g6VJiNE1NaRb88xJ/e0BitZX4TGOA3F9/y5LOUeha7RSFoULReEaeqqEZUaV2vj U50g== X-Gm-Message-State: AOJu0YxgaLE8smU80rjYjkiZbgj0GV8d/xwggM6oR8gHCtcusCq2HFBn ZV5ogQUkWyflVA+ijgWrTZXCT/C2XrHh1HrO2zNfETX1efnR8aqX X-Received: by 2002:a17:903:98c:b0:1d9:a15:615d with SMTP id mb12-20020a170903098c00b001d90a15615dmr5281659plb.1.1707056505235; Sun, 04 Feb 2024 06:21:45 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUhC94iyl0+VWBvOMii/Ie3ZeOnJPwaJglnNjuI4MN5P+jK+5NO+K8t2AD3Nw+NK2FfuD0xLeb8vODLn9BgAf0iziOWHtiq0o7RzDbCO/hXyIobzMj6hhmrSWq0SK8x2WYALXXP7nU4JAMp7mZqrvtwr0F2xUCJqhlWofgTvsWzcllWPLe9npaGiG8JalL1mEyfx+DsDP014R5KH/g+ycBWm+jI+oFTvj8bWvZguGerqXYnR6tcW0h5LKTsF85JcLqb Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id g2-20020a170902c38200b001d8ee2884c6sm4609803plg.218.2024.02.04.06.21.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:21:44 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707056503; 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=VHTVR82oJxjzskpZPEdBmE91C5T4iAunxv4wjFY1nfc=; b=h9RJaU/iHQx+xntBzJkEFD2ovMgBGTUqNtBTge7Qh7LVL3klLNR4GW6iranmYAIYJKODRw JC/rTKcnEx+NkhV42R9gdRJAWtxn+yXdpEZXW0VtuE8uEbhZyGKkNOxX0QtYvnR4mdyEv1 nV/w+5WiSgUj6ke4Hlra+FxL9xCPr4YDKGjwS3+dZqLY2aTCqzC5AfwJ3y1aaNG/T6Hd2S sZfb/dm1vgNaKZpz7q80D+Sb6cpwLaNaLBM8+AdgyF+uww8NMYV8Aks0efJPlWD4pxxGAX armnejmHiNlRTcchM0HcX3PKFJt7gTKz4kvgh0u2IO6nj7KWXXizYLb36MBU4w== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 11:21:57 -0300 Subject: [PATCH 3/4] powerpc: pseries: make cmm_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-powerpc-v1-3-c763f0e142e9@marliere.net> References: <20240204-bus_cleanup-powerpc-v1-0-c763f0e142e9@marliere.net> In-Reply-To: <20240204-bus_cleanup-powerpc-v1-0-c763f0e142e9@marliere.net> To: Arnd Bergmann , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Geoff Levand Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1015; i=ricardo@marliere.net; h=from:subject:message-id; bh=vX4zjhZKqFa8JoxKRN7aX2nEk1pJYZI5Yuxa5g51+Ic=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv52JH0RVChP/ofquW6EPeXAMdjGo10WSeUC9O h3sBucb3ZWJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+diQAKCRDJC4p8Y4ZY pkadD/0TlY8FzfIjCQDLawUdlYcvbSomh3gXRLnEHroWY/LecVGFkF3AkbtPP0QIYBXD5T31HFB HVypW5RmOBQFdiFBG2sHO+PCkZBvzkJJewhHZNW2eF/uYqr2SfnDY3+MwmJyCYCTNKDVMdDqqk5 kKOUUXv0YW5fXx4v2Uju0b8G8oAthRrkfKwiYMXm87gpA06e6QuCxUHEOyxisJaFiVfCdI73I9/ L63eIOxFStcTa9yxet3Culd3mN6R8T5Nk0rlHqYoT13DepgrIkkuIrVWtWIe8jvqWA5Hrv7a0PO sKc8ml7h4B2XY1OfpZHeD/1TKxjBtulPfhD3p71EhodEneU+yD0d89Qa6IhafmWG7ACX7Zr1Ech gt8gPI2mkJxcWviJ2DFInqAG0kztc4YDOdnxuBRjkZEqbZ6JOqZ6cXXGcx5/glhAFiiv25bzDkl GBIz7Oo7rydanRQUykKDN7S+pNqM3wjBKYOJYdCktkQNzO8pTTlt6wspLz2idEfI2cntNkmjPmt cihQJ095A+Qaaq8qepX1esm/yOfaB5KOyrZlH8ke8IiQm11HYX1dB3dzR6p5lgaNAGRfjRip2gG ZNwagG60OdKk8UaEU3M9c/NkhPbn5PVk+UGpgrMkVgLKzFlWHYnxFEUnXTCDpfLmVI+50CtmEHv 9lisZWj+nM2sLPw== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789978560313268077 X-GMAIL-MSGID: 1789978560313268077 Now that the driver core can properly handle constant struct bus_type, move the cmm_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 --- arch/powerpc/platforms/pseries/cmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c index 5f4037c1d7fe..6307dacc3862 100644 --- a/arch/powerpc/platforms/pseries/cmm.c +++ b/arch/powerpc/platforms/pseries/cmm.c @@ -375,7 +375,7 @@ static struct device_attribute *cmm_attrs[] = { static DEVICE_ULONG_ATTR(simulate_loan_target_kb, 0644, simulate_loan_target_kb); -static struct bus_type cmm_subsys = { +static const struct bus_type cmm_subsys = { .name = "cmm", .dev_name = "cmm", }; From patchwork Sun Feb 4 14:21:58 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: 196511 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp376190dyb; Sun, 4 Feb 2024 06:23:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGo7X1ARZ/lECZp0nhV6dqU17Y2mB36kOnyYKme9FjS9Ts4hTsBxhU775qMNPAAD6OdPTSO X-Received: by 2002:a17:906:bce7:b0:a31:45a6:2bb5 with SMTP id op7-20020a170906bce700b00a3145a62bb5mr9511988ejb.40.1707056596945; Sun, 04 Feb 2024 06:23:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707056596; cv=pass; d=google.com; s=arc-20160816; b=jxRkBYqTiqcUXgdsVJrhKcQfKHieVtlxdpH7gcVwygNfGdH/yTvvYlezwnvGAZxIQg IFBTqC36nSbz8s8yrY+yqRfkQN1QbJc8goRB4PXE/WH5X/wvMckrzzMmbTFCNv3pqRN6 uLoVhZHk57VzHDksJOeLzEgZ/wvxM1OUDpHTtHXaOXcAeS6pT+2DHTQt0WNgxPdqpUcl SX+BSqrouUOTt4DaxnQXWMgauSTvPUiWdf571XLfbvsqSKt0lo3ydO+N/yzJ/VOQ8nZo GcZp6+h1accXYrtB4ZLrLSd99azwIoL74dEXzZw0zH0U22++mdxGn3CriuIZ/c1fw8TZ GmOg== 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=DM1wclqTtJ+/yCoNOLkdaIuN4wdZRWjTbqonpGJw8JI=; fh=EVhQKJKZ4X2Crx/SoGA/YiPDjpgFagf5PQy4rs8Lxfo=; b=MvEt8N84PRWMHO9Xt3HIjXeJcw2M44NLq2tIhyYD8qv3SqiNo5d95Ym66Y1cDZaXRF Hmm3ejBdslomCTtUlibwAfaxp1TVBEYYpoFWKR2QFlhQSc/PpkVeP1m7yUov65opvy3T FtoiUdWjdnKafqoog8fS7CstGUNDhrg1VU/8THBWkFGwyDjt4xOt8W8CqhxEvfXjVGhr yihNMYTVaxgRmfTZGnCCeQMutUC30q5CMsR52ecyXRLNFKhP7KcR9IGLevjoEgbq/h7p 8TMZOeH4sQA7wB8pOh0iOFLsCWMOPPc18RNx5biUWfsYs3mhg+qyvuy09x3PQvIIjoxX JmCQ==; 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=WK3V1FG3; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51700-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51700-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCX2NBfvnm1Dl6zvb7ckCJdlvkXGyP2gaIVi0LOe2K1+DpjfVkaET2591C0VoYkdYJJ0Dfg+cAME798IpaQ6hpa/39jMSA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id md20-20020a170906ae9400b00a372a36d80bsi2230994ejb.392.2024.02.04.06.23.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:23:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51700-ouuuleilei=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=temperror (no key for signature) header.i=@marliere.net header.s=2023 header.b=WK3V1FG3; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-51700-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51700-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 65EB41F224B3 for ; Sun, 4 Feb 2024 14:23:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BB3F250F8; Sun, 4 Feb 2024 14:21:53 +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="WK3V1FG3" Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (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 09F36249F9 for ; Sun, 4 Feb 2024 14:21:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707056510; cv=none; b=GzwPzIx1itCaTWq3R9r2uSZOkdKllu78Pa+OXZ1MT/C1AT/h05S4wkPjUEPv3rcQR7hel95n2Grg+OlvSNhTDxEG/6nt1zU2ZG2Bjj3rwsNt1IzP2A9z3zGTC7m6bOc4TDDvAajzXGnWgI9Cm2Fns99ky5j38YT9FhLLlHH42FQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707056510; c=relaxed/simple; bh=5r8tPAE4JJiQ/TMfO7ryglYRMYVtmuiRDdzPD20d+eI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ClQjulrCpirtTyDJafm/OCK1YrNGvVhcA20p4wpyYLNtka2Y/387I6lKd8xglWf5njdmQ+twdAAyRhAhUl6m9AGKttKbZsIwZpr9fAICwO8nAUwVE+KbUJJCuXae128Q6HKMFc653mhrPXYVo4iMIZrl5gmye3p4nJzNhBlObQg= 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=WK3V1FG3 reason="key not found in DNS"; arc=none smtp.client-ip=209.85.214.174 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-f174.google.com with SMTP id d9443c01a7336-1d7354ba334so31872425ad.1 for ; Sun, 04 Feb 2024 06:21:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707056508; x=1707661308; 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=DM1wclqTtJ+/yCoNOLkdaIuN4wdZRWjTbqonpGJw8JI=; b=OtSeJob+0mKUN4N4CFkm1HdEkKAX4ZULTrmdLFvusT9kpnII7OAMUMktGY/Q9lCg/k +d+xrPhm3AQrS4CTVPCiz3u8GWhJXzSWrYUfJ10+e9/uxfxUYO4mR5bxmnBbjoOVHAu0 m0iYToMu6UXLynp+/LINU1XnJOj1HG1w13TSYGmwsF4MWW7503BllD3V96avo+VARHBt LhhZm9qCauGibaEP3Ockd4ZM+E/GbSnsBvnVNnaYnfpjS2CZeNQfqeel/Bn4V0fI0HiK LL26g5aT67rpzXcKLAigSAh7V6uiqch78Mx8G17H0StUiX3j181tXZZplLn4Wgt3/7Qt dV3g== X-Gm-Message-State: AOJu0YxwG/9GlyUwB358JQ4YmI9Jje29uYUxYrQZptiPTiKjyw25UKFy xmhATfQO6VkW4nI9SbgVQhnxPEFIAHy8e6z0ZxBPGy8SxNGPxi7F X-Received: by 2002:a17:902:d4c6:b0:1d9:8fc6:35 with SMTP id o6-20020a170902d4c600b001d98fc60035mr5472471plg.15.1707056508444; Sun, 04 Feb 2024 06:21:48 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXFJSX5qjqrqhBMTuQdKaXScTPowLE0tBasLmOzydkWG6XABrdrT8wqS3Wcj1n6Zzixrg6hrwXofBXEI2/cnsU22fPr//4+tQMt4852e/pi/5nNv4FjWcaiT3vBn93sdsXPjaqqlCxFFYuzr8VJySscPpAixRlt4z7HQU2iNN3UFfQwWq7iLACRhOypSqlY4lLEugbhicoEHkCPgAqPIPBK0BhI0GmAp3Gdpr9sYDoueU1H0DCm1YZhwSQsmYHkZpur Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id r2-20020a63d902000000b005dab535fac2sm5097095pgg.90.2024.02.04.06.21.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:21:48 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2023; t=1707056506; 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=DM1wclqTtJ+/yCoNOLkdaIuN4wdZRWjTbqonpGJw8JI=; b=WK3V1FG30pTDXErhU6A8V1nmaEE3ZW0hDpcaQEa9JBtKoOMLXG6AhgggNZ3k/0PX5BvTCJ 8TzgwlHZ7kVj0Axx+zXzZ5lO4AGLDedzNA1UCJlwW4L8Z8DzKC3ZZTCAUNAA+mkaQLZ9KJ GKfNmpha/cMVPNrCVFRpbZcXNZkFbW1yKYEwuWWXYjyPMJKwp7Xy0xK98ZDYjYFkYsm8Hf 0gF3W0AQx9cTglwv6s5oApK/tB/wcyF10+5F607wE7rPrT72Okj3SPdoHeVGwnNoqQermq BMx73JUci00NrjJDQ9TMWBkoZ4H0f8wUdBQYmtfE25ZJ1MImca1fKwEi6uzRVg== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sun, 04 Feb 2024 11:21:58 -0300 Subject: [PATCH 4/4] powerpc: pseries: make suspend_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-powerpc-v1-4-c763f0e142e9@marliere.net> References: <20240204-bus_cleanup-powerpc-v1-0-c763f0e142e9@marliere.net> In-Reply-To: <20240204-bus_cleanup-powerpc-v1-0-c763f0e142e9@marliere.net> To: Arnd Bergmann , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Geoff Levand Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1038; i=ricardo@marliere.net; h=from:subject:message-id; bh=5r8tPAE4JJiQ/TMfO7ryglYRMYVtmuiRDdzPD20d+eI=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlv52J/wzsesxRSSPnJ5rCztFrehjjQWiFrmPB0 SjinE4QIhyJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZb+diQAKCRDJC4p8Y4ZY pghvD/9p/r1OMruDDruavs7mlXgYdpGZBqX0Sx9e4jpOPBU8fYGah6R0HrUIAQk32wEul9pna27 X5/g7MvXsA0Q/0/+aj/XGmMeoqZbWWe8ZvCK7b4y2BEpP5Ek8wugNYU4yIvpKmsnwwATsbUuYd6 ZhBxPF6wSK9AzLLgRXD+9CyVzZkFYNeWt9JGEsdHpN2NEuza/TbC7V1NKTkArEpbOv5xPhkqpzZ t5f/SEEAR/ruJYHGzQhpR3TRmx2kLwnDd0ZN9/JtzCC+6xL1fMf64puEjT+xUHY1YqITyqEJnag SRKWVrYF94vvsfAYpvgEAlrUCImZumTmuCiFa4tYDOtl7IaQIiny/NI7fLZFh05RO1TKUrxyubL uUpsL32dnPWjaNVG8ClnkMBwR7wb2cHUSO/Q19cgWDCF2nl3ICSSdBMGIPQWF+mSgOpgv/KqDTY +3eBuejg8f/oLSEVjZGwla1Py8AR+RixFiYlOaiHKo5XRTEnW4szpnMSFtI6q6/ZyR3INHabBJ5 Q0IlvqDaZOrFRJMsGNYvr0NW6SmqxC+YRkJlmDU5kp4CAjj/n86YlBn6qETZ/PvXxddPQ0XmM1f FJ1Um9H1F0KvtUhUaWV1a6Jkc7bJfZKlDS6ftSP1ZDEkSWuEiUy8VKHEaIEBhvfRW5k/cV1WkO9 JzjGbrUONmmZLgQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789978578200545908 X-GMAIL-MSGID: 1789978578200545908 Now that the driver core can properly handle constant struct bus_type, move the suspend_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 --- arch/powerpc/platforms/pseries/suspend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/suspend.c b/arch/powerpc/platforms/pseries/suspend.c index 382003dfdb9a..c51db63d3e88 100644 --- a/arch/powerpc/platforms/pseries/suspend.c +++ b/arch/powerpc/platforms/pseries/suspend.c @@ -126,7 +126,7 @@ static ssize_t show_hibernate(struct device *dev, static DEVICE_ATTR(hibernate, 0644, show_hibernate, store_hibernate); -static struct bus_type suspend_subsys = { +static const struct bus_type suspend_subsys = { .name = "power", .dev_name = "power", };