lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241028125348.3814-1-liujing@cmss.chinamobile.com>
Date: Mon, 28 Oct 2024 20:53:48 +0800
From: Liu Jing <liujing@...s.chinamobile.com>
To: krzk@...nel.org
Cc: linux-kernel@...r.kernel.org,
	Liu Jing <liujing@...s.chinamobile.com>
Subject: [PATCH] w1: ds2413: Fix the wrong output format

The output format of the retries variable should be %u instead of %d

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

diff --git a/drivers/w1/slaves/w1_ds2413.c b/drivers/w1/slaves/w1_ds2413.c
index 739009806467..75c15a6a4fb4 100644
--- a/drivers/w1/slaves/w1_ds2413.c
+++ b/drivers/w1/slaves/w1_ds2413.c
@@ -61,19 +61,19 @@ static ssize_t state_read(struct file *filp, struct kobject *kobj,
 		} else if (state == W1_F3A_INVALID_PIO_STATE) {
 			/* slave didn't respond, try to select it again */
 			dev_warn(&sl->dev, "slave device did not respond to PIO_ACCESS_READ, " \
-					    "reselecting, retries left: %d\n", retries);
+					    "reselecting, retries left: %u\n", retries);
 			goto next;
 		}
 
 		if (w1_reset_resume_command(sl->master))
 			goto out; /* unrecoverable error */
 
-		dev_warn(&sl->dev, "PIO_ACCESS_READ error, retries left: %d\n", retries);
+		dev_warn(&sl->dev, "PIO_ACCESS_READ error, retries left: %u\n", retries);
 	}
 
 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_read > 0) ? "succeeded" : "error", retries);
 	return bytes_read;
 }
@@ -118,12 +118,12 @@ static ssize_t output_write(struct file *filp, struct kobject *kobj,
 		if (w1_reset_resume_command(sl->master))
 			goto out; /* unrecoverable error */
 
-		dev_warn(&sl->dev, "PIO_ACCESS_WRITE error, retries left: %d\n", retries);
+		dev_warn(&sl->dev, "PIO_ACCESS_WRITE error, retries left: %u\n", retries);
 	}
 
 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




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ