From patchwork Sun Apr 2 09:51:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 78216 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1658885vqo; Sun, 2 Apr 2023 02:59:16 -0700 (PDT) X-Google-Smtp-Source: AKy350YWm96zWFYZrIUGnLE5FFIbudM6s321O2ln0bmLQgkrlwZ5NH+DUPhb4thlTAyzNyl0rHWd X-Received: by 2002:a05:6a20:2d9e:b0:db:e054:826a with SMTP id bf30-20020a056a202d9e00b000dbe054826amr15964366pzb.5.1680429555882; Sun, 02 Apr 2023 02:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680429555; cv=none; d=google.com; s=arc-20160816; b=ZfjGuzj6jF9gDN2xbM7XA/3rmuncmi0rtm1TYbEd5Fnt1nuzzT9N//xWDPlEgHU2aW 7L59xGCUWurYhWuYI5gY6D75KNPK+8Ttxqq2i1mb1F7t/GIopddi+0dZJISNvOxexGDb K+62LDSfj3FTdUTbztjUGtfHYV1kU3LVMQUZ9g5fzGYGDtU/gaYHKb7dguAx3NelS4oy CjiHtd2cXXrhjdNHQRjZ4XkRXNgDM4+I0CwzzVHk/kb4sQXH/vau4U7EjSGvx2Hvh9QK EQ26rq6U+21Ay1TjH73rPUuHcOo9iRs16H26wGikBJa3rJ/JFZltVw2brq1kBRkN3bh8 NfBw== 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=8kLb8IQUT4+CAKzjeCA5AxiV6CvhrMng8FzIucyahWM=; b=WlX8sSF1WoaoFQmFnWnK7Mg/Z1imt5thjqAYeFGL/ZTHtuw1tj74mPvJjUPyu82Twl ZTh9bJUg9sum7TIuCT0MhDn/zx8AHIobtWZgT+AXdEKxHYNBZZ7mg4jefU5MZg5xDtfb Q4wSjyULUEYHwBU2BVY3dm8K31oxEoljUD2yF1g+QkE/VhNJlkW995LsNc+aBjHrk9VK Vh5m3dL1TZNHG+tVL6AlZE1sA8AjZT8/tMCXf8hC3qMi6g4v5CO0ZxzW1VgKjRfzBdxD m5L64dcxe7hCLPRC1Oqr8b+E5nqcM8Kcix6TCYyZCHgPjmNAj9JmWVVFRfAq4NIDxu+5 uAow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GmlE4ygR; 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 h17-20020a63f911000000b0050c0c9d2931si6251683pgi.671.2023.04.02.02.59.03; Sun, 02 Apr 2023 02:59:15 -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=GmlE4ygR; 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 S230436AbjDBJwe (ORCPT + 99 others); Sun, 2 Apr 2023 05:52:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230377AbjDBJwV (ORCPT ); Sun, 2 Apr 2023 05:52:21 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E4C65FF9 for ; Sun, 2 Apr 2023 02:51:58 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-930bc91df7bso77010666b.1 for ; Sun, 02 Apr 2023 02:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680429116; x=1683021116; 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=8kLb8IQUT4+CAKzjeCA5AxiV6CvhrMng8FzIucyahWM=; b=GmlE4ygRZEOIOnMBg94rr+q76rKLFyj+RlkqpMsBHVrx0rPeQYQIs/dR0nyxdf/EAa AnUd8eYZLWB58oL5RYTQJTwWW21ZuqnxQmtSKTd7wQDtsnJAd6F7Go5sXXFiEpeNZc8v kjSUdQV2J4v+Ecvh3Q9CpHCopfvzw9SJ9xsqprSUS9fxKul+Sq20RaGrzmQYB+uHToHU ivPO38uZm4xVQEcwTKsKt7EpN8RVHfZPG313eoINCLtRz+BtbxBKS41hD3T025tRXnDG WUrzGZWr/s/1epGq3pnqHJ4+OFPs9Qi3YazOmzJuc/xxaEBZC5sIreYwbdZVAqaDBGo8 yvlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680429116; x=1683021116; 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=8kLb8IQUT4+CAKzjeCA5AxiV6CvhrMng8FzIucyahWM=; b=3/cZ+Blaau3IEH9ArgDGKepjlTLjUyn078JPZU6HyKpCQeoMFrPkTcG33h/BbzWoPN o2wsPh8nuBH8eTAwFkRZ5gAKuoZVpQ00v0fupAquXfvBKFiQQ6vxzQu4sG0B+EL2LY7N OH0vrhCg8wVKHtU5V8hzr5IveMAIK/rmHuju+WOlR45GNP3r8IJECygIDVpJOCxBgZi+ 6+A46Kpf8vrk1GBVXL+K4H34kPmzMgusNkaXpjAvh1fxrQZNzPz9IJtqEzEBsfa3sDNL 192Dx2XmZv9422NrXL7LQE/r6kN4XpIMXLc/+8OxvEaWPjzRWAiZJPOarSlorbmxOzIS pVvQ== X-Gm-Message-State: AAQBX9eRMVB4lgyWx5IxTml1ZGBfptQRdehr/Hw+RNPD81Wge4oLHfiy BzDfNZ1Aat4SOTNNs5A8UDzpnztsZPc= X-Received: by 2002:a17:906:2098:b0:930:7f40:c1bb with SMTP id 24-20020a170906209800b009307f40c1bbmr9702476ejq.4.1680429116281; Sun, 02 Apr 2023 02:51:56 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p57935146.dip0.t-ipconnect.de. [87.147.81.70]) by smtp.gmail.com with ESMTPSA id g17-20020a1709064e5100b009312cc428e4sm3026075ejw.165.2023.04.02.02.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Apr 2023 02:51:55 -0700 (PDT) Date: Sun, 2 Apr 2023 11:51:54 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/6] staging: rtl8192e: Remove local variable Value and powerlevelOFDM24G Message-ID: <2076dc2f8f5afc11cbab23bc3f5d4ace9bf33bfd.1680427945.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?1762058101814424159?= X-GMAIL-MSGID: =?utf-8?q?1762058101814424159?= powerlevelOFDM24G is set to priv->pwr_track. Then Value is set to powerlevelOFDM24G and then only once used. Remove both variables to increase readability. Signed-off-by: Philipp Hortmann --- V1->V2: No changes just rebased --- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index a21b3798db48..cde41111012a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -516,10 +516,8 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); bool viviflag = false; struct dcmd_txcmd tx_cmd; - u8 powerlevelOFDM24G; int i = 0, j = 0, k = 0; u8 tmp_report[5] = {0, 0, 0, 0, 0}; - u32 Value; u8 Pwr_Flag; u16 Avg_TSSI_Meas, tssi_13dBm, Avg_TSSI_Meas_from_driver = 0; u32 delta = 0; @@ -528,14 +526,11 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev) rtl92e_writeb(dev, FW_Busy_Flag, 0); priv->rtllib->bdynamic_txpower_enable = false; - powerlevelOFDM24G = priv->pwr_track >> 24; - Value = powerlevelOFDM24G; - for (j = 0; j <= 30; j++) { tx_cmd.op = TXCMD_SET_TX_PWR_TRACKING; tx_cmd.length = 4; - tx_cmd.value = Value; + tx_cmd.value = priv->pwr_track >> 24; rtl92e_send_cmd_pkt(dev, DESC_PACKET_TYPE_NORMAL, (u8 *)&tx_cmd, sizeof(struct dcmd_txcmd)); mdelay(1);