All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] platform/x86: intel: wmi: Use sysfs_emit in sbl-fw-update
@ 2026-08-19  4:42 svav2021
  2026-08-19  4:42 ` [PATCH 2/2] platform/x86: intel: wmi: Remove redundant callbacks svav2021
  0 siblings, 1 reply; 2+ messages in thread
From: svav2021 @ 2026-08-19  4:42 UTC (permalink / raw)
  To: hansg, ilpo.jarvinen; +Cc: platform-driver-x86, linux-kernel, Arav Verma

From: Arav Verma <svav2021@gmail.com>

Modernize firmware_update_request_show by replacing legacy
sprintf() call with sysfs_emit. When altering string,
corrected format specified from %d to %u to match u32 type of
target variable.
---
 drivers/platform/x86/intel/wmi/sbl-fw-update.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel/wmi/sbl-fw-update.c b/drivers/platform/x86/intel/wmi/sbl-fw-update.c
index 62c9c7f1842ba..cfef71f4f3284 100644
--- a/drivers/platform/x86/intel/wmi/sbl-fw-update.c
+++ b/drivers/platform/x86/intel/wmi/sbl-fw-update.c
@@ -61,7 +61,7 @@ static ssize_t firmware_update_request_show(struct device *dev,
 	if (ret)
 		return ret;
 
-	return sprintf(buf, "%d\n", val);
+	return sysfs_emit(buf, "%u\n", val);
 }
 
 static ssize_t firmware_update_request_store(struct device *dev,
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-19  4:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19  4:42 [PATCH 1/2] platform/x86: intel: wmi: Use sysfs_emit in sbl-fw-update svav2021
2026-08-19  4:42 ` [PATCH 2/2] platform/x86: intel: wmi: Remove redundant callbacks svav2021

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.