* patch "nubus: make nubus_bus_type static and constant" added to char-misc-testing
@ 2024-01-04 13:39 gregkh
2024-01-04 14:00 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2024-01-04 13:39 UTC (permalink / raw)
To: gregkh, fthain, geert, linux-m68k
This is a note to let you know that I've just added the patch titled
nubus: make nubus_bus_type static and constant
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 3faea80bd9ff02b655cb0c80a1c0bdca44c0f94d Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Tue, 19 Dec 2023 16:47:41 +0100
Subject: nubus: make nubus_bus_type static and constant
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 <fthain@linux-m68k.org>
Cc: <linux-m68k@lists.linux-m68k.org>
Acked-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/2023121940-enlarged-editor-c9a8@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: patch "nubus: make nubus_bus_type static and constant" added to char-misc-testing
2024-01-04 13:39 patch "nubus: make nubus_bus_type static and constant" added to char-misc-testing gregkh
@ 2024-01-04 14:00 ` Geert Uytterhoeven
2024-01-04 14:21 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2024-01-04 14:00 UTC (permalink / raw)
To: gregkh; +Cc: fthain, linux-m68k
Hi Greg,
On Thu, Jan 4, 2024 at 2:39 PM <gregkh@linuxfoundation.org> wrote:
> This is a note to let you know that I've just added the patch titled
>
> nubus: make nubus_bus_type static and constant
>
> to my char-misc git tree which can be found at
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
> in the char-misc-testing branch.
>
> The patch will show up in the next release of the linux-next tree
> (usually sometime within the next 24 hours during the week.)
>
> The patch will be merged to the char-misc-next branch sometime soon,
> after it passes testing, and the merge window is open.
>
> If you have any questions about this process, please let me know.
>
>
> From 3faea80bd9ff02b655cb0c80a1c0bdca44c0f94d Mon Sep 17 00:00:00 2001
> From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Date: Tue, 19 Dec 2023 16:47:41 +0100
> Subject: nubus: make nubus_bus_type static and constant
>
> 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 <fthain@linux-m68k.org>
> Cc: <linux-m68k@lists.linux-m68k.org>
> Acked-by: Finn Thain <fthain@linux-m68k.org>
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Link: https://lore.kernel.org/r/2023121940-enlarged-editor-c9a8@gregkh
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
I have already applied this to the m68k tree:
https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git/commit/?h=for-v6.8&id=a15f2d48c6f84ae0dd2000288592c79d5d1acd0e
You even thanked me when I said I was going to do that:
https://lore.kernel.org/all/2024010254-truce-populate-70d1@gregkh
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: patch "nubus: make nubus_bus_type static and constant" added to char-misc-testing
2024-01-04 14:00 ` Geert Uytterhoeven
@ 2024-01-04 14:21 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2024-01-04 14:21 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: fthain, linux-m68k
On Thu, Jan 04, 2024 at 03:00:40PM +0100, Geert Uytterhoeven wrote:
> Hi Greg,
>
> On Thu, Jan 4, 2024 at 2:39 PM <gregkh@linuxfoundation.org> wrote:
> > This is a note to let you know that I've just added the patch titled
> >
> > nubus: make nubus_bus_type static and constant
> >
> > to my char-misc git tree which can be found at
> > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
> > in the char-misc-testing branch.
> >
> > The patch will show up in the next release of the linux-next tree
> > (usually sometime within the next 24 hours during the week.)
> >
> > The patch will be merged to the char-misc-next branch sometime soon,
> > after it passes testing, and the merge window is open.
> >
> > If you have any questions about this process, please let me know.
> >
> >
> > From 3faea80bd9ff02b655cb0c80a1c0bdca44c0f94d Mon Sep 17 00:00:00 2001
> > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Date: Tue, 19 Dec 2023 16:47:41 +0100
> > Subject: nubus: make nubus_bus_type static and constant
> >
> > 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 <fthain@linux-m68k.org>
> > Cc: <linux-m68k@lists.linux-m68k.org>
> > Acked-by: Finn Thain <fthain@linux-m68k.org>
> > Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Link: https://lore.kernel.org/r/2023121940-enlarged-editor-c9a8@gregkh
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> I have already applied this to the m68k tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git/commit/?h=for-v6.8&id=a15f2d48c6f84ae0dd2000288592c79d5d1acd0e
>
> You even thanked me when I said I was going to do that:
> https://lore.kernel.org/all/2024010254-truce-populate-70d1@gregkh
Ugh, too many patches...
Thanks, I'll go drop this from my tree now.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-04 14:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04 13:39 patch "nubus: make nubus_bus_type static and constant" added to char-misc-testing gregkh
2024-01-04 14:00 ` Geert Uytterhoeven
2024-01-04 14:21 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox