public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/firewire: Fix several incorrect format specifiers
@ 2024-11-13  2:31 Luo Yifan
  2024-11-14  0:27 ` Takashi Sakamoto
  0 siblings, 1 reply; 2+ messages in thread
From: Luo Yifan @ 2024-11-13  2:31 UTC (permalink / raw)
  To: o-takashi; +Cc: linux1394-devel, linux-kernel, Luo Yifan

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>
---
 tools/firewire/decode-fcp.c | 2 +-
 tools/firewire/nosy-dump.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/firewire/decode-fcp.c b/tools/firewire/decode-fcp.c
index b67ebc884..f115a3be8 100644
--- a/tools/firewire/decode-fcp.c
+++ b/tools/firewire/decode-fcp.c
@@ -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);
 
diff --git a/tools/firewire/nosy-dump.c b/tools/firewire/nosy-dump.c
index 156e0356e..9a906de3a 100644
--- a/tools/firewire/nosy-dump.c
+++ b/tools/firewire/nosy-dump.c
@@ -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,
-- 
2.27.0




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tools/firewire: Fix several incorrect format specifiers
  2024-11-13  2:31 [PATCH] tools/firewire: Fix several incorrect format specifiers Luo Yifan
@ 2024-11-14  0:27 ` Takashi Sakamoto
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Sakamoto @ 2024-11-14  0:27 UTC (permalink / raw)
  To: Luo Yifan; +Cc: linux1394-devel, linux-kernel

On Wed, Nov 13, 2024 at 10:31:37AM +0800, Luo Yifan wrote:
> 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>
> ---
>  tools/firewire/decode-fcp.c | 2 +-
>  tools/firewire/nosy-dump.c  | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)

Applied to for-next branch.

Thanks


Takashi Sakamoto

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-14  0:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-13  2:31 [PATCH] tools/firewire: Fix several incorrect format specifiers Luo Yifan
2024-11-14  0:27 ` Takashi Sakamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox