Commit 6355592e authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Kalle Valo

zd1211rw: zd_usb: Use "%zu" to format size_t

On 32-bit:

    drivers/net/wireless/zydas/zd1211rw/zd_usb.c: In function ‘check_read_regs’:
    drivers/net/wireless/zydas/zd1211rw/zd_def.h:18:25: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
      dev_printk(level, dev, "%s() " fmt, __func__, ##args)
			     ^~~~~~~
    drivers/net/wireless/zydas/zd1211rw/zd_def.h:22:4: note: in expansion of macro ‘dev_printk_f’
	dev_printk_f(KERN_DEBUG, dev, fmt, ## args)
	^~~~~~~~~~~~
    drivers/net/wireless/zydas/zd1211rw/zd_usb.c:1635:3: note: in expansion of macro ‘dev_dbg_f’
       dev_dbg_f(zd_usb_dev(usb),
       ^~~~~~~~~
    drivers/net/wireless/zydas/zd1211rw/zd_usb.c:1636:51: note: format string is defined here
	 "error: actual length %d less than expected %ld\n",
						     ~~^
						     %d

Fixes: 84b0b663 ("zd1211rw: zd_usb: Use struct_size() helper")
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 0e41edcd
......@@ -1633,7 +1633,7 @@ static bool check_read_regs(struct zd_usb *usb, struct usb_req_read_regs *req,
*/
if (rr->length < struct_size(regs, regs, count)) {
dev_dbg_f(zd_usb_dev(usb),
"error: actual length %d less than expected %ld\n",
"error: actual length %d less than expected %zu\n",
rr->length, struct_size(regs, regs, count));
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment