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 <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Cc: Gao Xiang <xiang@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Kelley <mikelley@microsoft.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Nitin Gupta <ngupta@vflare.org> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Stephen Hemminger <sthemmin@microsoft.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Wei Liu <wei.liu@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Paul Mackerras <paulus@ozlabs.org> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Will Deacon <will@kernel.org> Link: http://lkml.kernel.org/r/20200414131348.444715-16-hch@lst.de Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a29adb6 commit 60bb446

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎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)