forked from torvalds/linux
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Wtautological-constant-compare in drivers/md/dm-raid.c #753
Labels
-Wtautological-compare
-Wtautological-constant-compare
[BUG] linux
A bug that should be fixed in the mainline kernel.
[FIXED][LINUX] 5.5
This bug was fixed in Linux 5.5
Comments
fengguang
pushed a commit
to 0day-ci/linux
that referenced
this issue
Oct 27, 2019
…d_layout
When building with Clang + -Wtautological-constant-compare:
drivers/md/dm-raid.c:619:8: warning: converting the result of '<<' to a
boolean always evaluates to true [-Wtautological-constant-compare]
r = !RAID10_OFFSET;
^
drivers/md/dm-raid.c:517:28: note: expanded from macro 'RAID10_OFFSET'
#define RAID10_OFFSET (1 << 16) /* stripes with data
copies area adjacent on devices */
^
1 warning generated.
Negating a non-zero number will always make it zero, which is the
default value of r in this function so this statement is unnecessary;
remove it so that clang no longer warns.
Link: ClangBuiltLinux#753
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
ruscur
pushed a commit
to ruscur/linux
that referenced
this issue
Nov 8, 2019
…d_layout
When building with Clang + -Wtautological-constant-compare:
drivers/md/dm-raid.c:619:8: warning: converting the result of '<<' to a
boolean always evaluates to true [-Wtautological-constant-compare]
r = !RAID10_OFFSET;
^
drivers/md/dm-raid.c:517:28: note: expanded from macro 'RAID10_OFFSET'
#define RAID10_OFFSET (1 << 16) /* stripes with data
copies area adjacent on devices */
^
1 warning generated.
Negating a non-zero number will always make it zero, which is the
default value of r in this function so this statement is unnecessary;
remove it so that clang no longer warns.
Link: ClangBuiltLinux#753
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
|
This was apparently picked up...? Never got an email about it and Nick's reviewed-by is missing :/ https://git.kernel.org/next/linux-next/c/35ad035b8398c634d888324a299ec50a84cbc6cc |
|
YOLO! (I would've gotten away with it too, if it weren't for you god damned kids and your github!) |
|
Merged into mainline: https://git.kernel.org/torvalds/c/35ad035b8398c634d888324a299ec50a84cbc6cc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
-Wtautological-compare
-Wtautological-constant-compare
[BUG] linux
A bug that should be fixed in the mainline kernel.
[FIXED][LINUX] 5.5
This bug was fixed in Linux 5.5
Patch submitted: https://lore.kernel.org/lkml/20191024202803.47613-1-natechancellor@gmail.com/
The text was updated successfully, but these errors were encountered: