All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio: Staticize and constify driver ops
@ 2026-05-10 17:17 Marek Vasut
  2026-05-11 13:07 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marek Vasut @ 2026-05-10 17:17 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, Christian Pötzsch, Adam Lackorzynski, Bin Meng,
	Heinrich Schuchardt, Tom Rini

Set the ops structure as static const. The structure is not accessible
from outside of this driver and is not going to be modified at runtime.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: "Christian Pötzsch" <christian.poetzsch@kernkonzept.com>
Cc: Adam Lackorzynski <adam@l4re.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
---
 drivers/virtio/virtio-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index c36e9e9b3a7..6e4a3d7a7c1 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -400,7 +400,7 @@ UCLASS_DRIVER(virtio) = {
 	.per_device_auto	= sizeof(struct virtio_dev_priv),
 };
 
-struct bootdev_ops virtio_bootdev_ops = {
+static const struct bootdev_ops virtio_bootdev_ops = {
 };
 
 static const struct udevice_id virtio_bootdev_ids[] = {
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-18 22:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-10 17:17 [PATCH] virtio: Staticize and constify driver ops Marek Vasut
2026-05-11 13:07 ` Simon Glass
2026-05-11 15:29 ` Kuan-Wei Chiu
2026-05-18 22:50 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.