[PATCH] usb: storage: make ndecimals unsigned in parse_delay_str()
From: David Cusimano
Date: Thu Jul 16 2026 - 14:04:29 EST
The ndecimals parameter controls how many decimal places are added when the
expected suffix is missing. It is never used as a signed quantity, so make
it
unsigned to better reflect its intended semantics.
Signed-off-by: David Cusimano <david@xxxxxxxxxxxx>
---
drivers/usb/storage/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 064c7fc8e..c5bfedce7 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -83,7 +83,7 @@ static unsigned int delay_use = 1 * MSEC_PER_SEC;
*
* Returns 0 on success, a negative error code otherwise.
*/
-static int parse_delay_str(const char *str, int ndecimals, const char
*suffix,
+static int parse_delay_str(const char *str, unsigned int ndecimals, const
char *suffix,
unsigned int *val)
{
int n, n2, l;
--
2.50.1 (Apple Git-155)