lkml.org 
[lkml]   [2022]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: drivers/usb/typec/tcpm/tcpm.c:4724:3: error: case label does not reduce to an integer constant
From
Hi--

On 4/21/22 13:36, Guenter Roeck wrote:
> On 4/21/22 12:03, Naresh Kamboju wrote:
>> Linux mainline and linux next arm64 builds failed with gcc-7.3.x.
>>
>> drivers/usb/typec/tcpm/tcpm.c: In function 'run_state_machine':
>> drivers/usb/typec/tcpm/tcpm.c:4724:3: error: case label does not
>> reduce to an integer constant
>>     case BDO_MODE_TESTDATA:
>>     ^~~~
>> make[4]: *** [scripts/Makefile.build:288: drivers/usb/typec/tcpm/tcpm.o] Error 1
>>                                        ^
>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>>
>> --
>
> That code is several years old, the define is a constant, and I don't see
> a recent change in the code. What am I missing ?

See a recent patch for the same problem in a different area:

commit 1ef8715975de
Author: Borislav Petkov <bp@suse.de>
Date: Tue Apr 5 17:15:08 2022 +0200

ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constant

so those constants probably need to be cast to unsigned int.
(I guess)

--
~Randy

\
 
 \ /
  Last update: 2022-04-22 00:28    [W:0.086 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site