* [PATCH] icuv: make iucv_bus const
@ 2023-12-19 15:07 Greg Kroah-Hartman
2023-12-19 15:23 ` Alexandra Winter
2023-12-19 15:25 ` Niklas Schnelle
0 siblings, 2 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-12-19 15:07 UTC (permalink / raw)
To: wintera, wenjia
Cc: linux-kernel, Greg Kroah-Hartman, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-s390, netdev
Now that the driver core can properly handle constant struct bus_type,
move the iucv_bus variable to be a constant structure as well, placing
it into read-only memory which can not be modified at runtime.
Cc: Alexandra Winter <wintera@linux.ibm.com>
Cc: Wenjia Zhang <wenjia@linux.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: linux-s390@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/net/iucv/iucv.h | 4 ++--
net/iucv/iucv.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h
index f9e88401d7da..8b2055d64a6b 100644
--- a/include/net/iucv/iucv.h
+++ b/include/net/iucv/iucv.h
@@ -80,7 +80,7 @@ struct iucv_array {
u32 length;
} __attribute__ ((aligned (8)));
-extern struct bus_type iucv_bus;
+extern const struct bus_type iucv_bus;
extern struct device *iucv_root;
/*
@@ -489,7 +489,7 @@ struct iucv_interface {
int (*path_sever)(struct iucv_path *path, u8 userdata[16]);
int (*iucv_register)(struct iucv_handler *handler, int smp);
void (*iucv_unregister)(struct iucv_handler *handler, int smp);
- struct bus_type *bus;
+ const struct bus_type *bus;
struct device *root;
};
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index 0ed6e34d6edd..6334f64f04d5 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -67,7 +67,7 @@ static int iucv_bus_match(struct device *dev, struct device_driver *drv)
return 0;
}
-struct bus_type iucv_bus = {
+const struct bus_type iucv_bus = {
.name = "iucv",
.match = iucv_bus_match,
};
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] icuv: make iucv_bus const
2023-12-19 15:07 [PATCH] icuv: make iucv_bus const Greg Kroah-Hartman
@ 2023-12-19 15:23 ` Alexandra Winter
2023-12-19 15:25 ` Niklas Schnelle
1 sibling, 0 replies; 4+ messages in thread
From: Alexandra Winter @ 2023-12-19 15:23 UTC (permalink / raw)
To: Greg Kroah-Hartman, wenjia
Cc: linux-kernel, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, linux-s390, netdev
On 19.12.23 16:07, Greg Kroah-Hartman wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the iucv_bus variable to be a constant structure as well, placing
> it into read-only memory which can not be modified at runtime.
>
> Cc: Alexandra Winter <wintera@linux.ibm.com>
> Cc: Wenjia Zhang <wenjia@linux.ibm.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: linux-s390@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
Acked-by: Alexandra Winter <wintera@linux.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] icuv: make iucv_bus const
2023-12-19 15:07 [PATCH] icuv: make iucv_bus const Greg Kroah-Hartman
2023-12-19 15:23 ` Alexandra Winter
@ 2023-12-19 15:25 ` Niklas Schnelle
2023-12-20 7:24 ` Greg Kroah-Hartman
1 sibling, 1 reply; 4+ messages in thread
From: Niklas Schnelle @ 2023-12-19 15:25 UTC (permalink / raw)
To: Greg Kroah-Hartman, wintera, wenjia
Cc: linux-kernel, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, linux-s390, netdev
On Tue, 2023-12-19 at 16:07 +0100, Greg Kroah-Hartman wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the iucv_bus variable to be a constant structure as well, placing
> it into read-only memory which can not be modified at runtime.
>
> Cc: Alexandra Winter <wintera@linux.ibm.com>
> Cc: Wenjia Zhang <wenjia@linux.ibm.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: linux-s390@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
Nit: There seems to be a typo in the subject line s/icuv/iucv/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] icuv: make iucv_bus const
2023-12-19 15:25 ` Niklas Schnelle
@ 2023-12-20 7:24 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-12-20 7:24 UTC (permalink / raw)
To: Niklas Schnelle
Cc: wintera, wenjia, linux-kernel, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-s390, netdev
On Tue, Dec 19, 2023 at 04:25:13PM +0100, Niklas Schnelle wrote:
> On Tue, 2023-12-19 at 16:07 +0100, Greg Kroah-Hartman wrote:
> > Now that the driver core can properly handle constant struct bus_type,
> > move the iucv_bus variable to be a constant structure as well, placing
> > it into read-only memory which can not be modified at runtime.
> >
> > Cc: Alexandra Winter <wintera@linux.ibm.com>
> > Cc: Wenjia Zhang <wenjia@linux.ibm.com>
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: Eric Dumazet <edumazet@google.com>
> > Cc: Jakub Kicinski <kuba@kernel.org>
> > Cc: Paolo Abeni <pabeni@redhat.com>
> > Cc: linux-s390@vger.kernel.org
> > Cc: netdev@vger.kernel.org
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
>
> Nit: There seems to be a typo in the subject line s/icuv/iucv/
Ugh, good catch, let me go send a v2, thanks!
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-20 7:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-19 15:07 [PATCH] icuv: make iucv_bus const Greg Kroah-Hartman
2023-12-19 15:23 ` Alexandra Winter
2023-12-19 15:25 ` Niklas Schnelle
2023-12-20 7:24 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).