[Intel-wired-lan] [next-queue] igb: cleanup igb_enable_mas() a bit

Jeff Kirsher jeffrey.t.kirsher at intel.com
Thu Apr 2 00:53:32 UTC 2015


On Tue, 2015-03-24 at 21:07 -0700, Jeff Kirsher wrote:
> From: Dan Carpenter <dan.carpenter at oracle.com>
> 
> 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 at oracle.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 14 +++-----------
>  1 file changed, 3 insertions(+), 11 deletions(-)

I have dropped this patch and have applied Todd's alternate patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20150401/0454e373/attachment.asc>


More information about the Intel-wired-lan mailing list