From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 7249C4A9A3 for ; Wed, 20 Dec 2023 22:17:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="XLjtep/4" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 874465C0889; Wed, 20 Dec 2023 17:17:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 20 Dec 2023 17:17:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1703110669; x=1703197069; bh=OZRcAdL4EQ+8sSj6ubSGPK48MTy5 E2DQIyh6YCxr9S0=; b=XLjtep/4NmK0SclOZydu+yJDTtTDQwxCTXQKQzTxBqAu CMbfpzE5X4GOygiu0cJW0XDz58L9jyx0AQLj33nDNvm+6m58rJO/Q/t8fs564Le6 nzBWv+4LoNg0chc6f7IlwU4N8XPR0EYdIydx03v9jsMN8iRP00cHGqZtfZxoUbBg S9Sqzh1ducFentSuC18DjT7IYy3mPd00Y8iFOK/agtFlQe23WwXIz0QVN4jGbG7O qIVdrBn1Q8Z+zd2+SD/AJatFB9NPczsCR/v01vY7Om3+N+2DM+KeUYHCRPuSHWUy w6698URHm8OL2NsEbvRQpW9C0woVyh9jlN1QCWk2Xg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdduvddgudehlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefujgfkfhggtgesthdtredttddtvdenucfhrhhomhephfhinhhn ucfvhhgrihhnuceofhhthhgrihhnsehlihhnuhigqdhmieekkhdrohhrgheqnecuggftrf grthhtvghrnhepleeuheelheekgfeuvedtveetjeekhfffkeeffffftdfgjeevkeegfedv ueehueelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epfhhthhgrihhnsehlihhnuhigqdhmieekkhdrohhrgh X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Dec 2023 17:17:46 -0500 (EST) Date: Thu, 21 Dec 2023 09:18:10 +1100 (AEDT) From: Finn Thain To: Greg Kroah-Hartman cc: linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org Subject: Re: [PATCH] nubus: make nubus_bus_type static and constant In-Reply-To: <2023121940-enlarged-editor-c9a8@gregkh> Message-ID: References: <2023121940-enlarged-editor-c9a8@gregkh> 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=US-ASCII On Tue, 19 Dec 2023, Greg Kroah-Hartman wrote: > 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 Acked-by: Finn Thain Thanks, Greg. > --- > 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; >