Message ID | c90c54f7b0e122914d5c02d6849447897a268f16.1674596722.git.philipp.g.hortmann@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2395100wrn; Tue, 24 Jan 2023 14:08:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXuYqARkXVMGk62FYMNsdpe9SQY1mFwvB5/e8W0DoMCZq30ur99vCJOp+MK/uVj3Fj69xrYB X-Received: by 2002:a17:906:6a27:b0:872:8c97:db27 with SMTP id qw39-20020a1709066a2700b008728c97db27mr38244539ejc.69.1674598083689; Tue, 24 Jan 2023 14:08:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674598083; cv=none; d=google.com; s=arc-20160816; b=bhoU/ZsgFVfiW+T18kTqxzugFgfE+ikYhn8m+oD2w6/K8OEr9jayoSULxaWzip5mCk xRT0Zu9qLywo0hiAV7fpAnYR1LMBU9ubwPkNk012YZcPFilsAnXBHslqB+ElyjbonJ9F 8N+KT+cy9Pcht98kAYgcyvP1RCy+BSyjuopUoKTEOc6vJNYGHm0oPA5qmc9YybPQqswi zgtl6AKPXPKrLTDJeANuO1wCr78qRF6cTwPtcPWZgkzZY+dthZYxxjJ4U6yTHVuqLU+e OI7AyCABzTjMuz7D5epaxo1JZXZSJv53iMZSt/UfHfn1ypi5jxgMEmx24ry02KBINF8f jbYg== 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=X2hw80KcuVAFiY4CDXg3tE7695ii5d+NENvOP8i9jB0=; b=aQzLLFPyda22jcldmKTMqcKRsAw360aGzud2HywiOtTRBgKXWulwLp6b1MDFjREh7L cc3d78gF6BibzEQ8Dtvzf1I3ErPRgspsGnhgZSdtE/lNulV+2lioROv6ZrpNn4EYtsDR 9dPhm8kusyzmEp1xbcvngj2h+KGD52IKb+dbcgbCkyPXgQd8o/XAV+1V91QaoioNe+ur +56tHQHlvf9vw32ljz8LoOpz2ZryeEavW9YtLeQ+DMcRRq5Afk1KfW1oFfwSWWcctqzI zVq50VU8um38ijAj8D7wABXmyMpa8xDAfPhK10PknhcfwLMpthf19VTPW98xsurHzp4v TBfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=naB3RXah; 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 19-20020a170906015300b00877a7ce0ec4si4522715ejh.252.2023.01.24.14.07.40; Tue, 24 Jan 2023 14:08:03 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=naB3RXah; 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 S235043AbjAXWEA (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Tue, 24 Jan 2023 17:04:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235093AbjAXWD7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Jan 2023 17:03:59 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFFF7521C8 for <linux-kernel@vger.kernel.org>; Tue, 24 Jan 2023 14:03:43 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id f19-20020a1c6a13000000b003db0ef4dedcso25741wmc.4 for <linux-kernel@vger.kernel.org>; Tue, 24 Jan 2023 14:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=X2hw80KcuVAFiY4CDXg3tE7695ii5d+NENvOP8i9jB0=; b=naB3RXah16zS9TYfv3SuY5nU7oB2KZyejVbO9DWBDbuMl2nZHaPx25OzJhY9mvzUi1 Yl1usIiQGf1EDfvF042o7yQ068rHWw9U07gIZfkIgAmexVHQvzygQXsLhMcRf86NOApJ XHPGNaihw4JbYMLuYkaiRHxC4F4kEfAk46MiiLGZ1FAJdBDnfTs0y92oJz9I1DBz5ntT EOl1mEZcEu4VqGid3XOgtIfnJjlfpQYTdiZQCoA9gIdIEkbEZJRb/xO5Yxwk6Xb25aTT 6Ws9E7sR4y8TzGUGJIYyAAQ6d5BimVP6B1pPD4k0TRjP7GVkOaB9YO9a6moPYRpkE+Nh KGvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=X2hw80KcuVAFiY4CDXg3tE7695ii5d+NENvOP8i9jB0=; b=xzg6SgGZObHFgH5HT5aBe+x2Qmwi6uQANbw+Z/u1vSF4pjXBLwreW8SynWOMk6xgg0 /lbAoh/b+D+Cn6tY2buRKU3sKCvaLF5Dpg9zkijMaZLn/6S7DT/JDU7/KAh0BxO2o/TF IjkdY/ot8o5Y27EcOhsCbbpHYAbmXjo3C9VDodTAkDKudBXw/l1pc/0sL8cP5l6Nvlh8 k5Wxlo4nECiIIymOJalamkkjeGDNJ5qd93++gbm/yIhMW+4KlG8w5joM4pjahctXPJI0 pQ/fxpTt4Pzvsm2z18IpXEESKwdNKV73xDy0AfZ51bX99bl9J91iW52MJd2OkwDpXsN4 UUIQ== X-Gm-Message-State: AFqh2kobQvOmF2Z4mQzKCgc5P23+PN7UozWisDQ/8jZ987C3Au1v6tJy RXDVvhUIBCf1CjGwRrX83FE= X-Received: by 2002:a05:600c:3b29:b0:3da:f7a9:50ca with SMTP id m41-20020a05600c3b2900b003daf7a950camr7698187wms.0.1674597822371; Tue, 24 Jan 2023 14:03:42 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p57935ca5.dip0.t-ipconnect.de. [87.147.92.165]) by smtp.gmail.com with ESMTPSA id f9-20020a05600c4e8900b003d990372dd5sm37792wmq.20.2023.01.24.14.03.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 14:03:41 -0800 (PST) Date: Tue, 24 Jan 2023 23:03:40 +0100 From: Philipp Hortmann <philipp.g.hortmann@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 04/11] staging: rtl8192e: Remove unused variables numpacket.. and received_pre.. Message-ID: <c90c54f7b0e122914d5c02d6849447897a268f16.1674596722.git.philipp.g.hortmann@gmail.com> References: <cover.1674596722.git.philipp.g.hortmann@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <cover.1674596722.git.philipp.g.hortmann@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755943360514516637?= X-GMAIL-MSGID: =?utf-8?q?1755943360514516637?= |
Series |
staging: rtl8192e: Remove unused variables from struct rt_stats
|
|
Commit Message
Philipp Hortmann
Jan. 24, 2023, 10:03 p.m. UTC
numpacket_toself, numpacket_matchbssid and received_preamble_GI are
initialized and increased but never read. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 5 -----
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
2 files changed, 8 deletions(-)
Comments
Hi Philipp,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Hortmann/staging-rtl8192e-Remove-unused-variables-rxrdu-and-rxok/20230125-060703
patch link: https://lore.kernel.org/r/c90c54f7b0e122914d5c02d6849447897a268f16.1674596722.git.philipp.g.hortmann%40gmail.com
patch subject: [PATCH 04/11] staging: rtl8192e: Remove unused variables numpacket.. and received_pre..
config: ia64-allyesconfig (https://download.01.org/0day-ci/archive/20230125/202301250710.9Mt0vvCc-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/6e636a3b2ef9d90cd6fe7dba2a4acb627f13ba3e
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Philipp-Hortmann/staging-rtl8192e-Remove-unused-variables-rxrdu-and-rxok/20230125-060703
git checkout 6e636a3b2ef9d90cd6fe7dba2a4acb627f13ba3e
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/staging/rtl8192e/rtl8192e/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c: In function '_rtl92e_update_received_rate_histogram_stats':
>> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1702:13: warning: variable 'preamble_guardinterval' set but not used [-Wunused-but-set-variable]
1702 | u32 preamble_guardinterval;
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/preamble_guardinterval +1702 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1694
77055c56a71bcc drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-09-20 1695 static void _rtl92e_update_received_rate_histogram_stats(
49aab5fd9df153 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1696 struct net_device *dev,
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1697 struct rtllib_rx_stats *pstats)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1698 {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1699 struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1700 u32 rcvType = 1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1701 u32 rateIndex;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 @1702 u32 preamble_guardinterval;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1703
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1704 if (pstats->bCRC)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1705 rcvType = 2;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1706 else if (pstats->bICV)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1707 rcvType = 3;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1708
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1709 if (pstats->bShortPreamble)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1710 preamble_guardinterval = 1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1711 else
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1712 preamble_guardinterval = 0;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1713
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1714 switch (pstats->rate) {
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1715 case MGN_1M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1716 rateIndex = 0;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1717 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1718 case MGN_2M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1719 rateIndex = 1;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1720 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1721 case MGN_5_5M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1722 rateIndex = 2;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1723 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1724 case MGN_11M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1725 rateIndex = 3;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1726 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1727 case MGN_6M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1728 rateIndex = 4;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1729 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1730 case MGN_9M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1731 rateIndex = 5;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1732 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1733 case MGN_12M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1734 rateIndex = 6;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1735 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1736 case MGN_18M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1737 rateIndex = 7;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1738 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1739 case MGN_24M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1740 rateIndex = 8;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1741 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1742 case MGN_36M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1743 rateIndex = 9;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1744 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1745 case MGN_48M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1746 rateIndex = 10;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1747 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1748 case MGN_54M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1749 rateIndex = 11;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1750 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1751 case MGN_MCS0:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1752 rateIndex = 12;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1753 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1754 case MGN_MCS1:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1755 rateIndex = 13;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1756 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1757 case MGN_MCS2:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1758 rateIndex = 14;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1759 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1760 case MGN_MCS3:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1761 rateIndex = 15;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1762 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1763 case MGN_MCS4:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1764 rateIndex = 16;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1765 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1766 case MGN_MCS5:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1767 rateIndex = 17;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1768 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1769 case MGN_MCS6:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1770 rateIndex = 18;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1771 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1772 case MGN_MCS7:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1773 rateIndex = 19;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1774 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1775 case MGN_MCS8:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1776 rateIndex = 20;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1777 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1778 case MGN_MCS9:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1779 rateIndex = 21;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1780 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1781 case MGN_MCS10:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1782 rateIndex = 22;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1783 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1784 case MGN_MCS11:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1785 rateIndex = 23;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1786 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1787 case MGN_MCS12:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1788 rateIndex = 24;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1789 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1790 case MGN_MCS13:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1791 rateIndex = 25;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1792 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1793 case MGN_MCS14:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1794 rateIndex = 26;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1795 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1796 case MGN_MCS15:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1797 rateIndex = 27;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1798 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1799 default:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1800 rateIndex = 28;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1801 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1802 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1803 priv->stats.received_rate_histogram[0][rateIndex]++;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1804 priv->stats.received_rate_histogram[rcvType][rateIndex]++;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1805 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1806
Hi Philipp,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Hortmann/staging-rtl8192e-Remove-unused-variables-rxrdu-and-rxok/20230125-060703
patch link: https://lore.kernel.org/r/c90c54f7b0e122914d5c02d6849447897a268f16.1674596722.git.philipp.g.hortmann%40gmail.com
patch subject: [PATCH 04/11] staging: rtl8192e: Remove unused variables numpacket.. and received_pre..
config: i386-randconfig-a011-20230123 (https://download.01.org/0day-ci/archive/20230125/202301251527.mB6KfScg-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/6e636a3b2ef9d90cd6fe7dba2a4acb627f13ba3e
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Philipp-Hortmann/staging-rtl8192e-Remove-unused-variables-rxrdu-and-rxok/20230125-060703
git checkout 6e636a3b2ef9d90cd6fe7dba2a4acb627f13ba3e
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/staging/rtl8192e/rtl8192e/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1702:6: warning: variable 'preamble_guardinterval' set but not used [-Wunused-but-set-variable]
u32 preamble_guardinterval;
^
1 warning generated.
vim +/preamble_guardinterval +1702 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1694
77055c56a71bcc drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-09-20 1695 static void _rtl92e_update_received_rate_histogram_stats(
49aab5fd9df153 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1696 struct net_device *dev,
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1697 struct rtllib_rx_stats *pstats)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1698 {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1699 struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1700 u32 rcvType = 1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1701 u32 rateIndex;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 @1702 u32 preamble_guardinterval;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1703
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1704 if (pstats->bCRC)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1705 rcvType = 2;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1706 else if (pstats->bICV)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1707 rcvType = 3;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1708
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1709 if (pstats->bShortPreamble)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1710 preamble_guardinterval = 1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1711 else
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1712 preamble_guardinterval = 0;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1713
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1714 switch (pstats->rate) {
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1715 case MGN_1M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1716 rateIndex = 0;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1717 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1718 case MGN_2M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1719 rateIndex = 1;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1720 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1721 case MGN_5_5M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1722 rateIndex = 2;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1723 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1724 case MGN_11M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1725 rateIndex = 3;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1726 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1727 case MGN_6M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1728 rateIndex = 4;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1729 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1730 case MGN_9M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1731 rateIndex = 5;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1732 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1733 case MGN_12M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1734 rateIndex = 6;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1735 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1736 case MGN_18M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1737 rateIndex = 7;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1738 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1739 case MGN_24M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1740 rateIndex = 8;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1741 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1742 case MGN_36M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1743 rateIndex = 9;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1744 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1745 case MGN_48M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1746 rateIndex = 10;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1747 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1748 case MGN_54M:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1749 rateIndex = 11;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1750 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1751 case MGN_MCS0:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1752 rateIndex = 12;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1753 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1754 case MGN_MCS1:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1755 rateIndex = 13;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1756 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1757 case MGN_MCS2:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1758 rateIndex = 14;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1759 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1760 case MGN_MCS3:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1761 rateIndex = 15;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1762 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1763 case MGN_MCS4:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1764 rateIndex = 16;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1765 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1766 case MGN_MCS5:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1767 rateIndex = 17;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1768 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1769 case MGN_MCS6:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1770 rateIndex = 18;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1771 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1772 case MGN_MCS7:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1773 rateIndex = 19;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1774 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1775 case MGN_MCS8:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1776 rateIndex = 20;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1777 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1778 case MGN_MCS9:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1779 rateIndex = 21;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1780 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1781 case MGN_MCS10:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1782 rateIndex = 22;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1783 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1784 case MGN_MCS11:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1785 rateIndex = 23;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1786 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1787 case MGN_MCS12:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1788 rateIndex = 24;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1789 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1790 case MGN_MCS13:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1791 rateIndex = 25;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1792 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1793 case MGN_MCS14:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1794 rateIndex = 26;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1795 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1796 case MGN_MCS15:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1797 rateIndex = 27;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1798 break;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1799 default:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1800 rateIndex = 28;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1801 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1802 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1803 priv->stats.received_rate_histogram[0][rateIndex]++;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1804 priv->stats.received_rate_histogram[rcvType][rateIndex]++;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1805 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1806
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index e9273dfb638e..c5ebc33dc7f1 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -1685,10 +1685,6 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev, ether_addr_equal(praddr, priv->rtllib->dev->dev_addr); if (WLAN_FC_GET_FRAMETYPE(fc) == RTLLIB_STYPE_BEACON) bPacketBeacon = true; - if (bpacket_match_bssid) - priv->stats.numpacket_matchbssid++; - if (bpacket_toself) - priv->stats.numpacket_toself++; _rtl92e_process_phyinfo(priv, tmp_buf, &previous_stats, pstats); _rtl92e_query_rxphystatus(priv, pstats, pdesc, pdrvinfo, &previous_stats, bpacket_match_bssid, @@ -1804,7 +1800,6 @@ static void _rtl92e_update_received_rate_histogram_stats( rateIndex = 28; break; } - priv->stats.received_preamble_GI[preamble_guardinterval][rateIndex]++; priv->stats.received_rate_histogram[0][rateIndex]++; priv->stats.received_rate_histogram[rcvType][rateIndex]++; } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index 167c4aeea44e..70767238e721 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -184,9 +184,6 @@ enum reset_type { struct rt_stats { unsigned long received_rate_histogram[4][32]; - unsigned long received_preamble_GI[2][32]; - unsigned long numpacket_matchbssid; - unsigned long numpacket_toself; unsigned long num_process_phyinfo; unsigned long numqry_phystatus; unsigned long numqry_phystatusCCK;