Skip to content

Commit f8c425a

Browse files
hcahcaVasily Gorbik
authored andcommitted
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 <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent a64dcfb commit f8c425a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ int arch_add_memory(int nid, u64 start, u64 size,
285285
unsigned long size_pages = PFN_DOWN(size);
286286
int rc;
287287

288-
if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot))
288+
if (WARN_ON_ONCE(pgprot_val(params->pgprot) != pgprot_val(PAGE_KERNEL)))
289289
return -EINVAL;
290290

291291
VM_BUG_ON(!mhp_range_allowed(start, size, true));

0 commit comments

Comments
 (0)