Skip to content

Commit bb2598c

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/mm: Convert pgprot_val() into function
Convert pgprot_val() into a function similar to other mm primitives like e.g. pte_val(). This disallows usage as an lvalue; however there aren't any such users left, except for some architecture specific ones. Reviewed-by: Alexander Gordeev <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent f8c425a commit bb2598c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

arch/s390/include/asm/page.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ typedef struct { unsigned long p4d; } p4d_t;
8484
typedef struct { unsigned long pgd; } pgd_t;
8585
typedef pte_t *pgtable_t;
8686

87-
#define pgprot_val(x) ((x).pgprot)
87+
static inline unsigned long pgprot_val(pgprot_t pgprot)
88+
{
89+
return pgprot.pgprot;
90+
}
91+
8892
#define pgste_val(x) ((x).pgste)
8993

9094
static inline unsigned long pte_val(pte_t pte)
@@ -112,13 +116,13 @@ static inline unsigned long pgd_val(pgd_t pgd)
112116
return pgd.pgd;
113117
}
114118

119+
#define __pgprot(x) ((pgprot_t) { (x) } )
115120
#define __pgste(x) ((pgste_t) { (x) } )
116121
#define __pte(x) ((pte_t) { (x) } )
117122
#define __pmd(x) ((pmd_t) { (x) } )
118123
#define __pud(x) ((pud_t) { (x) } )
119124
#define __p4d(x) ((p4d_t) { (x) } )
120125
#define __pgd(x) ((pgd_t) { (x) } )
121-
#define __pgprot(x) ((pgprot_t) { (x) } )
122126

123127
static inline void page_set_storage_key(unsigned long addr,
124128
unsigned char skey, int mapped)

0 commit comments

Comments
 (0)