Thread (2 messages) flat view 2 messages, 2 authors, 2023-02-20

Re: [PATCH] macintosh: windfarm: Use unsigned type for 1-bit bitfields

From: Michael Ellerman <hidden>
Date: 2023-02-20 03:51:49
Also in: linux-patches, lkml, llvm

On Wed, 15 Feb 2023 10:12:12 -0700, Nathan Chancellor wrote:
Clang warns:

  drivers/macintosh/windfarm_lm75_sensor.c:63:14: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                  lm->inited = 1;
                             ^ ~

  drivers/macintosh/windfarm_smu_sensors.c:356:19: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                  pow->fake_volts = 1;
                                  ^ ~
  drivers/macintosh/windfarm_smu_sensors.c:368:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                  pow->quadratic = 1;
                                 ^ ~

[...]
Applied to powerpc/next.

[1/1] macintosh: windfarm: Use unsigned type for 1-bit bitfields
      https://git.kernel.org/powerpc/c/748ea32d2dbd813d3bd958117bde5191182f909a

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help