Skip to contentSkip to conversation

staging: vme_user: print more detailed infomation when an error occurs

PATCH New Piro Yang 1 participant 1 message Dec 27, 2023

Subsystems (2)
lore
Share & tools
lore

Piro Yang

author
#0 lore raw

PATCH 1/1 staging: vme_user: print more detailed infomation when an error occurs

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__.

---
 drivers/staging/vme_user/vme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vme_user/vme.c +1 -1
index 9bc2d35405af..e9461a7a7ab8 100644
@@ -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;
 	}
 
Signature · 1 line
2.25.1