From: Ethan Tidmore <ethantidmore06@gmail.com>
To: Felix Fietkau <nbd@nbd.name>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Ryder Lee <ryder.lee@mediatek.com>,
Shayne Chen <shayne.chen@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Jeremy Yu <chengwei.yu@mediatek.com>,
Stella Liu <yu-ching.liu@mediatek.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
Ethan Tidmore <ethantidmore06@gmail.com>
Subject: [PATCH] wifi: mt76: mt7925: Remove useless condition
Date: Mon, 17 Aug 2026 20:54:40 -0500 [thread overview]
Message-ID: <20260818015440.875703-1-ethantidmore06@gmail.com> (raw)
The condition (master_pref > NAN_MAX_MASTER_PREFERENCE) will always be
false because the variable 'master_pref' is of type u8 and the macro
'NAN_MAX_MASTER_PREFERENCE' is equal to 255.
Fixes: a5487a6824068 ("wifi: mt76: mt7925: add NAN MCU helpers")
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
---
drivers/net/wireless/mediatek/mt76/mt7925/nan.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/nan.c b/drivers/net/wireless/mediatek/mt76/mt7925/nan.c
index d260e803d056..8d13a42b72a8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/nan.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/nan.c
@@ -255,9 +255,6 @@ mt7925_nan_mp_tlv(struct sk_buff *skb, u8 master_pref)
mp_tlv = (struct mt7925_nan_master_preference_tlv *)tlv;
- if (master_pref > NAN_MAX_MASTER_PREFERENCE)
- return 0;
-
mp_tlv->master_preference = master_pref;
return 0;
--
Thanks,
ET
https://github.com/sponsors/ethantidmore
reply other threads:[~2026-08-18 1:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260818015440.875703-1-ethantidmore06@gmail.com \
--to=ethantidmore06@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chengwei.yu@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=shayne.chen@mediatek.com \
--cc=yu-ching.liu@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