[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211022233251.29987-1-rdunlap@infradead.org>
Date: Fri, 22 Oct 2021 16:32:51 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: netdev@...r.kernel.org
Cc: Randy Dunlap <rdunlap@...radead.org>,
Sean Wang <sean.wang@...iatek.com>,
linux-wireless@...r.kernel.org, Felix Fietkau <nbd@....name>,
Lorenzo Bianconi <lorenzo.bianconi83@...il.com>,
Ryder Lee <ryder.lee@...iatek.com>,
Kalle Valo <kvalo@...eaurora.org>
Subject: [PATCH net] wireless: mediatek: mt7921: fix Wformat build warning
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@...radead.org>
Cc: Sean Wang <sean.wang@...iatek.com>
Cc: linux-wireless@...r.kernel.org
Cc: Felix Fietkau <nbd@....name>
Cc: Lorenzo Bianconi <lorenzo.bianconi83@...il.com>
Cc: Ryder Lee <ryder.lee@...iatek.com>
Cc: Kalle Valo <kvalo@...eaurora.org>
---
drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20211022.orig/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ linux-next-20211022/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -1021,7 +1021,7 @@ void mt7921_get_et_stats(struct ieee8021
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));
}
Powered by blists - more mailing lists