Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp826417rdg; Fri, 11 Aug 2023 00:24:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2fZnqETturXUXjJ++FOO53senya65rO18l0JQhccwdFQvZ84cIO6cpwQnBjvTaBGMar4E X-Received: by 2002:a05:6402:5112:b0:51e:588b:20ca with SMTP id m18-20020a056402511200b0051e588b20camr5307547edd.8.1691738660195; Fri, 11 Aug 2023 00:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691738660; cv=none; d=google.com; s=arc-20160816; b=RLesqiSCsUTj+/TiDaOEmFyo16CTGiCZA8cfhXFLPxVPaKncNSm804T6MTqIDpFxCK Uz/gQqPxIHpGzkYah9Wmx2WZyjSAvGiPwNVR2dqZn0YeAKBkY/3rNcRmPc1GeqR7EQzh 42vpkhl0pg58klzLkWQxjtd9Y+H3F1r1qYk7B+0NzBIMz1PkMiD4jkxCUIynJKAqKMEi wC3nMu4Lad19rlt9OeJyx+VW6Fy/lebfjG8sjRG+ByaFtw8fsNgothJKSYgCvo2hGV5E Gb7G/7pTmjJ64WTbvRnoBbH06EUS5WWP/X1OxYZgSuqzlYZ6hsudhJzGWbFtRtUIZM1g PL8g== 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 :message-id:date:subject:cc:to:from; bh=hB7XDgNJkCeTRg9AmXki0ZFqdyYhuMbuabf76s59Owc=; fh=IzHwN15QKASbURdmMEckO4UBBivyq9A+aAzVUCTvtNw=; b=G5xbFmuPCx8zlU3RYWfuL7EA/2FuLMXfTTKBimzg6cI8csZ0GTUl9nhJw5WDyVR6EW o9vwqqXgjVitpAJZRPNZdR1X6UbPd3E+AKqwEHEEtOail81Q7/OifdCVRq3Y/zKovCkU cz4zaImIFGNZBFYOOph+cVTzuVRXeV7luejIXwFfqtJhu1Ocg+3WwGKqZKIx5UTDb1dz cbioVg/ThjQLh/1TBKLPDuLSRXzGxemr428vwhlkie/HbKvdatkomf1t7DEbu8YAWOW+ Gjlm1GPX7ENDKU/VMk8TkS2xB+6Ug7MgYTpcb01YNTwLq9kxOB1dGFtPO/Wm0Sd9JO5W +KIg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h24-20020aa7c618000000b00522563f375esi2942808edq.258.2023.08.11.00.23.56; Fri, 11 Aug 2023 00:24:20 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230357AbjHKGaS (ORCPT + 99 others); Fri, 11 Aug 2023 02:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbjHKGaR (ORCPT ); Fri, 11 Aug 2023 02:30:17 -0400 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F232A10D; Thu, 10 Aug 2023 23:30:15 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R531e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VpWG8Xa_1691735398; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VpWG8Xa_1691735398) by smtp.aliyun-inc.com; Fri, 11 Aug 2023 14:30:12 +0800 From: Jiapeng Chong To: jorge.lopez2@hp.com Cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] platform/x86: hp-bioscfg: Remove useless else Date: Fri, 11 Aug 2023 14:29:57 +0800 Message-Id: <20230811062957.82728-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham 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 The assignment of the else and if branches is the same, so the else here is redundant, so we remove it. ./drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c:545:3-5: WARNING: possible condition with no effect (if == else). Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- .../platform/x86/hp/hp-bioscfg/passwdobj-attributes.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c index 03d0188804ba..771e554182dc 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c +++ b/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c @@ -541,14 +541,8 @@ void hp_exit_password_attributes(void) struct kobject *attr_name_kobj = bioscfg_drv.password_data[instance_id].attr_name_kobj; - if (attr_name_kobj) { - if (!strcmp(attr_name_kobj->name, SETUP_PASSWD)) - sysfs_remove_group(attr_name_kobj, - &password_attr_group); - else - sysfs_remove_group(attr_name_kobj, - &password_attr_group); - } + if (attr_name_kobj) + sysfs_remove_group(attr_name_kobj, &password_attr_group); } bioscfg_drv.password_instances_count = 0; kfree(bioscfg_drv.password_data); -- 2.20.1.7.g153144c