[PATCH v2] fs/dax: include <asm/page.h> to fix build error on ARC
Al Viro
viro at zeniv.linux.org.uk
Mon Jan 4 23:17:38 EST 2021
On Thu, Dec 31, 2020 at 08:29:14PM -0800, Randy Dunlap wrote:
> fs/dax.c uses copy_user_page() but ARC does not provide that interface,
> resulting in a build error.
>
> Provide copy_user_page() in <asm/page.h> (beside copy_page()) and
> add <asm/page.h> to fs/dax.c to fix the build error.
>
> ../fs/dax.c: In function 'copy_cow_page_dax':
> ../fs/dax.c:702:2: error: implicit declaration of function 'copy_user_page'; did you mean 'copy_to_user_page'? [-Werror=implicit-function-declaration]
Could somebody explain what the force-cast is doing in there?
I mean, the call is
copy_user_page(vto, (void __force *)kaddr, vaddr, to);
kaddr is a local variable there, declared as void *; AFAICS, that
had been pure cargo-cult since
commit 7a9eb20666317794d0279843fbd091af93907780
Author: Dan Williams <dan.j.williams at intel.com>
Date: Fri Jun 3 18:06:47 2016 -0700
pmem: kill __pmem address space
I mean, it's been more than 4 years, time to bury that body...
More information about the linux-snps-arc
mailing list