summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/pgtable-nommu.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-02-02 13:30:40 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2017-02-28 11:06:19 +0000
commite2fce0a28d8f4293d68abf6485956e7794a30124 (patch)
tree46eb8074ebca867766775836adab5d9f09020496 /arch/arm/include/asm/pgtable-nommu.h
parent7b96ddd02ec33d705df02260e2d5dcfb1d498f4b (diff)
downloadop-kernel-dev-e2fce0a28d8f4293d68abf6485956e7794a30124.zip
op-kernel-dev-e2fce0a28d8f4293d68abf6485956e7794a30124.tar.gz
ARM: 8655/1: improve NOMMU definition of pgprot_*()
The tegra DRM driver produces a harmless warning when built for NOMMU: drivers/gpu/drm/tegra/gem.c: In function 'tegra_drm_mmap': drivers/gpu/drm/tegra/gem.c:508:12: unused variable 'prot' This is because pgprot_writecombine() on ARM returns a constant and ignores its argument. The version in asm-generic doesn't have that problem, so let's use that one instead. We don't actually care about the value on NOMMU, and this is consistent with what some other architectures do. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/pgtable-nommu.h')
-rw-r--r--arch/arm/include/asm/pgtable-nommu.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/include/asm/pgtable-nommu.h b/arch/arm/include/asm/pgtable-nommu.h
index add094d..302240c 100644
--- a/arch/arm/include/asm/pgtable-nommu.h
+++ b/arch/arm/include/asm/pgtable-nommu.h
@@ -63,9 +63,9 @@ typedef pte_t *pte_addr_t;
/*
* Mark the prot value as uncacheable and unbufferable.
*/
-#define pgprot_noncached(prot) __pgprot(0)
-#define pgprot_writecombine(prot) __pgprot(0)
-#define pgprot_dmacoherent(prot) __pgprot(0)
+#define pgprot_noncached(prot) (prot)
+#define pgprot_writecombine(prot) (prot)
+#define pgprot_dmacoherent(prot) (prot)
/*
OpenPOWER on IntegriCloud