USB: serial: console: use isdigit() in usb_console_setup()
Subsystems (2)
PATCH 1/1 USB: serial: console: use isdigit() in usb_console_setup()
Use isdigit() to replace the open-coded implementation.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/usb/serial/console.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/serial/console.c +2 -1
@@ -15,6 +15,7 @@#include <linux/slab.h> #include <linux/tty.h> #include <linux/console.h> +#include <linux/ctype.h> #include <linux/serial.h> #include <linux/usb.h> #include <linux/usb/serial.h>
@@ -70,7 +71,7 @@ static int usb_console_setup(struct console *co, char *options)if (options) { baud =simple_strtoul (options,NULL ,10 ); s = options; -while (*s >='0' && *s <='9' ) +while (isdigit (*s)) s++;if (*s) parity = *s++;
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 3 lines
Use
isdigit()to replace the open-coded implementation.Signed-off-by Thorsten Blum <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1