[PATCH] w1: ds2408: Fix the wrong output format

Liu Jing posted 1 patch 3 weeks, 6 days ago
[PATCH] w1: ds2408: Fix the wrong output format
Posted by Liu Jing 3 weeks, 6 days ago
The output format of the retries variable should be %u instead of %d

Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>

diff --git a/drivers/w1/slaves/w1_ds2408.c b/drivers/w1/slaves/w1_ds2408.c
index 56f822a1dfdb..1efe55e1dd8a 100644
--- a/drivers/w1/slaves/w1_ds2408.c
+++ b/drivers/w1/slaves/w1_ds2408.c
@@ -199,7 +199,7 @@ static ssize_t output_write(struct file *filp, struct kobject *kobj,
 out:
 	mutex_unlock(&sl->master->bus_mutex);
 
-	dev_dbg(&sl->dev, "%s, mutex unlocked retries:%d\n",
+	dev_dbg(&sl->dev, "%s, mutex unlocked retries:%u\n",
 		(bytes_written > 0) ? "succeeded" : "error", retries);
 
 	return bytes_written;
-- 
2.27.0
Re: [PATCH] w1: ds2408: Fix the wrong output format
Posted by Krzysztof Kozlowski 3 weeks, 6 days ago
On 28/10/2024 13:57, Liu Jing wrote:
> The output format of the retries variable should be %u instead of %d

Why? Is there a specific compiler warning?

Please organize your patches in patchsets (see submitting patches and b4
tool).

Best regards,
Krzysztof