From nobody Sat Nov 23 12:28:01 2024 Received: from cmccmta1.chinamobile.com (cmccmta2.chinamobile.com [111.22.67.135]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADD347E792 for ; Wed, 13 Nov 2024 02:31:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=111.22.67.135 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731465114; cv=none; b=sCcETZ1rgVh17Evfjk6gtX/oBnG3JdWR+aC2vcQM/VZxwSYMlh7EZcDXwasSqQx1uOlN4fHFXeGr089HCT2KM32yHXYqyhcYEbDQb5A/4czhvXCZ4aCaTRqD8UtW3SY74oBylMQvsUp08+tZEM3nMGP508WnobiRAKsZvOHjndw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731465114; c=relaxed/simple; bh=C7welgwMwcAFk+lPPtsbbdh5NcKOKudjxv2oci2YsaY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=QHx2BYY2qxD8AexcwP2Ijg3GsJnuFn9lz7U8pPO6SOaoeA9lI92BVD2GpoT6v4P+KSjqqefx5gjxK/mVa1xUmGJ5SvlFILolRHthcbwDv2hyLQ/FwUBYyl5LS6A205rkb5TL+e78cscqnWwiJEqjV1jXPRVMe1Hm0W2u12K6dUg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com; spf=pass smtp.mailfrom=cmss.chinamobile.com; arc=none smtp.client-ip=111.22.67.135 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app03-12003 (RichMail) with SMTP id 2ee367340f8c3b8-e2bde; Wed, 13 Nov 2024 10:31:42 +0800 (CST) X-RM-TRANSID: 2ee367340f8c3b8-e2bde X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[223.108.79.103]) by rmsmtp-syy-appsvr05-12005 (RichMail) with SMTP id 2ee567340f8e1b9-742cf; Wed, 13 Nov 2024 10:31:42 +0800 (CST) X-RM-TRANSID: 2ee567340f8e1b9-742cf From: Luo Yifan To: o-takashi@sakamocchi.jp Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Luo Yifan Subject: [PATCH] tools/firewire: Fix several incorrect format specifiers Date: Wed, 13 Nov 2024 10:31:37 +0800 Message-Id: <20241113023137.291661-1-luoyifan@cmss.chinamobile.com> X-Mailer: git-send-email 2.27.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- 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 =3D info->name; } =20 - printf("av/c %s, subunit_type=3D%s, subunit_id=3D%d, opcode=3D%s", + printf("av/c %s, subunit_type=3D%s, subunit_id=3D%u, opcode=3D%s", ctype_names[frame->ctype], subunit_type_names[frame->subunit_type], frame->subunit_id, name); =20 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=3D%02x", pp->phy_config.root_id); if (pp->phy_config.set_gap_count) - printf(" set_gap_count=3D%d", pp->phy_config.gap_count); + printf(" set_gap_count=3D%u", pp->phy_config.gap_count); } break; =20 @@ -781,13 +781,13 @@ print_packet(uint32_t *data, size_t length) =20 case PHY_PACKET_SELF_ID: if (pp->self_id.extended) { - printf("extended self id: phy_id=3D%02x, seq=3D%d", + printf("extended self id: phy_id=3D%02x, seq=3D%u", pp->ext_self_id.phy_id, pp->ext_self_id.sequence); } else { static const char * const speed_names[] =3D { "S100", "S200", "S400", "BETA" }; - printf("self id: phy_id=3D%02x, link %s, gap_count=3D%d, speed=3D%s%s%= s", + printf("self id: phy_id=3D%02x, link %s, gap_count=3D%u speed=3D%s%s%s= ", pp->self_id.phy_id, (pp->self_id.link_active ? "active" : "not active"), pp->self_id.gap_count, --=20 2.27.0