From nobody Sun Feb 8 04:26:10 2026 Received: from Atcsqr.andestech.com (60-248-80-70.hinet-ip.hinet.net [60.248.80.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C35B459B5E for ; Tue, 5 Mar 2024 12:20:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.248.80.70 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641225; cv=none; b=ndF5DLRsSx2vpiTg6f3vazwLwP4YHeGhiSs+YJkDQxkYxrYOjLwvqjhsqzdHWzO5+etWGGDAc0Hj1auo7kvyfq/w9opuWeyg041j/Gp9QB6I5FSjlkKM+b5GWtImuUBvERN68+hzw7Yee1vgZaanNY8FrKduEXSj5zG8a1jTEbM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641225; c=relaxed/simple; bh=gzqSxF3J4/X2VZKljyICmd3WC2eIxG/K3MMXzIEXafQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rjHT9YboLNLkD4hYoO09cKp9iED8byvUaT8ryRPkEb5FCC3MZz1sWoKV/OA1avArpC/zFClt+UHHZxR1ORSgBr6thsEbJ92YP3TiiF/UiAg/hzY5mXT/xgrm0SS0LWAcs1a54/Z51pbSnBlUFyGER2HZACnB0ukIyndqO6LuGQM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=andestech.com; spf=pass smtp.mailfrom=andestech.com; arc=none smtp.client-ip=60.248.80.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=andestech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=andestech.com Received: from Atcsqr.andestech.com (localhost [127.0.0.2] (may be forged)) by Atcsqr.andestech.com with ESMTP id 425C5t73023911 for ; Tue, 5 Mar 2024 20:05:55 +0800 (+08) (envelope-from ben717@andestech.com) Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by Atcsqr.andestech.com with ESMTP id 425C5fPc023278; Tue, 5 Mar 2024 20:05:41 +0800 (+08) (envelope-from ben717@andestech.com) Received: from atctrx.andestech.com (10.0.15.173) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Tue, 5 Mar 2024 20:05:37 +0800 From: Ben Zong-You Xie To: , , , , , , , , , , , , , , CC: , , Ben Zong-You Xie Subject: [PATCH 1/2] perf daemon: Fix the warning about time_t Date: Tue, 5 Mar 2024 20:05:00 +0800 Message-ID: <20240305120501.1785084-2-ben717@andestech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305120501.1785084-1-ben717@andestech.com> References: <20240305120501.1785084-1-ben717@andestech.com> 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 X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL: Atcsqr.andestech.com 425C5t73023911 Content-Type: text/plain; charset="utf-8" In the 32-bit platform, the size of time_t is still 64 bits. Thus, use=20 PRIu64 to resolve the format problem. Signed-off-by: Ben Zong-You Xie Reviewed-by: Alexandre Ghiti --- tools/perf/builtin-daemon.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c index 83954af36753..0b6ffd51c475 100644 --- a/tools/perf/builtin-daemon.c +++ b/tools/perf/builtin-daemon.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "builtin.h" #include "perf.h" #include "debug.h" @@ -688,7 +689,7 @@ static int cmd_session_list(struct daemon *daemon, unio= n cmd *cmd, FILE *out) /* lock */ csv_sep, daemon->base, "lock"); =20 - fprintf(out, "%c%lu", + fprintf(out, "%c%" PRIu64 "", /* session up time */ csv_sep, (curr - daemon->start) / 60); =20 @@ -700,7 +701,7 @@ static int cmd_session_list(struct daemon *daemon, unio= n cmd *cmd, FILE *out) daemon->base, SESSION_OUTPUT); fprintf(out, " lock: %s/lock\n", daemon->base); - fprintf(out, " up: %lu minutes\n", + fprintf(out, " up: %" PRIu64 " minutes\n", (curr - daemon->start) / 60); } } @@ -727,7 +728,7 @@ static int cmd_session_list(struct daemon *daemon, unio= n cmd *cmd, FILE *out) /* session ack */ csv_sep, session->base, SESSION_ACK); =20 - fprintf(out, "%c%lu", + fprintf(out, "%c%" PRIu64 "", /* session up time */ csv_sep, (curr - session->start) / 60); =20 @@ -745,7 +746,7 @@ static int cmd_session_list(struct daemon *daemon, unio= n cmd *cmd, FILE *out) session->base, SESSION_CONTROL); fprintf(out, " ack: %s/%s\n", session->base, SESSION_ACK); - fprintf(out, " up: %lu minutes\n", + fprintf(out, " up: %" PRIu64 " minutes\n", (curr - session->start) / 60); } } --=20 2.34.1 From nobody Sun Feb 8 04:26:10 2026 Received: from Atcsqr.andestech.com (60-248-80-70.hinet-ip.hinet.net [60.248.80.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC48559B5E for ; Tue, 5 Mar 2024 12:20:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.248.80.70 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641229; cv=none; b=XFDBCSyh2tE7UsKw98SoV7nW1dxLQSpf11WQfaA6GL7MlJ5tYWuqI6XVaBEqoPP1i7/TXwGMJrasxMzrBjG3giqCUNw0bcrGNvRskgQsxi4Gme/gqcbYM9F0KU126RAfs0UoODuZNQ+HyoODbaeH0ygvuzBh76pDbW4znB2+O+0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709641229; c=relaxed/simple; bh=Z4ag4dmgkwg6QKinQ/3ZUdEqVOO6seGs6xNzDBwT5gs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eaVyAyHREtHdREt8zM7qMVYQn1t+hrVkSbNS0inAW0O4WvT45hAemLU5IPJXSwMf/N0f+gL+KUDGB1g7wPUAAXYQaQpIbf3cGxAqwAhNVIjZbnbj1ghzUFmvKVsA4BrdpUzNKMUXK7bQO6nhdIKwv+zHrpq8/jtzwGg2uPgyzO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=andestech.com; spf=pass smtp.mailfrom=andestech.com; arc=none smtp.client-ip=60.248.80.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=andestech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=andestech.com Received: from Atcsqr.andestech.com (localhost [127.0.0.2] (may be forged)) by Atcsqr.andestech.com with ESMTP id 425C5uoP023912 for ; Tue, 5 Mar 2024 20:05:56 +0800 (+08) (envelope-from ben717@andestech.com) Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by Atcsqr.andestech.com with ESMTP id 425C5kAv023873; Tue, 5 Mar 2024 20:05:46 +0800 (+08) (envelope-from ben717@andestech.com) Received: from atctrx.andestech.com (10.0.15.173) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Tue, 5 Mar 2024 20:05:43 +0800 From: Ben Zong-You Xie To: , , , , , , , , , , , , , , CC: , , Ben Zong-You Xie Subject: [PATCH 2/2] perf riscv: Fix the warning due to the incompatible type Date: Tue, 5 Mar 2024 20:05:01 +0800 Message-ID: <20240305120501.1785084-3-ben717@andestech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305120501.1785084-1-ben717@andestech.com> References: <20240305120501.1785084-1-ben717@andestech.com> 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 X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL: Atcsqr.andestech.com 425C5uoP023912 Content-Type: text/plain; charset="utf-8" In the 32-bit platform, the second argument of getline is expectd to be 'size_t *'(aka 'unsigned int *'), but line_sz is of type=20 'unsigned long *'. Therefore, declare line_sz as size_t. Signed-off-by: Ben Zong-You Xie Reviewed-by: Alexandre Ghiti --- tools/perf/arch/riscv/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/arch/riscv/util/header.c b/tools/perf/arch/riscv/ut= il/header.c index 4a41856938a8..1b29030021ee 100644 --- a/tools/perf/arch/riscv/util/header.c +++ b/tools/perf/arch/riscv/util/header.c @@ -41,7 +41,7 @@ static char *_get_cpuid(void) char *mimpid =3D NULL; char *cpuid =3D NULL; int read; - unsigned long line_sz; + size_t line_sz; FILE *cpuinfo; =20 cpuinfo =3D fopen(CPUINFO, "r"); --=20 2.34.1