]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: sun: Remove redundant code
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 4 Mar 2022 08:36:53 +0000 (16:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Mar 2022 13:07:54 +0000 (13:07 +0000)
commit83257de3647802f5d8ac75d4a98b74b3905a501e
treeaa31bdbc291ef84a9e153e4d3a2838f3ed88f015
parent4064bb1fe026f025439563de53797aacb7719c33
net: ethernet: sun: Remove redundant code

Since the starting value in the for loop is greater than or equal to 1,
the restriction is CAS_FLAG_REG_PLUS is in the file cassini.h is
defined as 0x1 by macro, and the for loop and if condition is not
satisfied, so the code here is redundant.

Clean up the following smatch warning:

drivers/net/ethernet/sun/cassini.c:3513 cas_start_dma() warn: we never
enter this loop.

drivers/net/ethernet/sun/cassini.c:1239 cas_init_rx_dma() warn: we never
enter this loop.

drivers/net/ethernet/sun/cassini.c:1247 cas_init_rx_dma() warn: we never
enter this loop.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/cassini.c