Re: [patch] igb: cleanup igb_enable_mas() a bit

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

 



On Thu, 2015-03-19 at 16:31 +0300, Dan Carpenter wrote:
> Static checkers complain about this because we do:
> 
>         if (!(connsw & E1000_CONNSW_SERDESD)) {
>                 ...
>         } else if (connsw & E1000_CONNSW_SERDESD) {
>                 ...
>         } else {
>                 ...
>         }
> 
> Once you eliminate that E1000_CONNSW_SERDESD is set and not set then
> there aren't any other possibilities so the else statement is dead
> code.
> 
> This function always returns zero so if you delete the "ret_val"
> variable, the code is shorter and more clear.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Thanks Dan, surprised we did not see this earlier.  I have added your
patch to my queue.
-- 
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
dev-queue

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux