wlan: More checkpatch fixes for WLAN prima driver
This patch has fixes for the following checkpatch issues:
1 ERROR: Use of strchr is deprecated: use strnchr instead.
2 WARNING: simple_strtol is obsolete, use kstrtol instead
3 WARNING: simple_strtoul is obsolete, use kstrtoul instead
Change-Id: Ib75b587f60fa8bd950d31da8ece5b8a575e66953
CR-Fixed: NA
diff --git a/CORE/HDD/src/wlan_hdd_dp_utils.c b/CORE/HDD/src/wlan_hdd_dp_utils.c
index f5b3117..970739e 100644
--- a/CORE/HDD/src/wlan_hdd_dp_utils.c
+++ b/CORE/HDD/src/wlan_hdd_dp_utils.c
@@ -197,6 +197,7 @@
int i;
int k;
char temp[3] = {0};
+ int rv;
//18 is MAC Address length plus the colons
if ( !pSrcMac && (length > 18 || length < 18) )
@@ -207,7 +208,9 @@
while ( i < length )
{
memcpy(temp, pSrcMac+i, 2);
- pDescMac[k++] = (char)simple_strtoul (temp, NULL, 16);
+ rv = kstrtou8(temp, 16, &pDescMac[k++]);
+ if (rv < 0)
+ return VOS_STATUS_E_FAILURE;
i += 3;
}