]> www.infradead.org Git - users/jedix/linux-maple.git/commit
err.h: add ERR_PTR_PCPU(), PTR_ERR_PCPU() and IS_ERR_PCPU() macros
authorUros Bizjak <ubizjak@gmail.com>
Sun, 18 Aug 2024 21:01:51 +0000 (23:01 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Sep 2024 04:15:38 +0000 (21:15 -0700)
commita759e37fb46708029c9c3c56c3b62e6f24d85cf5
treee147f6993f9c6569e7785d4c7ee7ded4cfccdef6
parent2f4db2861013fcfb4be11d0dc176271ae566241c
err.h: add ERR_PTR_PCPU(), PTR_ERR_PCPU() and IS_ERR_PCPU() macros

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.

Link: https://lkml.kernel.org/r/20240818210235.33481-1-ubizjak@gmail.com
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/err.h