Received: by 2002:ac8:5349:0:b0:427:7d78:cd45 with SMTP id d9csp270436qto; Tue, 19 Dec 2023 07:48:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2LuxhUZ79DDjvk4bufxSFlQ5qMFtkwb4OkoJCcoGHaUu4IABAKm38BMnz1RoyW1co7mjR X-Received: by 2002:a05:651c:1503:b0:2cc:1c71:aff8 with SMTP id e3-20020a05651c150300b002cc1c71aff8mr8785115ljf.97.1703000891088; Tue, 19 Dec 2023 07:48:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703000891; cv=none; d=google.com; s=arc-20160816; b=piZQxSoJIpN2J+ugZr4PYPSDwGMCp1lvSEGVRtm2dmY7ee1MX1wvgkhZve8pdOeLKJ /CYMx81Mqrm8231QBUXZ7t/eWUeHibHt7HgQeTGXB1z2MW8/i3uYEokYTwinFVHT4yQ+ nZbjz9o68YF2+9RdrvnRB5sYb9FJKABjYnk20bESlK37GhC4Qdjwzti+/nD26kMghu1R iRkvoHbNqSO0Do2IBn75dB1gmBGJRZC90y+tDQ++iGev6XRyyDC6Lc7TjNopmoUN9aiV xn8GoFORvtswmGg/5qwgwGBV18KB/KTwGY8POyb38KdYaXVj4Ln5nSS94u4V/quxJxqa 02lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:lines:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=WYAoSUAnEikx1arqpbNb/qT6wf+fsiOPCXCtbALDuuc=; fh=iMc6xH8O6u+a52UK9htI4IoBlmsqUxYdlDwpM8Vb6Jk=; b=LCAaH8lTiN5c9iDU5TWdciJbT7TZVgx6qprr1bCYro3KbNNPkjNdNaBuPeQciP/s51 z7jqim65pRRWxyP9RMEF5qsGtUKkrYu2l0l7yr1BuXzGuS9mtzw777+wJq7T05Xl2H8t bkW0nETlhfsr1N5FMGP88S0YRBouPG3vgcgtsfFQCdo62Q74f3f9jLWMWyA0pjTXtIju ZGRmE8xeWFVhapVYP/6s/X55zDRs3FkSriAL+Zl+KJkPihdEddJnoXZSj/qStY1QON5C d9PKs0OEoz5csN4kR39Cq8ZdpfWpFT9KCyXySrAYtsl9jNUBDY3afJewXeatry57DnaF pPTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bGZ6s/uI"; spf=pass (google.com: domain of linux-kernel+bounces-5513-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5513-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cm18-20020a0564020c9200b005538d6134b7si816525edb.246.2023.12.19.07.48.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 07:48:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5513-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bGZ6s/uI"; spf=pass (google.com: domain of linux-kernel+bounces-5513-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5513-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 B7D5F1F24929 for ; Tue, 19 Dec 2023 15:48:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B39B1D55B; Tue, 19 Dec 2023 15:47:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="bGZ6s/uI" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A9E9E1D529 for ; Tue, 19 Dec 2023 15:47:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08150C433C8; Tue, 19 Dec 2023 15:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1703000864; bh=vD7Qje2e5zx74+SAAnwR4GIvB/r8Tg9rSRMD9k+r2n8=; h=From:To:Cc:Subject:Date:From; b=bGZ6s/uITfwIpC2wBycYd81315kAJOgKnV+PoQVeWYlzEOQWtGy0ebzxc4b+JIulQ VZPUqeMh+S0IFwbsaoaXphTzPC+ZRvQUueW2OujHCpylw6gCnoL4/oYrJ+avrEVQPb vY+G6DJP8FNxQnNItooFF125r+nhBSJC7N3QTLt4= From: Greg Kroah-Hartman To: fthain@linux-m68k.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , linux-m68k@lists.linux-m68k.org Subject: [PATCH] nubus: make nubus_bus_type static and constant Date: Tue, 19 Dec 2023 16:47:41 +0100 Message-ID: <2023121940-enlarged-editor-c9a8@gregkh> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Lines: 48 X-Developer-Signature: v=1; a=openpgp-sha256; l=1588; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vD7Qje2e5zx74+SAAnwR4GIvB/r8Tg9rSRMD9k+r2n8=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmNu2Um72RyuhtcOCvvxJZyfvOORXsW+n1/qbNx6pUf7 wsdvFRPd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEZBwYFmz/tMGYq/9GTWPm yTPn+9Z9iQn5tIdhfvizhkK3NM97D5fHBYnu+v96x6sF5wA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Now that the driver core can properly handle constant struct bus_type, move the nubus_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. It's also never used outside of drivers/nubus/bus.c so make it static and don't export it as no one is using it. Cc: Finn Thain Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Greg Kroah-Hartman --- drivers/nubus/bus.c | 3 +-- include/linux/nubus.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/nubus/bus.c b/drivers/nubus/bus.c index 72921e4f35f6..12df4d88970c 100644 --- a/drivers/nubus/bus.c +++ b/drivers/nubus/bus.c @@ -32,12 +32,11 @@ static void nubus_device_remove(struct device *dev) ndrv->remove(to_nubus_board(dev)); } -struct bus_type nubus_bus_type = { +static const struct bus_type nubus_bus_type = { .name = "nubus", .probe = nubus_device_probe, .remove = nubus_device_remove, }; -EXPORT_SYMBOL(nubus_bus_type); int nubus_driver_register(struct nubus_driver *ndrv) { diff --git a/include/linux/nubus.h b/include/linux/nubus.h index bdcd85e622d8..4d103ac8f5c7 100644 --- a/include/linux/nubus.h +++ b/include/linux/nubus.h @@ -89,8 +89,6 @@ struct nubus_driver { void (*remove)(struct nubus_board *board); }; -extern struct bus_type nubus_bus_type; - /* Generic NuBus interface functions, modelled after the PCI interface */ #ifdef CONFIG_PROC_FS extern bool nubus_populate_procfs; -- 2.43.0