* [PATCH] leds: ledtrig-activity: Fix the wrong format specifier
@ 2024-11-22 6:46 Zhu Jun
2024-12-12 17:28 ` (subset) " Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Zhu Jun @ 2024-11-22 6:46 UTC (permalink / raw)
To: pavel; +Cc: lee, zhujun2, linux-leds, linux-kernel
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(-)
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,
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: (subset) [PATCH] leds: ledtrig-activity: Fix the wrong format specifier
2024-11-22 6:46 [PATCH] leds: ledtrig-activity: Fix the wrong format specifier Zhu Jun
@ 2024-12-12 17:28 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2024-12-12 17:28 UTC (permalink / raw)
To: pavel, Zhu Jun; +Cc: lee, linux-leds, linux-kernel
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 [李琼斯]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-12 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-22 6:46 [PATCH] leds: ledtrig-activity: Fix the wrong format specifier Zhu Jun
2024-12-12 17:28 ` (subset) " Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®