]> Git Repo - linux.git/commitdiff
tools/firewire: Fix several incorrect format specifiers
authorLuo Yifan <[email protected]>
Wed, 13 Nov 2024 02:31:37 +0000 (10:31 +0800)
committerTakashi Sakamoto <[email protected]>
Thu, 14 Nov 2024 00:12:04 +0000 (09:12 +0900)
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>
tools/firewire/decode-fcp.c
tools/firewire/nosy-dump.c

index b67ebc88434d911418da95800b7a08d36076c6aa..f115a3be8d1ef93f1548beb21f0140c696b77aa9 100644 (file)
@@ -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);
 
index 156e0356e81476120fefa677c0aa05d95ffa836e..9a906de3a9efa55526e42027667b1287a675375d 100644 (file)
@@ -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;
 
@@ -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,
This page took 0.060659 seconds and 4 git commands to generate.