wifi: rtw88: debug: explicitly cast to u8 for %02x format in rtw_debugfs_get_tx_pwr_tbl()
Ping-Ke Shih
maintainerPATCH 1/1 wifi: rtw88: debug: explicitly cast to u8 for %02x format in rtw_debugfs_get_tx_pwr_tbl()
Explicitly cast to u8 to avoid smatch (with -p=kernel) warning:
warn: argument 4 to %02x specifier has type 'schar'
Signed-off-by Ping-Ke Shih <[email protected]>
--- drivers/net/wireless/realtek/rtw88/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw88/debug.c +2 -2
@@ -739,8 +739,8 @@ static int rtw_debugfs_get_tx_pwr_tbl(struct seq_file *m, void *v)seq_printf (m,"%4c " , path +'A' );rtw_print_rate (m, rate); seq_printf(m, " %3u(0x%02x) %4u %4d (%4d %4d %4d) %4d\n", - hal->tx_pwr_tbl[path][rate], - hal->tx_pwr_tbl[path][rate], + (u8)hal->tx_pwr_tbl[path][rate], + (u8)hal->tx_pwr_tbl[path][rate], pwr_param.pwr_base, min3(pwr_param.pwr_offset, pwr_param.pwr_limit,
base-commit: 0bdc579dbfc251a6b6838ee9459b6771b948c617
Signature · 1 line
2.53.0
Quoted 6 lines · Ping-Ke Shih
Explicitly cast to u8 to avoid smatch (with -p=kernel) warning:
warn: argument 4 to %02x specifier has type 'schar'
Signed-off-by Ping-Ke Shih <[email protected]>---
Looks good to me,
Reviewed-by Luka Gejak <[email protected]>
Best regards,
Luka Gejak
Ping-Ke Shih
maintainerQuoted 6 lines · Ping-Ke Shih
Explicitly cast to u8 to avoid smatch (with -p=kernel) warning:
warn: argument 4 to %02x specifier has type 'schar'
Signed-off-by Ping-Ke Shih <[email protected]>Reviewed-by Luka Gejak <[email protected]>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
770ac3b1bfb1 wifi: rtw88: debug: explicitly cast to u8 for %02x format in rtw_debugfs_get_tx_pwr_tbl()