Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp534204ybb; Wed, 8 Apr 2020 05:03:51 -0700 (PDT) X-Google-Smtp-Source: APiQypJ4qdCNSj9r5CGN79Rp30dU9IWM0ToKlzrS6NYEWVQy2vyu6a2PBor7pQ4ffgBg2gmgshYy X-Received: by 2002:a9d:6ad8:: with SMTP id m24mr5464491otq.66.1586347430920; Wed, 08 Apr 2020 05:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586347430; cv=none; d=google.com; s=arc-20160816; b=XK1crWFUACHBX13XRuSwMZ5QGGG9NXGssAeAhTwtuMQ2nMalOp3YJ9yLjWa4LE78dG D7UswY07Fh4V3adRB2MISW0f/XmPGreU7EzJfBaRXLl8ondnLwEJrNMD01CGqsYyldqy ilwglYfvDVqSDV9KpW1Kh4E9Ypd2omY+4XvhrNmvddQ8ZP0L2fUAxhkCoIgcNimKYVEP VNMlsMo6eSFBjxjpgMx0+0NbMRiwhStSSkVmg5mnTpZI0iq1COMEbNa9RgTxZn4oyGME O9haDYwFY5Dg7ZDebmnWTZ9SevayMfl8MB6FiPgRGZF70zOK4uWHRWmPzUudswUUHL5z NnxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KEFtYuqpBrCVgZp8M6bEdJZafIEARW6kIJmg3biR4K0=; b=TqPyNUw55oJWD3hkL6o8mm7W1t8Y5pVMvzXdIDOrrWEh7TeWNMfd2ooiZ5MjHydkAX 8VtxLHbiPOi5wMxRewXZO+q3+T76ZgJxNIeE7bzAKbzMWmvmJoiHoiD5wowa+hvfgR+G uVLonNEp6sQWFuSzRV+l8H+hbE8Bu/XxNCZGUtLYRPUwuQ3psAVVDvjzCdWneqWUvEWk MDoz6zNy3dOuAwDay2CQNHWCr85iKMeOwhXr697vTB8YmYPjJkwHyBXRnQXHeo4oXuBa t82X742t+AmCpXIyBzixjs94axQG0MdG+vrIAw7cmEMt91L9L2hA6ndEDTlOPAK2FrGA DZeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=LRZUycqF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y65si1919678oie.92.2020.04.08.05.03.21; Wed, 08 Apr 2020 05:03:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=LRZUycqF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728957AbgDHMAp (ORCPT + 99 others); Wed, 8 Apr 2020 08:00:45 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49226 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728331AbgDHMAl (ORCPT ); Wed, 8 Apr 2020 08:00:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=KEFtYuqpBrCVgZp8M6bEdJZafIEARW6kIJmg3biR4K0=; b=LRZUycqFMV229C2W8BGfXZ4U40 c9uECl7UL+Q6WlTw2K2vpM6qbyXzXWKSEYHuGB9euL1doXvNACBXGwCe263BitSOP4m2FERpGA9gN TRzLryKZj3ipBzNzWf0PXyDi5Kld8X9dVhvWgI8ekPvXDXSzfpVR0fb0fPZ1YdalSvqohkCsUL3vN VI5JDnsndNAUg3JHPJcZeDv+TZT4Bppz0sXAEwaJrsSsGwe03LMwV08FDQSJiCUaJCwj5b1iw+qeR jPTA3RC7G61mI7HFz3NI2vi6CsCteSNh4cY2jdpfECo8JkHV3DyS8Nb9htyHHLOBRPfRaU3BqsP77 06Ii0T3g==; Received: from [2001:4bb8:180:5765:65b6:f11e:f109:b151] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jM9NV-0004ke-IF; Wed, 08 Apr 2020 12:00:22 +0000 From: Christoph Hellwig To: Andrew Morton , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , x86@kernel.org, David Airlie , Daniel Vetter , Laura Abbott , Sumit Semwal , Sakari Ailus , Minchan Kim , Nitin Gupta Cc: Robin Murphy , Christophe Leroy , Peter Zijlstra , linuxppc-dev@lists.ozlabs.org, linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/28] mm: don't return the number of pages from map_kernel_range{,_noflush} Date: Wed, 8 Apr 2020 13:59:12 +0200 Message-Id: <20200408115926.1467567-15-hch@lst.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200408115926.1467567-1-hch@lst.de> References: <20200408115926.1467567-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- mm/vmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index a3d810def567..ca8dc5d42580 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -249,7 +249,7 @@ static int vmap_p4d_range(pgd_t *pgd, unsigned long addr, * function. * * RETURNS: - * The number of pages mapped on success, -errno on failure. + * 0 on success, -errno on failure. */ int map_kernel_range_noflush(unsigned long addr, unsigned long size, pgprot_t prot, struct page **pages) @@ -269,7 +269,7 @@ int map_kernel_range_noflush(unsigned long addr, unsigned long size, return err; } while (pgd++, addr = next, addr != end); - return nr; + return 0; } static int map_kernel_range(unsigned long start, unsigned long size, -- 2.25.1