Search Linux Wireless

Re: [1/2] mwifiex: kill useless list_empty checks

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

 



Ganapathi Bhat <gbhat@xxxxxxxxxxx> wrote:

> From: Douglas Anderson <dianders@xxxxxxxxxxxx>
> 
> There's absolutely no reason to check to see if a list is empty
> before iterating through it.  It's just like writing code like
> this:
> 
> if (count != 0) {
>   for (i = 0; i < count; i++) {
>      ...
>   }
> }
> 
> The loop will already be avoided if "count == 0" so there was no
> reason to check.
> 
> Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
> Signed-off-by: Ganapathi Bhat <gbhat@xxxxxxxxxxx>

2 patches applied to wireless-drivers-next.git, thanks.

40351051d022 mwifiex: kill useless list_empty checks
f0f7c2275fb9 mwifiex: minor cleanups w/ sta_list_spinlock in cfg80211.c

-- 
https://patchwork.kernel.org/patch/9983061/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux