Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

target/sbp: Remove strict param from sbp_parse_wwn

It's always set, and controls whether uppercase A-F are allowed hex values.
I don't see a reason not to accept these.

Signed-off-by: Andy Grover <agrover@redhat.com>
Cc: Chris Boot <bootc@bootc.net>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

authored by

Andy Grover and committed by
Nicholas Bellinger
343d475d 283669d2

+4 -4
+4 -4
drivers/target/sbp/sbp_target.c
··· 2068 2068 return ret; 2069 2069 } 2070 2070 2071 - static ssize_t sbp_parse_wwn(const char *name, u64 *wwn, int strict) 2071 + static ssize_t sbp_parse_wwn(const char *name, u64 *wwn) 2072 2072 { 2073 2073 const char *cp; 2074 2074 char c, nibble; ··· 2088 2088 err = 3; 2089 2089 if (isdigit(c)) 2090 2090 nibble = c - '0'; 2091 - else if (isxdigit(c) && (islower(c) || !strict)) 2091 + else if (isxdigit(c)) 2092 2092 nibble = tolower(c) - 'a' + 10; 2093 2093 else 2094 2094 goto fail; ··· 2117 2117 u64 guid = 0; 2118 2118 u32 nexus_depth = 1; 2119 2119 2120 - if (sbp_parse_wwn(name, &guid, 1) < 0) 2120 + if (sbp_parse_wwn(name, &guid) < 0) 2121 2121 return ERR_PTR(-EINVAL); 2122 2122 2123 2123 se_nacl_new = sbp_alloc_fabric_acl(se_tpg); ··· 2253 2253 struct sbp_tport *tport; 2254 2254 u64 guid = 0; 2255 2255 2256 - if (sbp_parse_wwn(name, &guid, 1) < 0) 2256 + if (sbp_parse_wwn(name, &guid) < 0) 2257 2257 return ERR_PTR(-EINVAL); 2258 2258 2259 2259 tport = kzalloc(sizeof(*tport), GFP_KERNEL);