[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241122064626.4680-1-zhujun2@cmss.chinamobile.com>
Date: Thu, 21 Nov 2024 22:46:26 -0800
From: Zhu Jun <zhujun2@...s.chinamobile.com>
To: pavel@....cz
Cc: lee@...nel.org,
zhujun2@...s.chinamobile.com,
linux-leds@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] leds: ledtrig-activity: Fix the wrong format specifier
The format specifier of "signed int" in sprintf() should be "%d", not
"%u".
Signed-off-by: Zhu Jun <zhujun2@...s.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
Powered by blists - more mailing lists