]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf/hw_breakpoint: use ERR_PTR_PCPU(), IS_ERR_PCPU() and PTR_ERR_PCPU() macros
authorUros Bizjak <ubizjak@gmail.com>
Tue, 24 Sep 2024 09:07:13 +0000 (11:07 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 6 Nov 2024 01:12:32 +0000 (17:12 -0800)
commitad8f63f935b6785c87681d35b9408f5ecd5db967
treef8738c794d8fc7ea6df9a843bcbb325b577bcd96
parent1bb5d6609767b631526a95446198e5f436159bea
perf/hw_breakpoint: use ERR_PTR_PCPU(), IS_ERR_PCPU() and PTR_ERR_PCPU() macros

Use ERR_PTR_PCPU() when returning error pointer in the percpu address
space.  Use IS_ERR_PCPU() and PTR_ERR_PCPU() when returning the error
pointer from the percpu address space.  These macros add intermediate cast
to unsigned long when switching named address spaces.

The patch will avoid future build errors due to pointer address space
mismatch with enabled strict percpu address space checks.

Link: https://lkml.kernel.org/r/20240924090813.1353586-1-ubizjak@gmail.com
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: "Liang, Kan" <kan.liang@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/events/hw_breakpoint.c
samples/hw_breakpoint/data_breakpoint.c