lkml.org 
[lkml]   [2023]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] macintosh: windfarm: Use unsigned type for 1-bit bitfields
Date
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

\
 
 \ /
  Last update: 2023-03-27 00:28    [W:0.035 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site