Skip to content

Commit

Permalink
tools/firewire: Fix several incorrect format specifiers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luo Yifan authored and Takashi Sakamoto committed Nov 14, 2024
1 parent b7688fc commit 4752e8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/firewire/decode-fcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ decode_avc(struct link_transaction *t)
name = info->name;
}

printf("av/c %s, subunit_type=%s, subunit_id=%d, opcode=%s",
printf("av/c %s, subunit_type=%s, subunit_id=%u, opcode=%s",
ctype_names[frame->ctype], subunit_type_names[frame->subunit_type],
frame->subunit_id, name);

Expand Down
6 changes: 3 additions & 3 deletions tools/firewire/nosy-dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ print_packet(uint32_t *data, size_t length)
if (pp->phy_config.set_root)
printf(" set_root_id=%02x", pp->phy_config.root_id);
if (pp->phy_config.set_gap_count)
printf(" set_gap_count=%d", pp->phy_config.gap_count);
printf(" set_gap_count=%u", pp->phy_config.gap_count);
}
break;

Expand All @@ -781,13 +781,13 @@ print_packet(uint32_t *data, size_t length)

case PHY_PACKET_SELF_ID:
if (pp->self_id.extended) {
printf("extended self id: phy_id=%02x, seq=%d",
printf("extended self id: phy_id=%02x, seq=%u",
pp->ext_self_id.phy_id, pp->ext_self_id.sequence);
} else {
static const char * const speed_names[] = {
"S100", "S200", "S400", "BETA"
};
printf("self id: phy_id=%02x, link %s, gap_count=%d, speed=%s%s%s",
printf("self id: phy_id=%02x, link %s, gap_count=%u speed=%s%s%s",
pp->self_id.phy_id,
(pp->self_id.link_active ? "active" : "not active"),
pp->self_id.gap_count,
Expand Down

0 comments on commit 4752e8c

Please sign in to comment.