Received: by 2002:a05:7412:a9a8:b0:f9:92ae:e617 with SMTP id o40csp15991rdh; Wed, 20 Dec 2023 14:25:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IEB8JLtmrxWYB8j3pyM98dUQb8kyyZxt0DEmX01ULeBcHiV/fv5cB7pLG/79KXzKKhw0bzF X-Received: by 2002:a05:6359:6d07:b0:173:c5cc:5027 with SMTP id te7-20020a0563596d0700b00173c5cc5027mr272902rwb.56.1703111152266; Wed, 20 Dec 2023 14:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703111152; cv=none; d=google.com; s=arc-20160816; b=Sl/0JvRvUR2o6XfSzvfjSb9n3qUHVHgxg+KYt7nOOAktcSKdFbSrL0KduneMU0qri0 mxqlg7n6vwepol5DUM0vYFkBdgLSh993jh7ydlbx3pv05xxpburlQNurS7lB3eQObZV4 GsVvSeUxPxLQLTbfShT5ixQK9pPBQlOAEK1wdobMgwGWOyEDU/AZpJlOrUE7J3S/VXNI jZ2Kq2VELYhOsEPsie7PIRUT4gavkYaLotTxZ4uUUe67l+Ldx//05j3hzxjNXO1fYTov 9rg5Dv1IYD3YtuoTTYrqiKrakEBc0loFrsms1Vlrm0dTFYOkqK8MRO6vBrcVZ/yWUSQp Nepg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :feedback-id:dkim-signature; bh=OZRcAdL4EQ+8sSj6ubSGPK48MTy5E2DQIyh6YCxr9S0=; fh=lc3HGO6T8JDP7LXN8ZBFdkljE8fR5TklOEhCVvoF+cI=; b=NWV+pzZIGMDPyynZ/52yZMOV9399N/oD3i+qJYKc82jdyDm0b5rwR+EVqb+x9gsE9G 4pp0N6pPD9gp9zm+qPCmPPq1W7tAUqn0sgRD4Z52eVvOlL8Sud3BmqKkP94beoZprb+I fDxRkisEQ4bQzAtM1waRclw7wEioDx0k2LVcUyMzFTovju8XEK9cbwR5TeqpUauti2Vf ZqTIgyl+1jzRjqCRQm87GlS7gQYLeIETYOY8rI/4GZNAduYoCmilW24aQFkQfH40w81D qTp6fLkFAWHhlVTJA2GSG0psseeoIwkbRIxU2jqpIIzbDKH4Az1zJgcIsiBPxP8gccKH uF0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="XLjtep/4"; spf=pass (google.com: domain of linux-kernel+bounces-7502-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7502-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s3-20020aa78d43000000b006ce6b4258ffsi378006pfe.302.2023.12.20.14.25.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 14:25:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7502-linux.lists.archive=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=pass header.i=@messagingengine.com header.s=fm2 header.b="XLjtep/4"; spf=pass (google.com: domain of linux-kernel+bounces-7502-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7502-linux.lists.archive=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 B624F28D3DB for ; Wed, 20 Dec 2023 22:18:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15B124B5B4; Wed, 20 Dec 2023 22:17:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="XLjtep/4" X-Original-To: linux-kernel@vger.kernel.org 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 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; >