mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: lpfc: Use isdigit() in lpfc_wwn_set()
@ 2026-11-05 23:40 Thorsten Blum
  0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-11-05 23:40 UTC (permalink / raw)
  To: Justin Tee, Paul Ely, James E.J. Bottomley, Martin K. Petersen
  Cc: Thorsten Blum, linux-scsi, linux-kernel

Use isdigit() to replace the open-coded implementation.

Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 drivers/scsi/lpfc/lpfc_attr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index bb5c84f0b787..4ae113002af4 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -3082,7 +3082,7 @@ lpfc_wwn_set(const char *buf, size_t cnt, char wwn[])
 			j = ((j << 4) | ((*buf++ - 'a') + 10));
 		else if ((*buf >= 'A') && (*buf <= 'F'))
 			j = ((j << 4) | ((*buf++ - 'A') + 10));
-		else if ((*buf >= '0') && (*buf <= '9'))
+		else if (isdigit(*buf))
 			j = ((j << 4) | (*buf++ - '0'));
 		else
 			return -EINVAL;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-05 23:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 23:40 [PATCH] scsi: lpfc: Use isdigit() in lpfc_wwn_set() Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®