From: Thorsten Blum <blum@kernel.org>
To: Justin Tee <justin.tee@broadcom.com>,
Paul Ely <paul.ely@broadcom.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <mkp@kernel.org>
Cc: Thorsten Blum <blum@kernel.org>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] scsi: lpfc: Use isdigit() in lpfc_wwn_set()
Date: Fri, 6 Nov 2026 00:40:58 +0100 [thread overview]
Message-ID: <20261105234057.455716-3-blum@kernel.org> (raw)
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;
reply other threads:[~2026-11-05 23:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261105234057.455716-3-blum@kernel.org \
--to=blum@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=justin.tee@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=paul.ely@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®