Skip to content

Commit 60bb446

Browse files
Christoph Hellwigtorvalds
authored andcommitted
mm: don't return the number of pages from map_kernel_range{,_noflush}
None of the callers needs the number of pages, and a 0 / -errno return value is a lot more intuitive. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: David Airlie <[email protected]> Cc: Gao Xiang <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Michael Kelley <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Nitin Gupta <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Sakari Ailus <[email protected]> Cc: Stephen Hemminger <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Wei Liu <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Will Deacon <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent a29adb6 commit 60bb446

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/vmalloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ static int vmap_p4d_range(pgd_t *pgd, unsigned long addr,
250250
* function.
251251
*
252252
* RETURNS:
253-
* The number of pages mapped on success, -errno on failure.
253+
* 0 on success, -errno on failure.
254254
*/
255255
int map_kernel_range_noflush(unsigned long addr, unsigned long size,
256256
pgprot_t prot, struct page **pages)
@@ -270,7 +270,7 @@ int map_kernel_range_noflush(unsigned long addr, unsigned long size,
270270
return err;
271271
} while (pgd++, addr = next, addr != end);
272272

273-
return nr;
273+
return 0;
274274
}
275275

276276
static int map_kernel_range(unsigned long start, unsigned long size,

0 commit comments

Comments
 (0)