tools/perf/arch/loongarch/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
From: Haiyong Sun <sunhaiyong@loongson.cn>
arch/loongarch/util/header.c: In function ‘_get_field’:
arch/loongarch/util/header.c:31:15: warning: assignment discards ‘const’
qualifier from pointer target type
arch/loongarch/util/header.c:36:12: warning: assignment discards ‘const’
qualifier from pointer target type
Signed-off-by: Haiyong Sun <sunhaiyong@loongson.cn>
Signed-off-by: WANG Rui <r@hev.cc>
---
tools/perf/arch/loongarch/util/header.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/arch/loongarch/util/header.c b/tools/perf/arch/loongarch/util/header.c
index 0c6d82333..46f53a74f 100644
--- a/tools/perf/arch/loongarch/util/header.c
+++ b/tools/perf/arch/loongarch/util/header.c
@@ -26,7 +26,7 @@
static char *_get_field(const char *line)
{
- char *line2, *nl;
+ const char *line2, *nl;
line2 = strrchr(line, ' ');
if (!line2)
--
2.53.0
On Tue, Apr 14, 2026 at 4:04 PM WANG Rui <r@hev.cc> wrote:
>
> From: Haiyong Sun <sunhaiyong@loongson.cn>
>
> arch/loongarch/util/header.c: In function ‘_get_field’:
> arch/loongarch/util/header.c:31:15: warning: assignment discards ‘const’
> qualifier from pointer target type
> arch/loongarch/util/header.c:36:12: warning: assignment discards ‘const’
> qualifier from pointer target type
>
> Signed-off-by: Haiyong Sun <sunhaiyong@loongson.cn>
> Signed-off-by: WANG Rui <r@hev.cc>
Acked-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
> tools/perf/arch/loongarch/util/header.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/arch/loongarch/util/header.c b/tools/perf/arch/loongarch/util/header.c
> index 0c6d82333..46f53a74f 100644
> --- a/tools/perf/arch/loongarch/util/header.c
> +++ b/tools/perf/arch/loongarch/util/header.c
> @@ -26,7 +26,7 @@
>
> static char *_get_field(const char *line)
> {
> - char *line2, *nl;
> + const char *line2, *nl;
>
> line2 = strrchr(line, ' ');
> if (!line2)
> --
> 2.53.0
>
>
© 2016 - 2026 Red Hat, Inc.