Skip to contentSkip to conversation

staging: vme: vme_user: fix up const issue in vme_bus_match()

PATCH New Greg Kroah-Hartman 1 participant 1 message May 21, 2025

Subsystems (2)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH 1/1 staging: vme: vme_user: fix up const issue in vme_bus_match()

vme_bus_match takes a const pointer and casts it away with container_of() which is generally not a good idea. Fix this up by properly marking the output as const.

---
 drivers/staging/vme_user/vme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vme_user/vme.c +1 -1
index 42304c9f83a2..57eb9d227819 100644
@@ -1925,7 +1925,7 @@ EXPORT_SYMBOL(vme_unregister_driver);
 
 static int vme_bus_match(struct device *dev, const struct device_driver *drv)
 {
-	struct vme_driver *vme_drv;
+	const struct vme_driver *vme_drv;
 
 	vme_drv = container_of(drv, struct vme_driver, driver);
 
Signature · 1 line
2.49.0