[PATCH3 6/6] staging: brcm80211: replace simple_strtoul with strict_strtoul

Dan Carpenter error27 at gmail.com
Tue Mar 1 13:50:49 UTC 2011


On Tue, Mar 01, 2011 at 10:56:59AM +0100, Arend van Spriel wrote:
> @@ -1293,18 +1293,24 @@ 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;
> +
> +			strict_strtoul(var, 0,
> +				(unsigned long *)&value);

The casts aren't needed.

regards,
dan carpenter



More information about the devel mailing list