]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
staging: vme: vme_user: fix up const issue in vme_bus_match()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 May 2025 14:53:33 +0000 (16:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 15:31:46 +0000 (17:31 +0200)
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.

Link: https://lore.kernel.org/r/2025052132-giddiness-slain-5ba1@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vme_user/vme.c

index 42304c9f83a2dcf111a3596757a2717c562a8283..57eb9d22781998fb1781834a74b28c17827d0063 100644 (file)
@@ -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);