diff mbox series

leds: ledtrig-activity: Fix the wrong format specifier

Message ID 20241122064626.4680-1-zhujun2@cmss.chinamobile.com
State New
Headers show
Series leds: ledtrig-activity: Fix the wrong format specifier | expand

Commit Message

Zhu Jun Nov. 22, 2024, 6:46 a.m. UTC
The format specifier of "signed int" in sprintf() should be "%d", not
"%u".

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
 drivers/leds/trigger/ledtrig-activity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lee Jones Dec. 12, 2024, 5:28 p.m. UTC | #1
On Thu, 21 Nov 2024 22:46:26 -0800, Zhu Jun wrote:
> The format specifier of "signed int" in sprintf() should be "%d", not
> "%u".
> 
> 

Applied, thanks!

[1/1] leds: ledtrig-activity: Fix the wrong format specifier
      commit: 6fcafd33d2f85f0ffc1fc64e2b1ea607d0e75037

--
Lee Jones [李琼斯]
diff mbox series

Patch

diff --git a/drivers/leds/trigger/ledtrig-activity.c b/drivers/leds/trigger/ledtrig-activity.c
index 33cbf8413..b3ee33aed 100644
--- a/drivers/leds/trigger/ledtrig-activity.c
+++ b/drivers/leds/trigger/ledtrig-activity.c
@@ -156,7 +156,7 @@  static ssize_t led_invert_show(struct device *dev,
 {
 	struct activity_data *activity_data = led_trigger_get_drvdata(dev);
 
-	return sprintf(buf, "%u\n", activity_data->invert);
+	return sprintf(buf, "%d\n", activity_data->invert);
 }
 
 static ssize_t led_invert_store(struct device *dev,