staging: vme_user: print more detailed infomation when an error occurs
authorPiro Yang <piroyangg@gmail.com>
Wed, 27 Dec 2023 15:47:39 +0000 (23:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Jan 2024 13:32:40 +0000 (14:32 +0100)
when the slave_get function pointer belongs to the struct vme_bridge
member is NULL, it prompts that the detailed function name
"vme_slave_set" equivalent to __func__ not supported.

it is similar to the vme_slave_get function:
when vme_bridge->slave_set function pointer is NULL to print detailed
function name by using __func__.

Signed-off-by: Piro Yang <piroyangg@gmail.com>
Link: https://lore.kernel.org/r/20231227154739.6951-1-piroyangg@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vme_user/vme.c

index 9bc2d35405af6110bbb69e36757a15153b237de6..e9461a7a7ab8ba40ed8978134928a5d669f44f5c 100644 (file)
@@ -340,7 +340,7 @@ int vme_slave_set(struct vme_resource *resource, int enabled,
        image = list_entry(resource->entry, struct vme_slave_resource, list);
 
        if (!bridge->slave_set) {
-               dev_err(bridge->parent, "Function not supported\n");
+               dev_err(bridge->parent, "%s not supported\n", __func__);
                return -EINVAL;
        }