From patchwork Wed Aug 19 07:23:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 247932 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp243453ils; Wed, 19 Aug 2020 00:29:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPsjVYpesFmCspwbFJTfwuFE4jJh8KA0Ay52UNvvtiTOyE1/wtC++/5/z17CO90Un/crLc X-Received: by 2002:a17:906:2356:: with SMTP id m22mr23414586eja.124.1597822143755; Wed, 19 Aug 2020 00:29:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597822143; cv=none; d=google.com; s=arc-20160816; b=pAUOmj67WK+uI2lb1J6gmxbl9uj9FsYTOMZKCbUC+wOsRmnNGOCSoUrp3ek2kUqiw5 fIQegGDfAbi8Dsp2IqQf6xdND/1igLnrcn0ntWOUTCz3TRJ8+gexiajWx+TwWTkaEWM/ 9C7TwkUbPmkhpuLh/qceBNKeMLZSi6T0gvZtE1cNd6KimIkGxfKtOSezgiL5IG1W8tnL jzBrG8pQLDOyi2TST99tm3uSzbN+dvO//siDHd1hEED6b92DzOEAsYMTGRQMx24Rxfun 8urQ7ZIro9MxUVm/rZuVhuqvYyRH2lF7mcm2QrCy9Jq+dJVU8Xf9RsLJGr5MdveqsJn/ psDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XsnY8YATOoOqBq7gQjoztKCpYLOIPMdc0eJUU1GlCFo=; b=T9o31SxI41xJT6q/03gCh5hRedjUEemKBy7WMPEDKqkHR9K9G3e+qennSxg6rwkgny CRGhZlZpsm4mhEM9Hf2pHsbkuk20Q1LJAl337IaD+PoFl1HnpY6CgS6uYkoQGccWlINt KtcXdsK23UK2bX9jnuR19ff7SsfNRX8a3+4XnOZDn14OWhY/V0UK6C6BKmw5gm8qekU0 1KIJKY/PnbRQMwvna3bXYZoVB3mbjHtIIY1HlyK5JcgPAB+2FkAAxTk5k2eYfeFh6YZI fDBtukZ7lYP+9kMpFyu80jn38jKTY4ew7CtLsYXIPNiUSjjOQtRGek23T8hqUuKj1kPy alUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E7p5gG+O; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g26si14611862edr.126.2020.08.19.00.29.03; Wed, 19 Aug 2020 00:29:03 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E7p5gG+O; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727930AbgHSH3C (ORCPT + 9 others); Wed, 19 Aug 2020 03:29:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727925AbgHSHZH (ORCPT ); Wed, 19 Aug 2020 03:25:07 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A4FCC061343 for ; Wed, 19 Aug 2020 00:24:26 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id l2so20443934wrc.7 for ; Wed, 19 Aug 2020 00:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XsnY8YATOoOqBq7gQjoztKCpYLOIPMdc0eJUU1GlCFo=; b=E7p5gG+OFcZGnyShYmD7vMGdcWoP4GkBI2rRZx9DVdOEiWJnrcDeLk7llK6cm+Hlik 6r5mmXWI78YYJP3DKrf/1iUtHHiJN/ULO7zAqzMSpE7MJQDbpYvzS1yZYrtZv6kycisH zQ8ejwzemTWd/BU9tENVMVfReSPZ1TL+dcnot52pmlpP2bYjnMoUTE/xS+XfzQhYzFe3 WzYRIJ+KJDiKG+P2nZhO5HJLMEWRLszQ4c47wFzpGKfpP3Ox1LrAnL4jqXbOtPeIKmsm ISIY150cNobgR3r71KxKmerPOkOXAFGhdaT79jpWsL++g6ONYOhjj1EWy/Tdh7td1jja nsTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XsnY8YATOoOqBq7gQjoztKCpYLOIPMdc0eJUU1GlCFo=; b=Yq6X+S+p5/sOMGl1h+qMiWxGi1UL+HTbmdndk1E2hir0ZF8ZqzHqlvWAy0mn+0kwCr XiBDX7PhCloFalYVCfIc/aye53jgVrfGVJNN8RHKwrljDASuRNvd1MO5QKbN3EJIaBUh scaC/kzobsnkiYrrvpkCZwXYwNT3OD2pB1l1/P5yIeCjhwxxmxHuE0nGM/Wy3HB6L/Mu C/1sqLoOTdiDHITI1wFEAxFg7aiFHQRipmyO53Ni1B8Smpk/H7+dq/KhIzEcJ0jgL7pi tVm9R2VvtOYGO55qvgPaYKeAenxFcCZUsCG9DGiBVAfzIrg0ZQPHPIjPwJ7vk2nvQSD/ mKNA== X-Gm-Message-State: AOAM533/pET4zhi/RynjFdD7UA3JLNmBf6MJlSnQ+oeTu3C9sht0Aevp SKnINKJFCPW6/5p7+49JiV5l+A== X-Received: by 2002:adf:eb89:: with SMTP id t9mr23275239wrn.65.1597821864972; Wed, 19 Aug 2020 00:24:24 -0700 (PDT) Received: from dell.default ([95.149.164.62]) by smtp.gmail.com with ESMTPSA id c145sm3795808wmd.7.2020.08.19.00.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 00:24:24 -0700 (PDT) From: Lee Jones To: kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Lee Jones , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu Subject: [PATCH 16/28] wireless: marvell: mwifiex: init: Move 'tos_to_tid_inv' to where it's used Date: Wed, 19 Aug 2020 08:23:50 +0100 Message-Id: <20200819072402.3085022-17-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200819072402.3085022-1-lee.jones@linaro.org> References: <20200819072402.3085022-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 'tos_to_tid_inv' is only used in 2 of 17 files it's current being included into. Fixes the following W=1 kernel build warning(s): In file included from drivers/net/wireless/marvell/mwifiex/main.c:23: In file included from drivers/net/wireless/marvell/mwifiex/cmdevt.c:26: In file included from drivers/net/wireless/marvell/mwifiex/util.c:25: In file included from drivers/net/wireless/marvell/mwifiex/txrx.c:25: In file included from drivers/net/wireless/marvell/mwifiex/11n.c:25: In file included from drivers/net/wireless/marvell/mwifiex/wmm.c:25: In file included from drivers/net/wireless/marvell/mwifiex/11n_aggr.c:25: In file included from drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c:25: In file included from drivers/net/wireless/marvell/mwifiex/join.c:25: In file included from drivers/net/wireless/marvell/mwifiex/sta_cmd.c:25: In file included from drivers/net/wireless/marvell/mwifiex/sta_ioctl.c:25: In file included from drivers/net/wireless/marvell/mwifiex/sta_event.c:25: In file included from drivers/net/wireless/marvell/mwifiex/uap_txrx.c:23: In file included from drivers/net/wireless/marvell/mwifiex/sdio.c:27: In file included from drivers/net/wireless/marvell/mwifiex/sta_tx.c:25: drivers/net/wireless/marvell/mwifiex/wmm.h:41:17: warning: ‘tos_to_tid_inv’ defined but not used [-Wunused-const-variable=] 41 | static const u8 tos_to_tid_inv[] = { NB: Snipped for brevity Cc: Amitkumar Karwar Cc: Ganapathi Bhat Cc: Xinming Hu Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones --- drivers/net/wireless/marvell/mwifiex/init.c | 16 ++++++++++++++++ drivers/net/wireless/marvell/mwifiex/tdls.c | 16 ++++++++++++++++ drivers/net/wireless/marvell/mwifiex/wmm.h | 15 --------------- 3 files changed, 32 insertions(+), 15 deletions(-) -- 2.25.1 diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c index 82d69bc3aaaf4..7ffc78b258317 100644 --- a/drivers/net/wireless/marvell/mwifiex/init.c +++ b/drivers/net/wireless/marvell/mwifiex/init.c @@ -25,6 +25,22 @@ #include "wmm.h" #include "11n.h" +/* + * This table inverses the tos_to_tid operation to get a priority + * which is in sequential order, and can be compared. + * Use this to compare the priority of two different TIDs. + */ +static const u8 tos_to_tid_inv[] = { + 0x02, /* from tos_to_tid[2] = 0 */ + 0x00, /* from tos_to_tid[0] = 1 */ + 0x01, /* from tos_to_tid[1] = 2 */ + 0x03, + 0x04, + 0x05, + 0x06, + 0x07 +}; + /* * This function adds a BSS priority table to the table list. * diff --git a/drivers/net/wireless/marvell/mwifiex/tdls.c b/drivers/net/wireless/marvell/mwifiex/tdls.c index 97bb87c3676bb..35c02b149820d 100644 --- a/drivers/net/wireless/marvell/mwifiex/tdls.c +++ b/drivers/net/wireless/marvell/mwifiex/tdls.c @@ -27,6 +27,22 @@ #define TDLS_CONFIRM_FIX_LEN 6 #define MWIFIEX_TDLS_WMM_INFO_SIZE 7 +/* + * This table inverses the tos_to_tid operation to get a priority + * which is in sequential order, and can be compared. + * Use this to compare the priority of two different TIDs. + */ +static const u8 tos_to_tid_inv[] = { + 0x02, /* from tos_to_tid[2] = 0 */ + 0x00, /* from tos_to_tid[0] = 1 */ + 0x01, /* from tos_to_tid[1] = 2 */ + 0x03, + 0x04, + 0x05, + 0x06, + 0x07 +}; + static void mwifiex_restore_tdls_packets(struct mwifiex_private *priv, const u8 *mac, u8 status) { diff --git a/drivers/net/wireless/marvell/mwifiex/wmm.h b/drivers/net/wireless/marvell/mwifiex/wmm.h index 04d7da95e3078..60bdbb82277a3 100644 --- a/drivers/net/wireless/marvell/mwifiex/wmm.h +++ b/drivers/net/wireless/marvell/mwifiex/wmm.h @@ -33,21 +33,6 @@ enum ieee_types_wmm_ecw_bitmasks { static const u16 mwifiex_1d_to_wmm_queue[8] = { 1, 0, 0, 1, 2, 2, 3, 3 }; -/* - * This table inverses the tos_to_tid operation to get a priority - * which is in sequential order, and can be compared. - * Use this to compare the priority of two different TIDs. - */ -static const u8 tos_to_tid_inv[] = { - 0x02, /* from tos_to_tid[2] = 0 */ - 0x00, /* from tos_to_tid[0] = 1 */ - 0x01, /* from tos_to_tid[1] = 2 */ - 0x03, - 0x04, - 0x05, - 0x06, - 0x07}; - /* * This function retrieves the TID of the given RA list. */