Commit 52481e4b authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre: fix compile warning with is_vmalloc_addr

Recent commit 175f5475
introduced this compile warning (because vaddr is unsigned long),
so add a cast:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function ‘kiblnd_kvaddr_to_page’:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:532:2: warning: passing argument 1 of ‘is_vmalloc_addr’ makes pointer from integer without a cast [enabled by default]
  if (is_vmalloc_addr(vaddr)) {
  ^
In file included from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h:43:0,
                 from drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:41:
include/linux/mm.h:336:59: note: expected ‘const void *’ but argument is of type ‘long unsigned int’
 static inline int is_vmalloc_addr(const void *x)
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
CC: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1ebf5b72
...@@ -529,7 +529,7 @@ kiblnd_kvaddr_to_page (unsigned long vaddr) ...@@ -529,7 +529,7 @@ kiblnd_kvaddr_to_page (unsigned long vaddr)
{ {
struct page *page; struct page *page;
if (is_vmalloc_addr(vaddr)) { if (is_vmalloc_addr((void *)vaddr)) {
page = vmalloc_to_page ((void *)vaddr); page = vmalloc_to_page ((void *)vaddr);
LASSERT (page != NULL); LASSERT (page != NULL);
return page; return page;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment