diff mbox series

[v2] powerpc/4xx/ocm: fix compilation error

Message ID 20181222143538.21630-1-chunkeey@gmail.com (mailing list archive)
State Accepted
Commit d0757237d7b18b1ce74293be7c077d86f7a732e8
Headers show
Series [v2] powerpc/4xx/ocm: fix compilation error | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success next/apply_patch Successfully applied
snowpatch_ozlabs/build-ppc64le success build succeeded & removed 0 sparse warning(s)
snowpatch_ozlabs/build-ppc64be success build succeeded & removed 0 sparse warning(s)
snowpatch_ozlabs/build-ppc64e success build succeeded & removed 0 sparse warning(s)
snowpatch_ozlabs/build-pmac32 success build succeeded & removed 0 sparse warning(s)
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked

Commit Message

Christian Lamparter Dec. 22, 2018, 2:35 p.m. UTC
This patch fixes a recent compilation regression in ocm:

| ocm.c: In function ‘ocm_init_node’:
| ocm.c:182:18: error: invalid operands to binary |
|       (have ‘int’ and ‘pgprot_t’ {aka ‘struct <anonymous>’})
|       _PAGE_EXEC | PAGE_KERNEL_NCG);
|                  ^
|
| ocm.c:197:17: error: invalid operands to binary |
|       (have ‘int’ and ‘pgprot_t’ {aka ‘struct <anonymous>’})
|        _PAGE_EXEC | PAGE_KERNEL);
|                   ^

Fixes: 56f3c1413f5c ("powerpc/mm: properly set PAGE_KERNEL flags in ioremap()")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
---
 arch/powerpc/platforms/4xx/ocm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Christophe Leroy Dec. 22, 2018, 3:46 p.m. UTC | #1
Le 22/12/2018 à 15:35, Christian Lamparter a écrit :
> This patch fixes a recent compilation regression in ocm:
> 
> | ocm.c: In function ‘ocm_init_node’:
> | ocm.c:182:18: error: invalid operands to binary |
> |       (have ‘int’ and ‘pgprot_t’ {aka ‘struct <anonymous>’})
> |       _PAGE_EXEC | PAGE_KERNEL_NCG);
> |                  ^
> |
> | ocm.c:197:17: error: invalid operands to binary |
> |       (have ‘int’ and ‘pgprot_t’ {aka ‘struct <anonymous>’})
> |        _PAGE_EXEC | PAGE_KERNEL);
> |                   ^
> 
> Fixes: 56f3c1413f5c ("powerpc/mm: properly set PAGE_KERNEL flags in ioremap()")
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>

Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: stable@vger.kernel.org

> ---
>   arch/powerpc/platforms/4xx/ocm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/4xx/ocm.c b/arch/powerpc/platforms/4xx/ocm.c
> index 561b09de69bf..de3565353153 100644
> --- a/arch/powerpc/platforms/4xx/ocm.c
> +++ b/arch/powerpc/platforms/4xx/ocm.c
> @@ -179,7 +179,7 @@ static void __init ocm_init_node(int count, struct device_node *node)
>   	/* ioremap the non-cached region */
>   	if (ocm->nc.memtotal) {
>   		ocm->nc.virt = __ioremap(ocm->nc.phys, ocm->nc.memtotal,
> -					 _PAGE_EXEC | PAGE_KERNEL_NCG);
> +			_PAGE_EXEC | pgprot_val(PAGE_KERNEL_NCG));
>   
>   		if (!ocm->nc.virt) {
>   			printk(KERN_ERR
> @@ -194,7 +194,7 @@ static void __init ocm_init_node(int count, struct device_node *node)
>   
>   	if (ocm->c.memtotal) {
>   		ocm->c.virt = __ioremap(ocm->c.phys, ocm->c.memtotal,
> -					_PAGE_EXEC | PAGE_KERNEL);
> +					_PAGE_EXEC | pgprot_val(PAGE_KERNEL));
>   
>   		if (!ocm->c.virt) {
>   			printk(KERN_ERR
> 

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
diff mbox series

Patch

diff --git a/arch/powerpc/platforms/4xx/ocm.c b/arch/powerpc/platforms/4xx/ocm.c
index 561b09de69bf..de3565353153 100644
--- a/arch/powerpc/platforms/4xx/ocm.c
+++ b/arch/powerpc/platforms/4xx/ocm.c
@@ -179,7 +179,7 @@  static void __init ocm_init_node(int count, struct device_node *node)
 	/* ioremap the non-cached region */
 	if (ocm->nc.memtotal) {
 		ocm->nc.virt = __ioremap(ocm->nc.phys, ocm->nc.memtotal,
-					 _PAGE_EXEC | PAGE_KERNEL_NCG);
+			_PAGE_EXEC | pgprot_val(PAGE_KERNEL_NCG));
 
 		if (!ocm->nc.virt) {
 			printk(KERN_ERR
@@ -194,7 +194,7 @@  static void __init ocm_init_node(int count, struct device_node *node)
 
 	if (ocm->c.memtotal) {
 		ocm->c.virt = __ioremap(ocm->c.phys, ocm->c.memtotal,
-					_PAGE_EXEC | PAGE_KERNEL);
+					_PAGE_EXEC | pgprot_val(PAGE_KERNEL));
 
 		if (!ocm->c.virt) {
 			printk(KERN_ERR