diff options
| author | Nathan Chancellor <[email protected]> | 2024-01-17 10:54:16 -0700 |
|---|---|---|
| committer | Alexandre Belloni <[email protected]> | 2024-01-18 00:59:32 +0100 |
| commit | dd7fe5d9fd6a27531e985e3812ef4031bd316b01 (patch) | |
| tree | 2367f284c6f38b937cbca3b458f231ddb6fed30f /lib/crypto/mpi/mpi-internal.h | |
| parent | b7d450d98b0f9917cac31b39ba459a4aee26c8b1 (diff) | |
rtc: max31335: Fix comparison in max31335_volatile_reg()
Clang warns (or errors with CONFIG_WERROR=y):
drivers/rtc/rtc-max31335.c:211:36: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand]
211 | if (reg == MAX31335_TEMP_DATA_MSB || MAX31335_TEMP_DATA_LSB)
| ^ ~~~~~~~~~~~~~~~~~~~~~~
drivers/rtc/rtc-max31335.c:211:36: note: use '|' for a bitwise operation
211 | if (reg == MAX31335_TEMP_DATA_MSB || MAX31335_TEMP_DATA_LSB)
| ^~
| |
1 error generated.
This clearly should be a comparison against reg. Fix the comparison so
that max31335_volatile_reg() does not always return true.
Closes: https://github.com/ClangBuiltLinux/linux/issues/1980
Fixes: dedaf03b99d6 ("rtc: max31335: add driver support")
Signed-off-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions