Skip to content

Commit

Permalink
wireless: mediatek: mt7921: fix Wformat build warning
Browse files Browse the repository at this point in the history
ARRAY_SIZE() is of type size_t, so the format specfier should
be %zu instead of %lu.

Fixes this build warning:

../drivers/net/wireless/mediatek/mt76/mt7921/main.c: In function ‘mt7921_get_et_stats’:
../drivers/net/wireless/mediatek/mt76/mt7921/main.c:1024:26: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
   dev_err(dev->mt76.dev, "ei: %d  SSTATS_LEN: %lu",

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Sean Wang <sean.wang@mediatek.com>
Cc: linux-wireless@vger.kernel.org
Cc: Felix Fietkau <nbd@nbd.name>
Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
rddunlap authored and nbd168 committed Oct 23, 2021
1 parent fd25a55 commit 1d01257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mt7921/main.c
Expand Up @@ -1021,7 +1021,7 @@ void mt7921_get_et_stats(struct ieee80211_hw *hw, struct ieee80211_vif *vif,

ei += wi.worker_stat_count;
if (ei != ARRAY_SIZE(mt7921_gstrings_stats))
dev_err(dev->mt76.dev, "ei: %d SSTATS_LEN: %lu",
dev_err(dev->mt76.dev, "ei: %d SSTATS_LEN: %zu",
ei, ARRAY_SIZE(mt7921_gstrings_stats));
}

Expand Down

0 comments on commit 1d01257

Please sign in to comment.