From patchwork Fri Jul 31 17:30:26 2043 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xing Tong Wu X-Patchwork-Id: 131665 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1226232vqr; Sun, 6 Aug 2023 21:47:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHcYdi7Xb86tH71C9Kz5N1Mz2Wkp5JhZxa0QXx7XJEyFL90wHhTr7dAeCSmVY0RDwsImiAj X-Received: by 2002:a17:902:a403:b0:1b8:6245:1235 with SMTP id p3-20020a170902a40300b001b862451235mr6247322plq.13.1691383671904; Sun, 06 Aug 2023 21:47:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691383671; cv=none; d=google.com; s=arc-20160816; b=TUlrHYgCZUVNl2ciu0f3CF2itwyYZ8S09e/0ymbZ9d8COIEW42B1lcqIfhbjJVpMXz 02/Mrm6C4iaTWm0x01msJmvImk/UqJg1+pwHpLJKmQx1BQnbYQqLOB5MbiT1rSbghGea IHwZm8Mywob1Fh9jBxms7L/WopCSSZtlVpUCM0BTEZ4oBXIREkDmRpKyJZ5eIOhDcLrz Qi2QfbRpGhJuCEe91eXsi6LscNf2v75dXgPp93N6Rd7ONzvTBE/3atTGqbSdNdvNBv0i 5N6SB5po4keyYdWukaVDfRpoc5DOYGfn8twJwijKhNLQCyAwVZmprbvEgrfS6hcCUPYP 3rxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g4CA7m71VMHDqI95j4L+UvW9grU0Bka60ctKudFnJRM=; fh=nTotddeOw7qo5evXnFslYovS1VRB9UQeeWzf9oPpDm4=; b=bosfR/4q0Ot3AH0mofpo9P/w9mLFYw66Y9jf8lu//rMzZy1Cv2QcMSXDPl5wZQwQk7 OUHgRpBlMo1TzxRZA6OlZBK6HPpwU3hGh65TyKd1plCbSio4mkPDXf7KjxjZC7SKmcHd PaGKchy9INDpVqnM9VeF3OF7VnDKNASH4lU+kmi1nwMMhXLbIPXeBrhe5F4GwJQIzkyv e/cuEXjH0SNgDBSPjIJeddHw/UHY3utttvVMOkAtWvcaCAFlgnh7ruB8l5/u18qGECFK rOLusrVnYBkqfTS2rV+0sGzJbun43ynHIe7zDGCmLFl+sDtsrJyAzXe4LN6gtznltMD5 0DrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=jQSF3tYk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a170902ce9000b001b8a4954be1si2491048plg.595.2023.08.06.21.47.39; Sun, 06 Aug 2023 21:47:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=jQSF3tYk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230060AbjHGDwi (ORCPT + 99 others); Sun, 6 Aug 2023 23:52:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230073AbjHGDwf (ORCPT ); Sun, 6 Aug 2023 23:52:35 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.216]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 89D8C1711; Sun, 6 Aug 2023 20:52:29 -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; bh=g4CA7 m71VMHDqI95j4L+UvW9grU0Bka60ctKudFnJRM=; b=jQSF3tYkPu1IELOWopTwp S6r557ebZwJSdiRXK7TSw9yNmdwpjIY/mq6sdC1bNmaW5lr5w8qzOlHGErT5RFVd xHSFJcEkOMIhOkHiITiYQLfM5ht/OiG8tUc9E6Lzh8szhXsRE0TLlCta4YTwJwn4 kLM97WGhVjoVsNIC6dt8i0= Received: from localhost.localdomain (unknown [39.144.137.13]) by zwqz-smtp-mta-g0-4 (Coremail) with SMTP id _____wAnC8nLZtBkztfiCQ--.36380S3; Mon, 07 Aug 2023 11:36:47 +0800 (CST) From: xingtong_wu@163.com To: ilpo.jarvinen@linux.intel.com Cc: hdegoede@redhat.com, markgross@kernel.org, andriy.shevchenko@linux.intel.com, 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 v2 1/2] platform/x86/siemens: simatic-ipc: fix logic error in BX-59A Date: Sat, 1 Aug 2043 01:30:26 +0800 Message-Id: <20430731173026.2631-2-xingtong_wu@163.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20430731173026.2631-1-xingtong_wu@163.com> References: <7196d4b9-34fe-4a18-863b-65d07c4a348c@linux.intel.com> <20430731173026.2631-1-xingtong_wu@163.com> MIME-Version: 1.0 X-CM-TRANSID: _____wAnC8nLZtBkztfiCQ--.36380S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7ZFy7tw15ur1fJF1rCw48Zwb_yoW8GFW5pF 4rG3WIkrW5W34Utw1kGay7uFs8Z3Z0krW7G3WUAwnrZwnF9F1jgr17Aa1fXFZrtw45Wa43 Wa9xtrsrGan8Zr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07bnYFAUUUUU= X-Originating-IP: [39.144.137.13] X-CM-SenderInfo: p0lqw35rqjs4rx6rljoofrz/xtbCfgPE0GDcPDRxuAAAsU X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_L4, SPF_HELO_NONE,SPF_PASS,T_DATE_IN_FUTURE_Q_PLUS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773020240878879568 X-GMAIL-MSGID: 1773544325193751940 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/ 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 Fri Jul 31 17:34:17 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: 131658 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1214922vqr; Sun, 6 Aug 2023 21:07:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkdvfbOABZ6ZfEX+ncbCXZKL80FxNTh/OWNytoUjXOrRex2gRVsVqtoAHM0VIDv6gUj4eX X-Received: by 2002:a17:906:105e:b0:99b:5642:b97a with SMTP id j30-20020a170906105e00b0099b5642b97amr5990603ejj.46.1691381233122; Sun, 06 Aug 2023 21:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691381233; cv=none; d=google.com; s=arc-20160816; b=OdKMAECoyo+xCw9flZrrvrOO0eHcDXn8hyta4fyhBRv6BAYrXPGAaoTl3GHGYqJuGj XienhKAri6q6VM1VkVRDCheYXxfiC00pWPja0G/CmKCVAcF4KwpuzBfb1xtK619dU1wa 4yOZnF33dTFc2RocY8BdbmqeG1vwzV+yJAiaYHvJdPOyGEzP0ATiD+mX95ger5EvnXSl Tqb6pgJG2xhKz7EHKCZFx7XH31BYVXKXRRdSrZOTvh3GxnAlhT3Vj4hB4CK+83eyBIpb cz3jLmI5QVfMq6XpoOWfhGULqX9IaHRNXd6Tc/pDEmQDTmMWglG9R1bh8KcYLBa2/179 +PHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/v5lHCD4095ylXk3bIxsvLNqIL1BFCOYqFMwytNhM6k=; fh=Qc0ctf5US/544mr+oBCv1wEuQ8l6fBpob2KvFYg/ESU=; b=FgrvCOCdAzJ7Q1Pc0/MMonk60i8xKYCgA4ihPupe4ZdTytUo2EM1+ki8gbUH8B4qWl OOEyHiW6iDbBV7z8Slgo4O9F86IWvQve5ZoPqe4IyDCbqLsXajkTI/4vV8mrLCjJwQ6t rSB/GlyGnsknU5HaFlWiFl59NOFfOhin4Ts2UGt/KQiVN6V5Gp4qln1oQt3Sw+xQxjCQ xCE1wDrjFHQXVXZL2RuDmX4tjqdVuVQnis48rP52hLnPnUWJbqMtLw81vZCtzDa8yh8i fDjbPZchnrETzocF/tfc0txKfjcR1ExloL4rMox1+TMcOPjendf9Oh/xMk6YapZ4zpSz Xc/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=NaG1GOsH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j16-20020a170906411000b00992f45c9341si5210879ejk.1016.2023.08.06.21.06.49; Sun, 06 Aug 2023 21:07:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=NaG1GOsH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230002AbjHGDlU (ORCPT + 99 others); Sun, 6 Aug 2023 23:41:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbjHGDlR (ORCPT ); Sun, 6 Aug 2023 23:41:17 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C2DE8AD; Sun, 6 Aug 2023 20:41:00 -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; bh=/v5lH CD4095ylXk3bIxsvLNqIL1BFCOYqFMwytNhM6k=; b=NaG1GOsHPYcKybDV3dMho ZzbxEKI8Vs7B7eKbdGdx20AmAXYQo8Hko23IOACnr+zg60WEMgjwWgV0uTeifAcM NWDK//Dy4Qwt2uq8RDlbJtI925419N2RW9DQn4GTImJdKbH1OqUHCC/hFP8YqTgl bknm6Mpp6aDSeM/q3c/5pk= Received: from localhost.localdomain (unknown [39.144.137.13]) by zwqz-smtp-mta-g2-2 (Coremail) with SMTP id _____wD3EpCyZ9BkgCbcCQ--.7851S2; Mon, 07 Aug 2023 11:40:35 +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 v2 2/2] platform/x86/siemens: simatic-ipc-batt: fix logic error for BX-59A Date: Sat, 1 Aug 2043 01:34:17 +0800 Message-Id: <20430731173417.2692-1-xingtong_wu@163.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: _____wD3EpCyZ9BkgCbcCQ--.7851S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxJrWrtFW7CFyrur1rKFWkCrg_yoW8GFWUpF 4rXa10kFW3Gw15tw4DGay7Zr45Za15KrW7GFyqyw13Z3sFv3ZxKr13Aa13ZFsIyr45Way5 J3Z3trZrCa1DZFUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jReHDUUUUU= X-Originating-IP: [39.144.137.13] X-CM-SenderInfo: p0lqw35rqjs4rx6rljoofrz/xtbBEBbE0GNfugX+sgAAsd X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_L4,SPF_HELO_NONE, SPF_PASS,T_DATE_IN_FUTURE_Q_PLUS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773022714554455728 X-GMAIL-MSGID: 1773541767496749753 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/ Signed-off-by: xingtong.wu Reviewed-by: Ilpo Järvinen --- 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])) {