Search Linux Wireless

Re: [PATCH 09/20] staging: brcm80211: remove static variables from wl_cfg80211.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 12, 2011 at 12:14:53PM +0200, Roland Vossen wrote:
> -	cfg80211_dev = kzalloc(sizeof(struct brcmf_cfg80211_dev), GFP_KERNEL);
> -	if (unlikely(!cfg80211_dev)) {
> +	cfg_dev = kzalloc(sizeof(struct brcmf_cfg80211_dev), GFP_KERNEL);
> +	if (unlikely(!cfg_dev)) {
>  		WL_ERR("wl_cfg80211_dev is invalid\n");

This message is wrong.  Also it isn't needed because kzalloc() prints
its own more complete message.

Also unlikely() isn't needed here in the attach function.  Likely and
unlikely hints only belong in the fast path, and generally shouldn't
be included in driver code (only in core kernel code).

Don't resend the patch obviously since this was there in the
original code.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux