Skip to contentSkip to conversation

treewide: Replace scnprintf with sysfs_emit in

PATCH In review Abhinav Ananthu 2 participants 2 messages Jun 22, 2025 – Aug 13, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 treewide: Replace scnprintf with sysfs_emit in

Use sysfs_emit() to format sysfs output instead of scnprintf() as recommended by the kernel documentation.

---
 drivers/tee/optee/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tee/optee/core.c +1 -1
index c75fddc83576..ce44e3498d37 100644
@@ -72,7 +72,7 @@ static ssize_t rpmb_routing_model_show(struct device *dev,
 	else
 		s = "user";
 
-	return scnprintf(buf, PAGE_SIZE, "%s\n", s);
+	return sysfs_emit(buf, "%s\n", s);
 }
 static DEVICE_ATTR_RO(rpmb_routing_model);
 
Signature · 1 line
2.34.1
#1 lore raw

Hi Abhinav,

Quoted 8 lines · Abhinav Ananthu

Use sysfs_emit() to format sysfs output instead of scnprintf() as recommended by the kernel documentation.

---
 drivers/tee/optee/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Your patch looks good, but I've already accepted another patch for the same issue.

Thanks,
Jens