From: Ben Zong-You Xie <ben717@andestech.com> To: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>, <namhyung@kernel.org>, <mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>, <irogers@google.com>, <adrian.hunter@intel.com>, <paul.walmsley@sifive.com>, <palmer@dabbelt.com>, <aou@eecs.berkeley.edu>, <linux-perf-users@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org> Cc: <dylan@andestech.com>, <tim609@andestech.com>, Ben Zong-You Xie <ben717@andestech.com> Subject: [PATCH 2/2] perf riscv: Fix the warning due to the incompatible type Date: Tue, 5 Mar 2024 20:05:01 +0800 [thread overview] Message-ID: <20240305120501.1785084-3-ben717@andestech.com> (raw) In-Reply-To: <20240305120501.1785084-1-ben717@andestech.com> 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 'unsigned long *'. Therefore, declare line_sz as size_t. Signed-off-by: Ben Zong-You Xie <ben717@andestech.com> --- 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/util/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 = NULL; char *cpuid = NULL; int read; - unsigned long line_sz; + size_t line_sz; FILE *cpuinfo; cpuinfo = fopen(CPUINFO, "r"); -- 2.34.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Ben Zong-You Xie <ben717@andestech.com> To: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>, <namhyung@kernel.org>, <mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>, <irogers@google.com>, <adrian.hunter@intel.com>, <paul.walmsley@sifive.com>, <palmer@dabbelt.com>, <aou@eecs.berkeley.edu>, <linux-perf-users@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org> Cc: <dylan@andestech.com>, <tim609@andestech.com>, Ben Zong-You Xie <ben717@andestech.com> Subject: [PATCH 2/2] perf riscv: Fix the warning due to the incompatible type Date: Tue, 5 Mar 2024 20:05:01 +0800 [thread overview] Message-ID: <20240305120501.1785084-3-ben717@andestech.com> (raw) In-Reply-To: <20240305120501.1785084-1-ben717@andestech.com> 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 'unsigned long *'. Therefore, declare line_sz as size_t. Signed-off-by: Ben Zong-You Xie <ben717@andestech.com> --- 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/util/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 = NULL; char *cpuid = NULL; int read; - unsigned long line_sz; + size_t line_sz; FILE *cpuinfo; cpuinfo = fopen(CPUINFO, "r"); -- 2.34.1
next prev parent reply other threads:[~2024-03-05 12:06 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-05 12:04 [PATCH 0/2] Fix the warnings in the 32-bit platform Ben Zong-You Xie 2024-03-05 12:04 ` Ben Zong-You Xie 2024-03-05 12:05 ` [PATCH 1/2] perf daemon: Fix the warning about time_t Ben Zong-You Xie 2024-03-05 12:05 ` Ben Zong-You Xie 2024-04-26 17:28 ` Palmer Dabbelt 2024-04-26 17:28 ` Palmer Dabbelt 2024-03-05 12:05 ` Ben Zong-You Xie [this message] 2024-03-05 12:05 ` [PATCH 2/2] perf riscv: Fix the warning due to the incompatible type Ben Zong-You Xie 2024-04-02 9:41 ` [PATCH 0/2] Fix the warnings in the 32-bit platform Alexandre Ghiti 2024-04-02 9:41 ` Alexandre Ghiti
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240305120501.1785084-3-ben717@andestech.com \ --to=ben717@andestech.com \ --cc=acme@kernel.org \ --cc=adrian.hunter@intel.com \ --cc=alexander.shishkin@linux.intel.com \ --cc=aou@eecs.berkeley.edu \ --cc=dylan@andestech.com \ --cc=irogers@google.com \ --cc=jolsa@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-perf-users@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=mark.rutland@arm.com \ --cc=mingo@redhat.com \ --cc=namhyung@kernel.org \ --cc=palmer@dabbelt.com \ --cc=paul.walmsley@sifive.com \ --cc=peterz@infradead.org \ --cc=tim609@andestech.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.