Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath6kl: fix size_t printf warnings

My new tracing code for ath6kl introduced these warnings on 64-bit:

trace.h:38:1: warning: format '%d' expects argument of type 'int',
but argument 4 has type 'size_t' [-Wformat]
trace.h:61:1: warning: format '%d' expects argument of type 'int',
but argument 4 has type 'size_t' [-Wformat]
trace.h:84:1: warning: format '%d' expects argument of type 'int',
but argument 6 has type 'size_t' [-Wformat]
trace.h:119:1: warning: format '%d' expects argument of type 'int',
but argument 7 has type 'size_t' [-Wformat]
trace.h:173:1: warning: format '%d' expects argument of type 'int',
but argument 3 has type 'size_t' [-Wformat]
trace.h:193:1: warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t' [-Wformat]
trace.h:221:1: warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t' [-Wformat]

Fix them by using %zd.

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Kalle Valo and committed by
John W. Linville
0d4e6717 856a850a

+7 -7
+7 -7
drivers/net/wireless/ath/ath6kl/trace.h
··· 53 53 ), 54 54 55 55 TP_printk( 56 - "id %d len %d", 56 + "id %d len %zd", 57 57 __entry->id, __entry->buf_len 58 58 ) 59 59 ); ··· 76 76 ), 77 77 78 78 TP_printk( 79 - "id %d len %d", 79 + "id %d len %zd", 80 80 __entry->id, __entry->buf_len 81 81 ) 82 82 ); ··· 108 108 ), 109 109 110 110 TP_printk( 111 - "%s addr 0x%x flags 0x%x len %d\n", 111 + "%s addr 0x%x flags 0x%x len %zd\n", 112 112 __entry->tx ? "tx" : "rx", 113 113 __entry->addr, 114 114 __entry->flags, ··· 161 161 ), 162 162 163 163 TP_printk( 164 - "%s addr 0x%x flags 0x%x entries %d total_len %d\n", 164 + "%s addr 0x%x flags 0x%x entries %d total_len %zd\n", 165 165 __entry->tx ? "tx" : "rx", 166 166 __entry->addr, 167 167 __entry->flags, ··· 186 186 ), 187 187 188 188 TP_printk( 189 - "irq len %d\n", __entry->buf_len 189 + "irq len %zd\n", __entry->buf_len 190 190 ) 191 191 ); 192 192 ··· 211 211 ), 212 212 213 213 TP_printk( 214 - "status %d endpoint %d len %d\n", 214 + "status %d endpoint %d len %zd\n", 215 215 __entry->status, 216 216 __entry->endpoint, 217 217 __entry->buf_len ··· 239 239 ), 240 240 241 241 TP_printk( 242 - "status %d endpoint %d len %d\n", 242 + "status %d endpoint %d len %zd\n", 243 243 __entry->status, 244 244 __entry->endpoint, 245 245 __entry->buf_len