Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4543740rwr; Sun, 23 Apr 2023 07:48:46 -0700 (PDT) X-Google-Smtp-Source: AKy350YnlvX2uEmnMsXdq+OOHnDrJ9LgJxLNWpDHKnOpxmCxE0vFk3ZFsXEznPueQWonhmGUowO1 X-Received: by 2002:a05:6a20:3950:b0:d5:73ad:87c2 with SMTP id r16-20020a056a20395000b000d573ad87c2mr15053925pzg.56.1682261325989; Sun, 23 Apr 2023 07:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682261325; cv=none; d=google.com; s=arc-20160816; b=u1YuQxJI1LX3/r0CJtDBm9v4Svv5SFxmIGD29qcThvSw/WsdM+GTmxlT0HPf3d9AyX R7Y1SYzhH+gWMC1gKYH7L6Tn55aJArI/rnRXdRULlkdZIZyaYr6uJfBHehSiYnz7rouo qPyvRptrvDdBd28d1XzSXFlGmmhNPm6LRrDjrE/6R1rG04jZgWA58faS5UpDWt50t7pN WoT5VK5Wks8q0FcQ8SPd8/Ei4LYt7Hf1wWyWmXeH/kz75ewG32DL4EwrI7DiP9ihwWRC 5uZ8QrSR+pkem6YjGsEfQQTK5mh0TpPtI/OoX3F2xVyBxQzBHNQGm8PrBmBghQZ4YwSS vFzw== 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=SzOu+Yuals4xOY+oHNYGjX4zD/G3dXcRaRKK7UhEW+4=; b=PVBxpbfitkre9slORZ5ysKR4pIEYs5jZ3ogDHLzJJr+AmSqdqSY9EokKYL5y/LsM0e hXOouEhxynGS7QWFgW6T1tlOZvUkRcZyA1f5dyATbkcXUqztMdd08vl1gLQ5d9Dnumu/ g6wML+BSwg1SS6Zjx7QqkHEAgDgrWN2W3XGnSG3wXj7ydUXVEgnVx8yef6hHPaP2N9r5 pOyfPYOw73pTTfkuKyIPIzn/xWPGhE2itddyKaCtIhplgODpWD9RfO22OLa3/0eaq6Hx YGURfyjgEKtLkuCSCXWXbK/oH08MnyWCphFyCWhdgGsVSB3/HeNblIrv1MJIiZEvmm5u 9tfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qgToE19+; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u62-20020a638541000000b00525048cb4dasi2608876pgd.555.2023.04.23.07.48.32; Sun, 23 Apr 2023 07:48:45 -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=20221208 header.b=qgToE19+; 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 S230393AbjDWOWa (ORCPT + 99 others); Sun, 23 Apr 2023 10:22:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230386AbjDWOW3 (ORCPT ); Sun, 23 Apr 2023 10:22:29 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E35DEB9 for ; Sun, 23 Apr 2023 07:22:23 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-246eebbde1cso3100229a91.3 for ; Sun, 23 Apr 2023 07:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682259743; x=1684851743; 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=SzOu+Yuals4xOY+oHNYGjX4zD/G3dXcRaRKK7UhEW+4=; b=qgToE19+ZDmzMwnxB74VMCCo/QzL9mKrHmvnXsR7h/QctR3dqgRN/94YCa5p177iPw p+skWGZiMkHNAwZamvf6i7WCRb8TMMp1Vey92470KVGqrlvi8W44Qh4wCSBqbLbQau0W e1sYXFSLjLf/33lAAtXg3PD0QRNDFIPHiPUIEpYGs8iIy1yFI5GN35lvu+qIKTckcru/ Bm4I75UcIEwLM4fg0KPuC2fWURQITSuE8uKt7xUUu+sPWq8teJ5Wax805emBAQCgZc/8 xJEsx48r8KEEWCSC2ksZNop17Nv6eTsEfQlo61xhy1AMZoCesCW25Xb4Vr9k8/TmkOnF jymQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682259743; x=1684851743; 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=SzOu+Yuals4xOY+oHNYGjX4zD/G3dXcRaRKK7UhEW+4=; b=WxErN12SCykjz2Z5Amw3TApA+OSEMDKGMVDNAbJffhuhcQFSwFRbvLoePJEvoZArzS rlMSYExw5VVFKa3E5plTwHtpd6c85DKLY2XUgu3J2KfLEYd+XqX6WGpuJE5BeVO0nR1K BgBQJRHEFDv8AeKaDSICJQC6v2BIjy30m9f4hJ0H5u4nQwZG1y1IQfUs4cFidjYxbca+ UXnA84oB5prBtlD4FndUTMoT0yLYjiC+r0ZadPYMJzc7jNbmEB0NsEfdUFmgAzrNr9Ry WCJeehZm3+SgtRkiNN+ZevOO4gKjVUcU0TU6yB1hJRwSD9i02EuUCqFJJdWbyqC3abGf R4QA== X-Gm-Message-State: AAQBX9et2IE9NaGMrwk0NIWtcfcoA0OfmqcXI4pGdn8m6RqcpZtKHhqj 0Da8TWbputlJST6hQZfVyOA= X-Received: by 2002:a17:90b:238f:b0:246:c223:14ab with SMTP id mr15-20020a17090b238f00b00246c22314abmr10900361pjb.41.1682259743383; Sun, 23 Apr 2023 07:22:23 -0700 (PDT) Received: from pop-os.localdomain ([103.251.210.208]) by smtp.gmail.com with ESMTPSA id k14-20020a170902760e00b001a972e9d4f4sm667337pll.102.2023.04.23.07.22.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 07:22:23 -0700 (PDT) Date: Sun, 23 Apr 2023 19:52:18 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v4 1/4] staging: rtl8192e: Remove unused rf_set_sens variable Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLY, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 rf_set_sens variable is declared but never set, so it is always NULL. This commit cleans up the unused rf_set_sens variable and removes the associated code that relied on it. Specifically, the following changes have been made: - Removed the `range->sensitivity` assignment, which was never used. - Removed the sensitivity level get implementation, which always returns an error code. - Removed the sensitivity level set implementation, which always returns an error code. - Removed the `rf_set_sens` variable. Suggested-by: Philipp Hortmann Signed-off-by: Yogesh Hegde --- Changes in v4: 1. Split changes into patch series per feedback from gregkh@linuxfoundation.org Changes in v3: 1. Fixed description to fit within 75 chars 2. Added suggested tags per feedback from philipp.g.hortmann@gmail.com Changes in v2: 1. Removed function definition rf_set_sens 2. Removed usage of variable priv->rf_set_sens 3. Removed functions _rtl92e_wx_get_sens and _rtl92e_wx_set_sens 4. Cleaned up the variables sens and max_sens used in these functions Changes in v1: 1. Fix comparison to NULL of variable rf_set_sens --- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 19 ++----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 285dac32c074..08145e1f814c 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -231,7 +231,6 @@ struct r8192_priv { struct rt_stats stats; struct iw_statistics wstats; - short (*rf_set_sens)(struct net_device *dev, short sens); u8 (*rf_set_chan)(struct net_device *dev, u8 ch); struct rx_desc *rx_ring[MAX_RX_QUEUE]; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index cb28288a618b..06730d3ca6bb 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -311,10 +311,6 @@ static int _rtl92e_wx_get_range(struct net_device *dev, /* ~130 Mb/s real (802.11n) */ range->throughput = 130 * 1000 * 1000; - if (priv->rf_set_sens != NULL) - /* signal level threshold range */ - range->sensitivity = priv->max_sens; - range->max_qual.qual = 100; range->max_qual.level = 0; range->max_qual.noise = 0; @@ -813,10 +809,7 @@ static int _rtl92e_wx_get_sens(struct net_device *dev, { struct r8192_priv *priv = rtllib_priv(dev); - if (priv->rf_set_sens == NULL) - return -1; /* we have not this support for this radio */ - wrqu->sens.value = priv->sens; - return 0; + return -1; } static int _rtl92e_wx_set_sens(struct net_device *dev, @@ -831,15 +824,7 @@ static int _rtl92e_wx_set_sens(struct net_device *dev, return 0; mutex_lock(&priv->wx_mutex); - if (priv->rf_set_sens == NULL) { - err = -1; /* we have not this support for this radio */ - goto exit; - } - if (priv->rf_set_sens(dev, wrqu->sens.value) == 0) - priv->sens = wrqu->sens.value; - else - err = -EINVAL; - + err = -1; exit: mutex_unlock(&priv->wx_mutex); -- 2.34.1