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

tools/firewire: Fix several incorrect format specifiers

Make a minor change to eliminate static checker warnings. Fix several
incorrect format specifiers that misused signed and unsigned versions.

Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20241113023137.291661-1-luoyifan@cmss.chinamobile.com
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

authored by

Luo Yifan and committed by
Takashi Sakamoto
4752e8cd b7688fcd

+4 -4
+1 -1
tools/firewire/decode-fcp.c
··· 160 160 name = info->name; 161 161 } 162 162 163 - printf("av/c %s, subunit_type=%s, subunit_id=%d, opcode=%s", 163 + printf("av/c %s, subunit_type=%s, subunit_id=%u, opcode=%s", 164 164 ctype_names[frame->ctype], subunit_type_names[frame->subunit_type], 165 165 frame->subunit_id, name); 166 166
+3 -3
tools/firewire/nosy-dump.c
··· 771 771 if (pp->phy_config.set_root) 772 772 printf(" set_root_id=%02x", pp->phy_config.root_id); 773 773 if (pp->phy_config.set_gap_count) 774 - printf(" set_gap_count=%d", pp->phy_config.gap_count); 774 + printf(" set_gap_count=%u", pp->phy_config.gap_count); 775 775 } 776 776 break; 777 777 ··· 781 781 782 782 case PHY_PACKET_SELF_ID: 783 783 if (pp->self_id.extended) { 784 - printf("extended self id: phy_id=%02x, seq=%d", 784 + printf("extended self id: phy_id=%02x, seq=%u", 785 785 pp->ext_self_id.phy_id, pp->ext_self_id.sequence); 786 786 } else { 787 787 static const char * const speed_names[] = { 788 788 "S100", "S200", "S400", "BETA" 789 789 }; 790 - printf("self id: phy_id=%02x, link %s, gap_count=%d, speed=%s%s%s", 790 + printf("self id: phy_id=%02x, link %s, gap_count=%u speed=%s%s%s", 791 791 pp->self_id.phy_id, 792 792 (pp->self_id.link_active ? "active" : "not active"), 793 793 pp->self_id.gap_count,