From patchwork Sun Aug 2 17:35:15 2043 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xing Tong Wu X-Patchwork-Id: 13347389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BD1DC04A6A for ; Wed, 9 Aug 2023 03:42:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229897AbjHIDmL (ORCPT ); Tue, 8 Aug 2023 23:42:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjHIDmL (ORCPT ); Tue, 8 Aug 2023 23:42:11 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.215]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 799BF172C; Tue, 8 Aug 2023 20:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version: Content-Type; bh=U4aESHDWnOOY4B1K7coviuwawbJUk9M0t/Gl5undU/s=; b=HYt0QAYddg5N0rr2oiovLdUTuSU04+DdWmcjw4mgnjheEbwXPQB0DjG7KzOcO0 adSXdoW6+6Qn2EGIumq7X9fyRI+CyK8FwHMFazRKpRocNWbUEoYJ60M566zJpiBT JXjXdRf/ZSaGfms33ptBfOMSxk/S1XfGYNCNypp5ref+I= Received: from localhost.localdomain (unknown [39.144.137.205]) by zwqz-smtp-mta-g4-1 (Coremail) with SMTP id _____wAHzaXvCtNkLjZuCg--.12136S3; Wed, 09 Aug 2023 11:41:38 +0800 (CST) From: xingtong_wu@163.com To: andriy.shevchenko@linux.intel.com Cc: ilpo.jarvinen@linux.intel.com, hdegoede@redhat.com, markgross@kernel.org, xingtong.wu@siemens.com, lee@kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, gerd.haeussler.ext@siemens.com, tobias.schaffner@siemens.com, lkp@intel.com Subject: [PATCH v3 1/2] platform/x86/siemens: simatic-ipc: fix logical error for BX-59A Date: Mon, 3 Aug 2043 01:35:15 +0800 Message-Id: <20430802173515.2363-2-xingtong_wu@163.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20430802173515.2363-1-xingtong_wu@163.com> References: <20430802173515.2363-1-xingtong_wu@163.com> MIME-Version: 1.0 X-CM-TRANSID: _____wAHzaXvCtNkLjZuCg--.12136S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7ZFy7tw15ur1kXF15WryfJFb_yoW8XryDpF 4rG3WIkrW5WryUtw1DGayxZFs8Z3Z0kry7G3WUAwnrZwnruF1jgr12kF4fXa9rtw45Wa43 Wa9xtr47Gan8Zr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07bnYFAUUUUU= X-Originating-IP: [39.144.137.205] X-CM-SenderInfo: p0lqw35rqjs4rx6rljoofrz/1tbiTBbG0GI0aYaeCAAAsj Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org From: "xingtong.wu" The variable "ledmode" is missing from if statement that leads to a logical error. Add the missing variable to the if condition. Fixes: b8af77951941 ("platform/x86/siemens: simatic-ipc: add new models BX-56A/BX-59A") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202307312322.Aa8upHWK-lkp@intel.com/ Reviewed-by: Ilpo Järvinen Signed-off-by: xingtong.wu --- drivers/platform/x86/siemens/simatic-ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/siemens/simatic-ipc.c b/drivers/platform/x86/siemens/simatic-ipc.c index 02c540cf4070..8ca6e277fa03 100644 --- a/drivers/platform/x86/siemens/simatic-ipc.c +++ b/drivers/platform/x86/siemens/simatic-ipc.c @@ -129,7 +129,7 @@ static int register_platform_devices(u32 station_id) pdevname = KBUILD_MODNAME "_leds"; if (ledmode == SIMATIC_IPC_DEVICE_127E) pdevname = KBUILD_MODNAME "_leds_gpio_apollolake"; - if (ledmode == SIMATIC_IPC_DEVICE_227G || SIMATIC_IPC_DEVICE_BX_59A) + if (ledmode == SIMATIC_IPC_DEVICE_227G || ledmode == SIMATIC_IPC_DEVICE_BX_59A) pdevname = KBUILD_MODNAME "_leds_gpio_f7188x"; if (ledmode == SIMATIC_IPC_DEVICE_BX_21A) pdevname = KBUILD_MODNAME "_leds_gpio_elkhartlake"; From patchwork Sun Aug 2 17:38:44 2043 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xing Tong Wu X-Patchwork-Id: 13347390 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63A72C41513 for ; Wed, 9 Aug 2023 03:45:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229728AbjHIDph (ORCPT ); Tue, 8 Aug 2023 23:45:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjHIDpg (ORCPT ); Tue, 8 Aug 2023 23:45:36 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 818D319A1; Tue, 8 Aug 2023 20:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version: Content-Type; bh=NnaBF6NITtKeoQSgTNzQQuto/mxlooX6cWZxpHicLxA=; b=XMKBj39ufHyDnz4jmj506evVUB+HdqO2HZZlBeQlsq1UTy3bEY3DViKVr58+Dl gy5O2m1yuUjo47b1OICduas9ZyxSYjK5rytlVxJqvbztJNFR/NHSFcIh8M6sCO7B ZCwn1JJ0+ltj5s2D4uINvK0k0ry/vhtq3bt6an0SG4qws= Received: from localhost.localdomain (unknown [39.144.137.205]) by zwqz-smtp-mta-g4-1 (Coremail) with SMTP id _____wB3RTK+C9NkFXtuCg--.5922S2; Wed, 09 Aug 2023 11:45:03 +0800 (CST) From: xingtong_wu@163.com To: ilpo.jarvinen@linux.intel.com Cc: hdegoede@redhat.com, markgross@kernel.org, xingtong.wu@siemens.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, gerd.haeussler.ext@siemens.com, tobias.schaffner@siemens.com, lkp@intel.com Subject: [PATCH v3 2/2] platform/x86/siemens: simatic-ipc-batt: fix logical error for BX-59A Date: Mon, 3 Aug 2043 01:38:44 +0800 Message-Id: <20430802173844.2483-1-xingtong_wu@163.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <197a523b-eae-e7ef-dd7d-29e614a1941f@linux.intel.com> References: <197a523b-eae-e7ef-dd7d-29e614a1941f@linux.intel.com> MIME-Version: 1.0 X-CM-TRANSID: _____wB3RTK+C9NkFXtuCg--.5922S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxJrWrtFW7CFyrur17Jr45trb_yoW8Xry3pF 4rWa1jkFW5Gw15tw4DGay7Zr45Za15KrW7GFyqyw13Z39FvFn8Kr1ayF43XFsIyr45Way5 J3Z3trWDCa1DZFUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jReHDUUUUU= X-Originating-IP: [39.144.137.205] X-CM-SenderInfo: p0lqw35rqjs4rx6rljoofrz/1tbiMwHG0FXmF6EpHAAAsU Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org From: "xingtong.wu" The variable "priv.devmode" is missing from if statement that leads to a logical error. Add the missing variable to the if condition. Fixes: c56beff20375 ("platform/x86/siemens: simatic-ipc-batt: add support for module BX-59A") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202308010001.BGYCSQrl-lkp@intel.com/ Reviewed-by: Ilpo Järvinen Signed-off-by: xingtong.wu --- drivers/platform/x86/siemens/simatic-ipc-batt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt.c b/drivers/platform/x86/siemens/simatic-ipc-batt.c index d66b9969234b..e6c12c52843c 100644 --- a/drivers/platform/x86/siemens/simatic-ipc-batt.c +++ b/drivers/platform/x86/siemens/simatic-ipc-batt.c @@ -194,7 +194,8 @@ int simatic_ipc_batt_probe(struct platform_device *pdev, struct gpiod_lookup_tab if (table->table[2].key) { flags = GPIOD_OUT_HIGH; - if (priv.devmode == SIMATIC_IPC_DEVICE_BX_21A || SIMATIC_IPC_DEVICE_BX_59A) + if (priv.devmode == SIMATIC_IPC_DEVICE_BX_21A || + priv.devmode == SIMATIC_IPC_DEVICE_BX_59A) flags = GPIOD_OUT_LOW; priv.gpios[2] = devm_gpiod_get_index(dev, "CMOSBattery meter", 2, flags); if (IS_ERR(priv.gpios[2])) {