Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit cb75bdc0 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Gerrit - the friendly Code Review server
Browse files

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.

Change-Id: Ia55b4d2bb7935006de6a15213f3afa7f15fc98a7
Link: https://github.com/ClangBuiltLinux/linux/issues/129


Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-commit: 94e7c844990f0db92418586b107be135b4963b66
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git


Signed-off-by: default avatarLiangliang Lu <luliang@codeaurora.org>
parent 6c3a6503
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment