提交 f07f4622 编写于 作者: Q Qian Cai 提交者: Xie XiuQi

powerpc/cacheflush: fix variable set but not used

[ Upstream commit 04db3ede40ae4fc23a5c4237254c4a53bbe4c1f2 ]

The powerpc's flush_cache_vmap() is defined as a macro and never use
both of its arguments, so it will generate a compilation warning,

lib/ioremap.c: In function 'ioremap_page_range':
lib/ioremap.c:203:16: warning: variable 'start' set but not used
[-Wunused-but-set-variable]

Fix it by making it an inline function.
Signed-off-by: NQian Cai <cai@lca.pw>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 fc3df3e0
...@@ -32,9 +32,12 @@ ...@@ -32,9 +32,12 @@
* not expect this type of fault. flush_cache_vmap is not exactly the right * not expect this type of fault. flush_cache_vmap is not exactly the right
* place to put this, but it seems to work well enough. * place to put this, but it seems to work well enough.
*/ */
#define flush_cache_vmap(start, end) do { asm volatile("ptesync" ::: "memory"); } while (0) static inline void flush_cache_vmap(unsigned long start, unsigned long end)
{
asm volatile("ptesync" ::: "memory");
}
#else #else
#define flush_cache_vmap(start, end) do { } while (0) static inline void flush_cache_vmap(unsigned long start, unsigned long end) { }
#endif #endif
#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册