]> 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)
commite323a5b398423023bd294b408a6a1903439ba2d7
treeaa31bdbc291ef84a9e153e4d3a2838f3ed88f015
parent9c636a712814d8704a33a213116c3a811f65588d
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