Re: [PATCH v2 1/2] err.h: Add ERR_PTR_PCPU(), PTR_ERR_PCPU() and IS_ERR_PCPU() macros
From: Catalin Marinas
Date: Thu Aug 22 2024 - 04:36:30 EST
On Sun, Aug 18, 2024 at 11:01:51PM +0200, Uros Bizjak wrote:
> Add ERR_PTR_PCPU(), PTR_ERR_PCPU() and IS_ERR_PCPU() macros that
> operate on pointers in the percpu address space.
>
> These macros remove the need for (__force void *) function
> argument casts (to avoid sparse -Wcast-from-as warnings).
>
> The patch will also avoid future build errors due to pointer address
> space mismatch with enabled strict percpu address space checks.
>
> Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
> Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Acked-by: Catalin Marinas <catalin.marinas@xxxxxxx>