diff options
author | 2025-03-04 09:14:30 +0100 | |
---|---|---|
committer | 2025-03-11 15:27:34 +0100 | |
commit | f8c425a94bad5bef4c31792de931470ab5e4bfae (patch) | |
tree | 0eefd5af3a48c37e246ad074befa7c8eb23f9f9d | |
parent | Linux 6.14-rc2 (diff) | |
download | wireguard-linux-f8c425a94bad5bef4c31792de931470ab5e4bfae.tar.xz wireguard-linux-f8c425a94bad5bef4c31792de931470ab5e4bfae.zip |
s390/mm: Use pgprot_val() instead of open coding
Use pgprot_val() to get the page protection value, instead of accessing the
structure member directly. The type of pgprot_t is supposed to be hidden
from all users so that it can be changed; e.g. for STRICT_MM_TYPECHECKS.
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r-- | arch/s390/mm/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index f2298f7a3f21..c5164a96d2cf 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -285,7 +285,7 @@ int arch_add_memory(int nid, u64 start, u64 size, unsigned long size_pages = PFN_DOWN(size); int rc; - if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot)) + if (WARN_ON_ONCE(pgprot_val(params->pgprot) != pgprot_val(PAGE_KERNEL))) return -EINVAL; VM_BUG_ON(!mhp_range_allowed(start, size, true)); |