From patchwork Fri Oct 13 14:44:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 152600 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1943351vqb; Fri, 13 Oct 2023 07:44:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTs9Wd0I79g32AsqiWvXK9/JK3n5s2+09g5ZMguBMSxxynZrU5lCZQh1T5OEEvrbeehlFU X-Received: by 2002:a05:6a20:9393:b0:16c:b95c:6d38 with SMTP id x19-20020a056a20939300b0016cb95c6d38mr19962318pzh.2.1697208274670; Fri, 13 Oct 2023 07:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697208274; cv=none; d=google.com; s=arc-20160816; b=kfLJyZEpqL659cx2dkFG+mwDGTmQZg/zHGKzExGpWrRmQvonMwX2T6o21YmZKAYKpD 6gLDb54qcruDHVP1c21MCK2aD35HJfB0iYx2M7M91OqCFKhuSilTYl2+TLmT1JFpRGHv AN3IY0lm74Gd/jVR5rWCbcHhjIJd0SfsgbC4FWGY2Q+I2MIn3JY/3k1YclfSVdSYJjsi AD3WmNgDOgQfmPofhkvFiDM2V6nYwhV0dhb9fDpDxPpY36/rEssfqWx3xpkae13Nzq0k 3Q+cEtV28jv0tfWbwwPx2+CpGSCI0s3ct2bB8Xq5jSM59hxwsO5/iYv6OAz8HWgCWfMg vvTw== 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=Vm9Boe/IQ1CKHp5Z4OotYOocbOOmHzj4fbuWIiiw6vc=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=x2C76MXhEs203YfBLXNmyJM6FzhTsnZGulNLKxdQ2R1H9CQiMfyl+PK5wZWP1VJdQC IlLOkTP4JJ5QZpDOCW7V9HaNfn3a+Swl0Z4Kmmhr32uwbxV9ngMIwqpj2gc1S3VPyO4z UyM7VU7fkoJEoaRpjxZ+x352rT5+vnFXb1x4xqFnZuHvDak/4gIoIqOIBiHb+Y2fgDbR Bi/OvpB6wALe8eloXOuiv6y1K5mUBhweL1xZn4G066UfpqQ2kUc7Ue60eHel6+7CY1eB Ilt/+6Si0keVUuyg0q55kV+LUtiYYdOmmECgnPWkBD3PRm3jQJjYCkraAMly0rfliyqR OqmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YGgN47Lw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u13-20020a170902e80d00b001c71eb782c0si4783822plg.464.2023.10.13.07.44.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 07:44:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YGgN47Lw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 7F88383033A5; Fri, 13 Oct 2023 07:44:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232215AbjJMOoU (ORCPT + 19 others); Fri, 13 Oct 2023 10:44:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232229AbjJMOoS (ORCPT ); Fri, 13 Oct 2023 10:44:18 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 860F7DA for ; Fri, 13 Oct 2023 07:44:14 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3232e96deaaso433248f8f.0 for ; Fri, 13 Oct 2023 07:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697208253; x=1697813053; darn=vger.kernel.org; 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=Vm9Boe/IQ1CKHp5Z4OotYOocbOOmHzj4fbuWIiiw6vc=; b=YGgN47LwEW41wv09+lrcTOKCWba+JJfw/Eh0fznfHGQK79bGwJukCOw52QoRssNJ/O zrd7DMdKAS4b0Oe/JW3fefUoH0VKnx6FmOVpEBf5brGNX9VXiqVRZwNZRG4KKbGNx7ey ohdrL9lhzEnkKFVDP8it3Vi0m10rNbBHmsC1t2xUI2RAbVf2y7JL8P1ZqQqhl3zWaMJ1 SFGwudh/jH/tSb5HmEi0yB0DiHGBUZEmMKhuMH6y2R48I1hd184WW9gxulKxWrdLM3p1 Ez0p6XhcDgpLtz77WEtnXGGZqMHO4E6p/KuLGEhCmHwHiaB6Sk5b0eIyFiS/3Vqigfuk Slmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697208253; x=1697813053; 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=Vm9Boe/IQ1CKHp5Z4OotYOocbOOmHzj4fbuWIiiw6vc=; b=nPYmitoa8pmnmoMkEHZMnI+6Ldmu67J5eJ0Hig0MMMKDBkAtRfS+nZkdpqxF7Ol0h4 ejEhuld7L3zrP2pJGs5NmfweffC7ywSUTQZXmle41AU9TO2dBvONC1lcrRvbKjsmf0/T eFGCwcYA8H07Abu69Puij2zN6/RBTu2hXfsJdSYeWuXZYU1BphWIUX5QbG4igs+mK/Hf zwN3G/a6BKjCwWu1wQxUfBWowNB84AmGtcWiEvaPiEeW6i/cFljVIVvpOHnjlAYnYnWQ QFwsFTFUsBiD3SHaCov7gq8pzcUKCImEoJAJQL7lTwHsmco6AgHB2caFHHQONmlgO+pV zU8Q== X-Gm-Message-State: AOJu0YyR5WYdgXSyDMIx419qoWJc4WAihPUx1g348KJb9UX18MqumyX6 VlK0L+kZK1GxbSSpP4ibfb0= X-Received: by 2002:adf:ab49:0:b0:32d:974b:6dde with SMTP id r9-20020adfab49000000b0032d974b6ddemr2356312wrc.0.1697208252846; Fri, 13 Oct 2023 07:44:12 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id n14-20020a05600c4f8e00b00405bbfd5d16sm337950wmq.7.2023.10.13.07.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 07:44:12 -0700 (PDT) Date: Fri, 13 Oct 2023 16:44:11 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] staging: rtl8192e: Remove unchanged variable dig_algorithm_switch Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 13 Oct 2023 07:44:32 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779651864047437024 X-GMAIL-MSGID: 1779651864047437024 Remove variable dig_algorithm_switch as its value is set to 0 at initialization. The equations result accordingly. Remove dead code. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 18 ------------------ drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 2 -- 2 files changed, 20 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index e69c22e5d205..0bd9211500ac 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -911,8 +911,6 @@ static void _rtl92e_dm_dig_init(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); - dm_digtable.dig_algorithm_switch = 0; - dm_digtable.dig_state = DM_STA_DIG_MAX; dm_digtable.dig_highpwr_state = DM_STA_DIG_MAX; dm_digtable.cur_sta_connect_state = DIG_STA_DISCONNECT; @@ -962,8 +960,6 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev) u8 i; static u8 fw_dig; - if (dm_digtable.dig_algorithm_switch) - fw_dig = 0; if (fw_dig <= 3) { for (i = 0; i < 3; i++) rtl92e_set_bb_reg(dev, UFWP, bMaskByte1, 0x8); @@ -980,8 +976,6 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev) _rtl92e_dm_initial_gain(dev); _rtl92e_dm_pd_th(dev); _rtl92e_dm_cs_ratio(dev); - if (dm_digtable.dig_algorithm_switch) - dm_digtable.dig_algorithm_switch = 0; dm_digtable.pre_sta_connect_state = dm_digtable.cur_sta_connect_state; } @@ -991,10 +985,6 @@ static void _rtl92e_dm_initial_gain(struct net_device *dev) u8 initial_gain = 0; static u8 initialized, force_write; - if (dm_digtable.dig_algorithm_switch) { - initialized = 0; - } - if (rtllib_act_scanning(priv->rtllib, true)) { force_write = 1; return; @@ -1040,10 +1030,6 @@ static void _rtl92e_dm_pd_th(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); static u8 initialized, force_write; - if (dm_digtable.dig_algorithm_switch) { - initialized = 0; - } - if (dm_digtable.pre_sta_connect_state == dm_digtable.cur_sta_connect_state) { if (dm_digtable.cur_sta_connect_state == DIG_STA_CONNECT) { if (dm_digtable.rssi_val >= @@ -1100,10 +1086,6 @@ static void _rtl92e_dm_cs_ratio(struct net_device *dev) { static u8 initialized, force_write; - if (dm_digtable.dig_algorithm_switch) { - initialized = 0; - } - if (dm_digtable.pre_sta_connect_state == dm_digtable.cur_sta_connect_state) { if (dm_digtable.cur_sta_connect_state == DIG_STA_CONNECT) { if (dm_digtable.rssi_val <= dm_digtable.rssi_low_thresh) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h index 15af490d2dcd..12b7d426b6b9 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h @@ -50,8 +50,6 @@ /*------------------------------Define structure----------------------------*/ struct dig_t { - u8 dig_algorithm_switch; - long rssi_low_thresh; long rssi_high_thresh;