U-Boot Archive on 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
  2026-05-11 15:29 ` Kuan-Wei Chiu
  0 siblings, 2 replies; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2026-05-11 15:29 UTC | newest]

Thread overview: 3+ 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox