diff options
| author | Nathan Chancellor <[email protected]> | 2020-03-27 17:10:30 +0000 |
|---|---|---|
| committer | Jan Kara <[email protected]> | 2020-03-30 10:40:53 +0000 |
| commit | 6def1a1d2d58eda5834fe2e2ace4560f9cdd7de1 (patch) | |
| tree | 4d186f573b767e16a911c82c38d3b8e2fb16b90c /drivers/fpga/ice40-spi.c | |
| parent | fanotify: report name info for FAN_DIR_MODIFY event (diff) | |
| download | kernel-6def1a1d2d58eda5834fe2e2ace4560f9cdd7de1.tar.gz kernel-6def1a1d2d58eda5834fe2e2ace4560f9cdd7de1.zip | |
fanotify: Fix the checks in fanotify_fsid_equal
Clang warns:
fs/notify/fanotify/fanotify.c:28:23: warning: self-comparison always
evaluates to true [-Wtautological-compare]
return fsid1->val[0] == fsid1->val[0] && fsid2->val[1] == fsid2->val[1];
^
fs/notify/fanotify/fanotify.c:28:57: warning: self-comparison always
evaluates to true [-Wtautological-compare]
return fsid1->val[0] == fsid1->val[0] && fsid2->val[1] == fsid2->val[1];
^
2 warnings generated.
The intention was clearly to compare val[0] and val[1] in the two
different fsid structs. Fix it otherwise this function always returns
true.
Fixes: afc894c784c8 ("fanotify: Store fanotify handles differently")
Link: https://github.com/ClangBuiltLinux/linux/issues/952
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Diffstat (limited to 'drivers/fpga/ice40-spi.c')
0 files changed, 0 insertions, 0 deletions
