Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3732353pxb; Fri, 11 Feb 2022 06:38:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGJ+Z6I8RjofsRfngUHwJNdUWn1RFQQhEPZclYCqm7XIOxlBycf+y+WD6j05Q1YziIRHT0 X-Received: by 2002:aa7:d3d8:: with SMTP id o24mr2253027edr.127.1644590293582; Fri, 11 Feb 2022 06:38:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644590293; cv=none; d=google.com; s=arc-20160816; b=Nd9Tg010AMAAfimEGZGgdtGtZsaEBRXDHH7hfIUnRI/4Qi4s5b/yX74qMOussUJm4F A0d+s80Q4q20Kc+en0xK5JOeowlNi1yeWyH1XqCLZ+uhu+rEM8zvFbPiaMtR1F6x4qE4 VIE0u//8vYBx+Oik0Ip6B/QPiIx4hwRY+pejAUT2VWIOStU+O8R6mpMSrGbfAw93WlZ2 1L7f3Xw6NaDvMGtNinp26Z0cDEdOKbSpKxDxcuWBEpO51/IyaDQBVrV0+AlgtjtLPT4T NgIuyMOwkCvbXg0jlwpqXLPDjg2VcDCqKxaA/xwp3l+OCmeIZG05FsmG7c5v1JZVHzeQ XrDQ== 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=I5E4TnmkwIRWTS3mXhrZLZUtN61XWp5A4BS3xJ+Ql2w=; b=tB0rGkKq/eFqlVqZZWyIGdTATiq+Tlb2u89I4pMU2vtM+/+V/TJg35TBk+nBja1W4P JYd9mTS4n/AWH/YrWS90ubhph3u2JEmgbse6002xJGZkOgLONIlnVsmNoaCU0NwfBFfV /gr+mgyhKcx/qjmn90XBx961sxDKPAeo18uV6dOCP+UVOsw9e2bs2flS1Gx/rCuXCscK JrKYLvN4dbCjd7K9Bd/MkgQOL/Dr/Cg93BWd7BpLk9r/6LMLrszyHc/1bfSeAzF7CdWI SV02Bdlj0e7pdz+vRmWg+5EnZiCzEFPHEJlSo5SXcWoTfELp/yDW9uoMGBJqG1obniJU UQTA== 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 en20si10378017edb.445.2022.02.11.06.37.48; Fri, 11 Feb 2022 06:38:13 -0800 (PST) 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 S1347906AbiBKIDf (ORCPT + 99 others); Fri, 11 Feb 2022 03:03:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346181AbiBKIDd (ORCPT ); Fri, 11 Feb 2022 03:03:33 -0500 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0094BBF for ; Fri, 11 Feb 2022 00:03:31 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0V4890vr_1644566603; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0V4890vr_1644566603) by smtp.aliyun-inc.com(127.0.0.1); Fri, 11 Feb 2022 16:03:29 +0800 From: Jiapeng Chong To: Larry.Finger@lwfinger.net Cc: phil@philpotter.co.uk, gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] staging: r8188eu: remove useless if else Date: Fri, 11 Feb 2022 16:03:22 +0800 Message-Id: <20220211080322.80388-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_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,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 Eliminate the follow coccicheck warning: ./drivers/staging/r8188eu/hal/usb_halinit.c:1105:3-5: WARNING: possible condition with no effect (if == else). Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/staging/r8188eu/hal/usb_halinit.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 659e0f26db29..9bcbc275f043 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -1102,11 +1102,7 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) /* enable update TSF */ rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL) & (~BIT(4))); } - if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) { - rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR) | RCR_CBSSID_BCN); - } else { - rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR) | RCR_CBSSID_BCN); - } + rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR) | RCR_CBSSID_BCN); } break; case HW_VAR_MLME_JOIN: -- 2.20.1.7.g153144c