Linus Walleij 2d1494fb31 s390/mm: make virt_to_pfn() a static inline
Making virt_to_pfn() a static inline taking a strongly typed
(const void *) makes the contract of a passing a pointer of that
type to the function explicit and exposes any misuse of the
macro virt_to_pfn() acting polymorphic and accepting many types
such as (void *), (unitptr_t) or (unsigned long) as arguments
without warnings.

For symmetry do the same with pfn_to_virt() reflecting the
current layout in asm-generic/page.h.

Doing this reveals a number of offenders in the arch code and
the S390-specific drivers, so just bite the bullet and fix up
all of those as well.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Link: https://lore.kernel.org/r/20230812-virt-to-phys-s390-v2-1-6c40f31fe36f@linaro.org
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2023-08-16 15:13:03 +02:00
..
2023-01-10 14:38:58 +01:00
2023-01-09 14:34:05 +01:00
2023-06-16 11:08:09 +02:00
2023-01-09 14:33:56 +01:00
2023-01-09 14:34:05 +01:00
2021-07-05 14:08:24 -07:00
2021-07-05 14:08:24 -07:00
2021-07-27 12:17:21 +02:00
2022-07-28 18:05:23 +02:00
2023-07-24 12:12:24 +02:00