]> git.baikalelectronics.ru Git - kernel.git/commit
net: lan78xx: Avoid unnecessary self assignment
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 20 Sep 2018 22:48:30 +0000 (15:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 22 Sep 2018 02:05:57 +0000 (19:05 -0700)
commitfa289f4a6a4295bfd685f1ff47165c749271c3eb
tree93b50ede21b90d003d962745432460c8777816aa
parentb18ad385804543ac6aaf1d6e5bb3ca011a23821b
net: lan78xx: Avoid unnecessary self assignment

Clang warns when a variable is assigned to itself.

drivers/net/usb/lan78xx.c:940:11: warning: explicitly assigning value of
variable of type 'u32' (aka 'unsigned int') to itself [-Wself-assign]
                        offset = offset;
                        ~~~~~~ ^ ~~~~~~
1 warning generated.

Reorder the if statement to acheive the same result and avoid a self
assignment warning.

Link: https://github.com/ClangBuiltLinux/linux/issues/129
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/lan78xx.c