Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2897500rdb; Mon, 12 Feb 2024 23:51:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV5HddT4XM2HXxnQYh4U+pZGg5477aPY7RM9QH5ADjvCjTAi2GBjymPY0HCp4F2jLScBPR7olKc8mEs+2HTIHcX4BX6JcyUq+Y8Mu4lWw== X-Google-Smtp-Source: AGHT+IGu/6wYwRBhBe7erIpzgiwkDFzYrXHhZxgxYrBuJ5euT4OMztYglmKiN9RW3Ak1ginD2Cng X-Received: by 2002:aa7:c902:0:b0:562:262:dba5 with SMTP id b2-20020aa7c902000000b005620262dba5mr206867edt.29.1707810682837; Mon, 12 Feb 2024 23:51:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707810682; cv=pass; d=google.com; s=arc-20160816; b=Ol+Wvp4dllfHx8c3TP335GJztQtFB7Gc5GPZEsyTu2l0yKhywJNSbiwXrBtPdwZmct KoVlyjg0X9aGNZR6YyiuxBhD1r10jtQ+yyaN4MXtvP7az3tpuq0Y8Cq12TRI4VY3kX7J IFu0znnf9pr0VdEI1DPgtJ6zLVR0XeGsUyvZEIgC6Xp1vqwVX39KZKRVMUfm5fOaQW1I ghDhi5QNqCWomLYzdmz5ixGGB2IQv3/EKXrL1eydcPfeWIakdv7si8y4giFq5nByIXXI 9BUGFgdAcmDkBtdZoA9ztCEzPMFJZRtX8TE9grOKoDQbWZyYxulC+ZtPCqMQVK5GkqeV IGjQ== 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=IRMd3DmLaPwuNfy5qvMqAI9wlvK5phDwU9Cy7L0yCdE=; fh=3V2j3V+wIBADwteZdS/9SdLdslVURs7Dm/7pK2pUMpg=; b=CIxSU4D5mFoVvizgL8lKcOAWPTfStr6cR+R34Pcrh4spstc18pyIZ1IE06Wg/OWx7h dSZGC/5aLm9T9fwUitOFnlxnc1d3dpmxui0g4o8G+NmoZgBCRULHyGuA3Js8Qk907QiJ yvJbmwOApO0e3YWDNbXTlJY+aZHNx4ujfxhPtNKxc1w9TzDbys0AwbbPDdYQMW0Z0k/w x9eTr/lmsBji3DGQHwGVX6PiedNi971z1EQZGJTQ4Xq7VqGSTNMhgkNr8VsmP7qU/Ol5 sD2vETowliosYgMGye7U9CWmRf/TQfCGRixlb5V9mdh/yjEKLimHzaXsLW/ABhqLjaGa M5lA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=c4zIn2tb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-62306-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62306-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCUqp4mQq8WHXnGU8GV+UTtjnPaW+87ABNQ85eNTL8NBoxpqqRu/0wEqOs4z4h+79YKSu6sturRdh84xF67fCZLShDZZAkWsjCGc5NH7+A== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ck29-20020a0564021c1d00b0055fc1a01f3dsi3459041edb.662.2024.02.12.23.51.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 23:51:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62306-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=@marliere.net header.s=2024 header.b=c4zIn2tb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-62306-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62306-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net 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 EEF1D1F24A86 for ; Mon, 12 Feb 2024 20:05:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CEF5F4CE18; Mon, 12 Feb 2024 20:04:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="c4zIn2tb" Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 8C2C84CB46 for ; Mon, 12 Feb 2024 20:04:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707768280; cv=none; b=DO6fwgPcKuOI2XLlJ0QLJjIAHumpH6G6R8c64X1XZRdt404Mwl5OpfinCsp8i1PDn0+SrloeixtRj2VZZACjDd0cdkQ8DJyrhJMMRdBy/GfQPW3Z8ssDUDnKf/N7rERcWxrxTLCPfR6mX+ti8SvP51wNa+gBpr+4CnMrhZkk+mQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707768280; c=relaxed/simple; bh=4ZVBO+ZZ7qJwYsFNWtQW7anbtRxiXhpsOjP25YzoSmg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pPg+IksD9v45u31jtMDY23mRU9KC2nQWMK/kqWlaZkcyyVVsLf/lS4mVwLamZaJsBsilIb5R8VoBjG5iRUj6S/nVNjXqSe9PNUQeKy4ICBiaNp8Xs1p5NWowY3V4p9aOGXNavEEDcE0lKl+3k5Nv2pPxLdH9FwmIFT98KGqyby0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b=c4zIn2tb; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1d76671e5a4so29911465ad.0 for ; Mon, 12 Feb 2024 12:04:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707768279; x=1708373079; 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=IRMd3DmLaPwuNfy5qvMqAI9wlvK5phDwU9Cy7L0yCdE=; b=VsD8yadLuUeSW1Uxu0h1JExm7tYbwEjWB86Qp6MjLvEF/H+jmBOklC39ZkUzU7bU95 LPNAxZ9AlOmZhbaMadZHht8UXxMYUbRzvhNLddSs+FnNOFzV1vT134uq/PzA6gTmNl9x NPfRTGArEw/XImJzYuuGe0BsVjHYppTt6mO/77sAmbJEJQuwr5QjrUlZhFZgaLtWwOkq q4Ee8cB8pceWbM0huUG7kFFzwJcwMdYtku4SL8l2FmjtXlP9GB6Q5PJo5qAA1eXepzbH f7tOptN/UtyWeQyECOgS34OdWnRt72z9J6J/jcl49k7RQmhcR9dLgoHZ6ZaHlZ30Jzkh MPrA== X-Forwarded-Encrypted: i=1; AJvYcCWy63SuJ3NKmRaeYdjRt7ijSWCdaC6rlUOukhToA6dpAWV8Ylt4v5djp5g1ui83tq/rjjdoVH/i+E5hIKrAEPyIaIE7SXPgPyufMZmm X-Gm-Message-State: AOJu0Yx0gVzURaYUTcN469Cxe0riFANudgQWaFa1dSAgng3s5cHhzsLu 0H7sb/cru0VGXsyAaB4U5HHq1tVC8+HU/JmQy9E+Rd4AHGdHnC2F X-Received: by 2002:a17:902:e88a:b0:1db:29c2:b695 with SMTP id w10-20020a170902e88a00b001db29c2b695mr1426718plg.41.1707768278917; Mon, 12 Feb 2024 12:04:38 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXIOq0hF/hPZhlh32fYalDvFXC50l3uTYP7hWSp53+wbYCWPD2U7Vnt2zNEe0fbKw/ztcM5EpHruheRt4S22jq14gk7kSPwNdXAd1xZd/3ugxhg+bZZtGsKQIvXGpXPEw5ot+K28yTs5goz5anrzjYvZHlhfXgHmE60+plzST2cGcJjO0FTHpNyKvxPdYLf5QPXp4DMTfwacyxhS9A1MSzNK8wWioUVDLtt6kaNqvEdET6EkP9On3OZd0FMVjvDBi4YZcL0cCvtShqWxNuA Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id l4-20020a170903244400b001d8aadaa7easm722394pls.96.2024.02.12.12.04.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 12:04:38 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707768277; 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=IRMd3DmLaPwuNfy5qvMqAI9wlvK5phDwU9Cy7L0yCdE=; b=c4zIn2tbz7DFJpPM+h4TYSt72F581hIWGPMZ+GP0MavbXRgsAwG9eiMvW1/B3iNTvx+Ph5 shCbkAJuNCo1mRxMWL9VNjqDhSBJFKPiaU7uuFd5i8JttlVeJP6cypsUewlXtv2GdO8tRC OpGan+0/nF2g10lB62EDjACYeT4I6vMv1sqmih/drcSfZd0tcZnAndH9kUk9EsBZpzz4P+ RepKnvlD4Ra8SiHFIR75HIA9z6TVQm5FqO82oepZZjDnacdHRjHbx1CglO3hq0AyOIQLe6 azQ0zyyWA9Qw+jQMNsJl8fxC/G5t3wGSyL23nJEFzN4GgfFm3nqpOdj43M0XBw== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Mon, 12 Feb 2024 17:05:02 -0300 Subject: [PATCH v2 4/5] powerpc: pmac: make macio_bus_type const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240212-bus_cleanup-powerpc2-v2-4-8441b3f77827@marliere.net> References: <20240212-bus_cleanup-powerpc2-v2-0-8441b3f77827@marliere.net> In-Reply-To: <20240212-bus_cleanup-powerpc2-v2-0-8441b3f77827@marliere.net> To: Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , "Naveen N. Rao" 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=1614; i=ricardo@marliere.net; h=from:subject:message-id; bh=4ZVBO+ZZ7qJwYsFNWtQW7anbtRxiXhpsOjP25YzoSmg=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlynnv/PyVOgYd2KioAchyKJniQdC3OK4ih9i3z OsxAU/kd92JAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZcp57wAKCRDJC4p8Y4ZY ph/CD/0RYe4KY9dYDXRqeYmp4qRRSwGRmT9hPk6kjIJFbgBXGecdcHXlNKVqPQr9d7p4lPydOTO U83sQwz3r9UwkhC/yl2h9/2SoDTq2zyko5a34Ll+Iluxlr6BYlZNughubGVIJ9vZawZQKHaQtZs G4cSss9vMQSmSdm18aWOYTDhYJgYSdhVakInGFV3WqOKjNrOxhUI95lsYI8TYZrB5W1x0a3CGFY muRnV6/RzblkFVSGoU6R/vyJs/u1+X6Xp1cRVyr9MxMxJNqLuLH0NGbDnaHVVOcpPVbXA0FKHFH LSLJZ+s+bFuPCak+Iahex9CpyyQnxY3pfNKBnoQVdAe9QLuT6KyLsn5YtnsQRncNIz/Ni0OwMkP g0SodtetAf9V/l3MdY3SMjz2qKqLYgPP6uzScXbi7YN1XwzWTEmwzNkcLMbFwvLLv1pubhfVolu QRqiAqO7JkMLBQe7MsfTqdQ+mfev67du1MR4pePULICnFRBY7lBdVLjsDepRu5q1D5OaCDe56aM RPq0al7Iff/wG6oi/LdJJrONKHtBU+taar+xpcVYVyquc/PTQkxjrx03xq1Ec43Kiq8rJTopwYs 1mJVkf/n3ywVGC/x153u6FzchRyTRn5//f2gzcyNZZ1448srkQZBO8uiEw0NQnvuyGKbEqAZfM/ Vn++nulIlYLNpuA== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type a const *"), the driver core can properly handle constant struct bus_type, move the macio_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 --- arch/powerpc/include/asm/macio.h | 2 +- drivers/macintosh/macio_asic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h index 3a07c62973aa..ab9608e63e40 100644 --- a/arch/powerpc/include/asm/macio.h +++ b/arch/powerpc/include/asm/macio.h @@ -6,7 +6,7 @@ #include #include -extern struct bus_type macio_bus_type; +extern const struct bus_type macio_bus_type; /* MacIO device driver is defined later */ struct macio_driver; diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index a5ee8f736a8e..565f1e21ff7d 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c @@ -136,7 +136,7 @@ static int macio_device_modalias(const struct device *dev, struct kobj_uevent_en extern const struct attribute_group *macio_dev_groups[]; -struct bus_type macio_bus_type = { +const struct bus_type macio_bus_type = { .name = "macio", .match = macio_bus_match, .uevent = macio_device_modalias, -- 2.43.0