Skip to content

-Wconstant-logical-operand in drivers/rtc/rtc-max31335.c #1980

Description

@nathanchance
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.

Patch sent: https://lore.kernel.org/20240117-rtc-max3133-fix-comparison-v1-1-91e98b29d564@kernel.org/

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions