lkml.org 
[lkml]   [2023]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] platform/x86/siemens: simatic-ipc: fix nonsensical condition
On Fri, Aug 11, 2023, at 15:17, Ilpo Järvinen wrote:
> On Fri, 11 Aug 2023, Arnd Bergmann wrote:
>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> The condition checking for a constant SIMATIC_IPC_DEVICE_BX_59A value
>> clearly makes no sense, as clang warns:
>>
>> drivers/platform/x86/siemens/simatic-ipc.c:132:42: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand]
>> if (ledmode == SIMATIC_IPC_DEVICE_227G || SIMATIC_IPC_DEVICE_BX_59A)
>> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/platform/x86/siemens/simatic-ipc-batt.c:197:49: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand]
>> if (priv.devmode == SIMATIC_IPC_DEVICE_BX_21A || SIMATIC_IPC_DEVICE_BX_59A)
>> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Most likely, this was meant to check ledmode to be one of the two values,
>> so change it to that.
>>
>> Fixes: b8af77951941e ("platform/x86/siemens: simatic-ipc: add new models BX-56A/BX-59A")
>> Fixes: c56beff203754 ("platform/x86/siemens: simatic-ipc-batt: add support for module BX-59A")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Ok, I see. I missed those as there is hasn't been a new linux-next in
a few days.

I suppose this one is also fixed then?

WARNING: unmet direct dependencies detected for P2SB
Depends on [n]: PCI [=n] && X86 [=y]
Selected by [m]:
- SIEMENS_SIMATIC_IPC_WDT [=m] && WATCHDOG [=y] && SIEMENS_SIMATIC_IPC [=y]
drivers/platform/x86/p2sb.c:68:9: error: call to undeclared function 'pci_scan_single_device'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Arnd

\
 
 \ /
  Last update: 2023-08-11 17:02    [W:0.071 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site