netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] wireless: mediatek: mt7921: fix Wformat build warning
@ 2021-10-22 23:32 Randy Dunlap
  2021-10-23  7:14 ` Kalle Valo
  2021-10-23  7:29 ` [net] mt76: " Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-10-22 23:32 UTC (permalink / raw)
  To: netdev
  Cc: Randy Dunlap, Sean Wang, linux-wireless, Felix Fietkau,
	Lorenzo Bianconi, Ryder Lee, Kalle Valo

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>
---
 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));
 }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] wireless: mediatek: mt7921: fix Wformat build warning
  2021-10-22 23:32 [PATCH net] wireless: mediatek: mt7921: fix Wformat build warning Randy Dunlap
@ 2021-10-23  7:14 ` Kalle Valo
  2021-10-23  7:29 ` [net] mt76: " Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-10-23  7:14 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: netdev, Sean Wang, linux-wireless, Felix Fietkau,
	Lorenzo Bianconi, Ryder Lee

Randy Dunlap <rdunlap@infradead.org> writes:

> 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>

The subject prefix should be "mt76: mt7921:", I'll fix it during commit.

Felix, I'll take this directly to wireless-drivers-next. Please drop it
from your tree.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [net] mt76: mt7921: fix Wformat build warning
  2021-10-22 23:32 [PATCH net] wireless: mediatek: mt7921: fix Wformat build warning Randy Dunlap
  2021-10-23  7:14 ` Kalle Valo
@ 2021-10-23  7:29 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-10-23  7:29 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: netdev, Randy Dunlap, Sean Wang, linux-wireless, Felix Fietkau,
	Lorenzo Bianconi, Ryder Lee

Randy Dunlap <rdunlap@infradead.org> wrote:

> 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>

Patch applied to wireless-drivers-next.git, thanks.

a88cae727b3e mt76: mt7921: fix Wformat build warning

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211022233251.29987-1-rdunlap@infradead.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-23  7:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 23:32 [PATCH net] wireless: mediatek: mt7921: fix Wformat build warning Randy Dunlap
2021-10-23  7:14 ` Kalle Valo
2021-10-23  7:29 ` [net] mt76: " Kalle Valo

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).