From patchwork Sat Mar 25 08:35:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 74862 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp293343vqo; Sat, 25 Mar 2023 02:10:58 -0700 (PDT) X-Google-Smtp-Source: AKy350ZguDQR1XgTL74W2/+3gRJqsoI1vdcQvgIfg37SeE8Kz+pZa+ytF4jyuRgpdM9/2DC3g1pg X-Received: by 2002:aa7:991e:0:b0:625:d9ec:51c8 with SMTP id z30-20020aa7991e000000b00625d9ec51c8mr5319257pff.22.1679735458231; Sat, 25 Mar 2023 02:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679735458; cv=none; d=google.com; s=arc-20160816; b=rz9A3UZoQwxm/ZZ2jUWhhKurm92kXpbwz+8e6J2TewTZWoj5Vceu6mPHyVBFxgKsmx e9iTnOexXmSWXhIq4vWt1VE0px7rVkOUccmSGQsU+c/rI5WK2nczQeOambK/eFkJljyF YnNvdQvwUoSxXgM1Fnz19/Z53fDfFr4DnP30pN4823y9ycn6RIzVqYZjqDoDE5cjsHti ga4Rp7ayJiSaK7PEaMN7La4+TyZNiEp+7Xc3QBhyA4VC/Ql1gYI9xQeOL/Msu7gqOJq6 4AyNWLfot92B/swJ+fBL097WvhX215CVRU9mq/XEEb16NcymU8zt6rvgBEIRrsGvd65+ pbkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=OtIYOlrEQ6ezmFUmDEHNM3uU5E+lWona9mVF/nvcfZ8=; b=bSdv71y+jwF+s3yFKwsCf7ktYPOOE9qKajgOyF+qtO9uMt8gwBugjIOfPyShvRZYvo Kyx6Me06AAWllTdgd+rqq+L6zl957Zdk6nL1p1UtKjbaPldfQ7GzDYGVIZZVOclcfvtv VY1Um0k+haGpZkKMkyVozOjYhR+Kg3tl8yNrfRdRxQ2KiRV/3sazOjDHb90joODIA8F6 xw7IHb4lcdgJ4fHwkrworksKM39itUloRiPTnROkVqWNyifypTt5DF7CHRRjPnILDn1s QJuQKQfvnRgEEu1ZxUfD02TT9+xMkCWIY6Ymwr+XpdNF0tDA/D9CbE/JUVWkfVmhSHVM aNcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dlCMbDJF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z186-20020a6265c3000000b005a8bd21e2f7si21422763pfb.186.2023.03.25.02.10.45; Sat, 25 Mar 2023 02:10:58 -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=@gmail.com header.s=20210112 header.b=dlCMbDJF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232152AbjCYIgK (ORCPT + 99 others); Sat, 25 Mar 2023 04:36:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232153AbjCYIfz (ORCPT ); Sat, 25 Mar 2023 04:35:55 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDE7918B00 for ; Sat, 25 Mar 2023 01:35:48 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id b20so16614516edd.1 for ; Sat, 25 Mar 2023 01:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679733347; x=1682325347; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=OtIYOlrEQ6ezmFUmDEHNM3uU5E+lWona9mVF/nvcfZ8=; b=dlCMbDJFvAx5eJsoyWDnb8bGX9oUMgTZX/0FamcM+s9vtXAFihUgrJah6WDD3LKRyy kzGa6PRSs1Tk6fKaH69zeKiodA5uqR2BoCyAgsCr/LuAGys4fnrwRPXcicr1yijNkLIJ TgCMHq7sZBNgibwQ+YU0uaWF3HOGmau//FWI2AfPkJNMrNAUGNMObVSFeaw41ysHlvRW TRr3iaeKSlSK6+cCbHhXbqqO7VjiEetFD9sK4+GJyQMqzag6DQp/24tBXPQof8t6kReZ 6EWxsw02e1vWRB3LnQppnbu12Fmh6f16RlSWWD9DIRt6tgkDVTW7irEN5oFlQB++iFTL NTLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679733347; x=1682325347; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OtIYOlrEQ6ezmFUmDEHNM3uU5E+lWona9mVF/nvcfZ8=; b=e+C1JPm64G+wURWO/GfYqoE++J+71UuYkIbRbI42x+jNVTqvZgpd4pPoXM0l8laNuw 3lsvJt+NxJuW7rcHCWcky/Cgnr5NLp9UvGS8/WJc8T3LCB+NWcfcv332mBML0fzzbDpD SxlQqlsOjFf7Ypr1AvoqQUClKni76b8YQ0xJ14FWI1r31NrWUUk8++FQeqGajT6dkAhR 3YDS1EOXVt0JSmbwC8GbBQdNnYx4XtvaYZmRY0+wNs03aOcmCI8xfGY4ysmlRWRtiISU xr8QmAKo6yF6UOnf20YO1SUG5EDRYaj51WfKveWuMR4UU+V37LbSFGMbq8gncQ8GD7UU Ql6w== X-Gm-Message-State: AAQBX9eo73Rkwl05JhQajqB2E601/W3ZCIh69YZ2vbGiICNJ4Gv2kpen V7cWesNhl+2TAe0r7CC6SfY/gjFAu88= X-Received: by 2002:a17:906:209e:b0:8d3:be84:1cc6 with SMTP id 30-20020a170906209e00b008d3be841cc6mr4172218ejq.3.1679733347206; Sat, 25 Mar 2023 01:35:47 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id qb16-20020a1709077e9000b0093f3d41b9ebsm683134ejc.220.2023.03.25.01.35.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 01:35:46 -0700 (PDT) Date: Sat, 25 Mar 2023 09:35:45 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 03/11] staging: rtl8192e: Remove priv->rf_chip in rtl92e_set_tx_power Message-ID: <190d0a77602cb89bc24512c99b72f25f4ca5d5e2.1679732276.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761330287560065422?= X-GMAIL-MSGID: =?utf-8?q?1761330287560065422?= priv->rf_chip is initialized to RF_8256 and never changed. Remove condition in function rtl92e_set_tx_power as it is dead code. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c index acd1e1869d78..6579c7b81bfd 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -485,19 +485,8 @@ void rtl92e_set_tx_power(struct net_device *dev, u8 channel) powerlevelOFDM24G = priv->tx_pwr_level_ofdm_24g[channel - 1]; } - switch (priv->rf_chip) { - case RF_8225: - break; - case RF_8256: - rtl92e_set_cck_tx_power(dev, powerlevel); - rtl92e_set_ofdm_tx_power(dev, powerlevelOFDM24G); - break; - case RF_8258: - break; - default: - netdev_err(dev, "Invalid RF Chip ID.\n"); - break; - } + rtl92e_set_cck_tx_power(dev, powerlevel); + rtl92e_set_ofdm_tx_power(dev, powerlevelOFDM24G); } bool rtl92e_config_phy(struct net_device *dev)