From: Arend van Spriel Date: Wed, 2 Mar 2011 16:01:37 +0000 (+0100) Subject: staging: brcm80211: replace simple_strtoul with strict_strtoul X-Git-Tag: MMI-PSA29.97-13-9~20521^2~330 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e343d3ea73e97b339ecb1d39f1cdd306da24a175;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging: brcm80211: replace simple_strtoul with strict_strtoul By checkpatch recommendation using strict_strtoul now. Reviewed-by: Roland Vossen Reviewed-by: Brett Rudley Signed-off-by: Arend van Spriel Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c index 6059e4cc3aa1..6ce5172557f6 100644 --- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c +++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c @@ -1293,18 +1293,22 @@ static int __init wl_module_init(void) wl_msg_level = msglevel; else { char *var = getvar(NULL, "wl_msglevel"); - if (var) - wl_msg_level = simple_strtoul(var, NULL, 0); - } - { - extern u32 phyhal_msg_level; - - if (phymsglevel != 0xdeadbeef) - phyhal_msg_level = phymsglevel; - else { - char *var = getvar(NULL, "phy_msglevel"); - if (var) - phyhal_msg_level = simple_strtoul(var, NULL, 0); + if (var) { + unsigned long value; + + (void)strict_strtoul(var, 0, &value); + wl_msg_level = value; + } + } + if (phymsglevel != 0xdeadbeef) + phyhal_msg_level = phymsglevel; + else { + char *var = getvar(NULL, "phy_msglevel"); + if (var) { + unsigned long value; + + (void)strict_strtoul(var, 0, &value); + phyhal_msg_level = value; } } #endif /* BCMDBG */