linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: Bo Jiao <bo.jiao@mediatek.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Xing Song <xing.song@mediatek.com>,
	Sujuan Chen <sujuan.chen@mediatek.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	Evelyn Tsai <evelyn.tsai@mediatek.com>,
	linux-mediatek <linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH] mt76: mt7915: fix warning: variable 'flags' set but not used
Date: Thu, 23 Dec 2021 11:12:58 +0100	[thread overview]
Message-ID: <2b376af1-28e8-ea3e-ddb2-c300cc52a40f@nbd.name> (raw)
In-Reply-To: <20211223065843.94919-1-bo.jiao@mediatek.com>

On 2021-12-23 07:58, Bo Jiao wrote:
> From: Bo Jiao <Bo.Jiao@mediatek.com>
> 
> fix warning: variable 'flags' set but not used
> 
> Fixes: 0aa6b534b5e1 ("mt76: mt7915: update rx rate reporting for mt7916")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
> ---
>   drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 11 +----------
>   1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
> index ee4535a..f6d6321 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
> @@ -469,7 +469,7 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
>   			__le32 *rxv)
>   {
>   	u32 v0, v2;
> -	u8 flags, stbc, gi, bw, dcm, mode, nss;
> +	u8 stbc, gi, bw, dcm, mode, nss;
>   	int i, idx;
>   	bool cck = false;
>   
> @@ -505,20 +505,12 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
>   		status->encoding = RX_ENC_HT;
>   		if (i > 31)
>   			return -EINVAL;
> -
> -		flags = RATE_INFO_FLAGS_MCS;
> -		if (gi)
> -			flags |= RATE_INFO_FLAGS_SHORT_GI;
>   		break;
>   	case MT_PHY_TYPE_VHT:
>   		status->nss = nss;
>   		status->encoding = RX_ENC_VHT;
>   		if (i > 9)
>   			return -EINVAL;
> -
> -		flags = RATE_INFO_FLAGS_VHT_MCS;
> -		if (gi)
> -			flags |= RATE_INFO_FLAGS_SHORT_GI;
>   		break;
>   	case MT_PHY_TYPE_HE_MU:
>   	case MT_PHY_TYPE_HE_SU:
The short GI value should still be reported. I'm folding this change 
into the commit:

--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -503,12 +503,16 @@ mt7915_mac_fill_rx_rate(struct mt7915_dev *dev,
   	case MT_PHY_TYPE_HT_GF:
   	case MT_PHY_TYPE_HT:
   		status->encoding = RX_ENC_HT;
+		if (gi)
+			status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
   		if (i > 31)
   			return -EINVAL;
   		break;
   	case MT_PHY_TYPE_VHT:
   		status->nss = nss;
   		status->encoding = RX_ENC_VHT;
+		if (gi)
+			status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
   		if (i > 9)
   			return -EINVAL;
   		break;



_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

      reply	other threads:[~2021-12-23 10:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23  6:58 [PATCH] mt76: mt7915: fix warning: variable 'flags' set but not used Bo Jiao
2021-12-23 10:12 ` Felix Fietkau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b376af1-28e8-ea3e-ddb2-c300cc52a40f@nbd.name \
    --to=nbd@nbd.name \
    --cc=bo.jiao@mediatek.com \
    --cc=evelyn.tsai@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=ryder.lee@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    --cc=sujuan.chen@mediatek.com \
    --cc=xing.song@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).