From 1d01257662a6874e78b65c5e721ee1731ab006b3 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 22 Oct 2021 16:32:51 -0700 Subject: [PATCH] wireless: mediatek: mt7921: fix Wformat build warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Sean Wang Cc: linux-wireless@vger.kernel.org Cc: Felix Fietkau Cc: Lorenzo Bianconi Cc: Ryder Lee Cc: Kalle Valo Signed-off-by: Felix Fietkau --- mt7921/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mt7921/main.c b/mt7921/main.c index 35a490c0..633c6d2a 100644 --- a/mt7921/main.c +++ b/mt7921/main.c @@ -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)); }