diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2016-10-20 02:45:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-20 17:23:07 +0200 |
commit | 7ba5c003db59a6f738d87d92b68d4a91cdf22f60 (patch) | |
tree | 26ab3d17d37851252621eeef0ea7d332dfd0ed9a /net/ncsi/internal.h | |
parent | net/sched: act_mirred: Use passed lastuse argument (diff) | |
download | linux-7ba5c003db59a6f738d87d92b68d4a91cdf22f60.tar.xz linux-7ba5c003db59a6f738d87d92b68d4a91cdf22f60.zip |
net/ncsi: Avoid if statements in ncsi_suspend_channel()
There are several if/else statements in the state machine implemented
by switch/case in ncsi_suspend_channel() to avoid duplicated code. It
makes the code a bit hard to be understood.
This drops if/else statements in ncsi_suspend_channel() to improve the
code readability as Joel Stanley suggested. Also, it becomes easy to
add more states in the state machine without affecting current code.
No logical changes introduced by this.
Suggested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ncsi/internal.h')
0 files changed, 0 insertions, 0 deletions