Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5952144imu; Mon, 21 Jan 2019 00:10:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN4pg4z50AFxvIyX+79nvyBstwwZ/jg2Au1C7NDNol7qa7VoZ9FSUzbWK9O1tAmrZ49rqUbR X-Received: by 2002:a63:fb15:: with SMTP id o21mr27114736pgh.211.1548058217208; Mon, 21 Jan 2019 00:10:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548058217; cv=none; d=google.com; s=arc-20160816; b=GehS1/X7RGT2Kam/d6jlU6T8bGEiqZQJd9GCKgc8VZzd6o6GGg7IVDlMCEG2UkDJCt fZeq4CUH/EUnA6wIp4F6soHhPUnvXgvnnj3A3eAQjKPE4aWYGtLE/hRhsY9NL+AGu7+u jGRP0iWzGCL5eazL0QZj+yRu5lf5JuEyuf5W1TpHre8Z8HhpWnswLC9aFz9KXPbQs9XM fjrcIQyM4XDI6yY+K0fID7M8LFirOFefqlnsO77V8pdhZb9sM6iO72LESWTbk9asqcRE B9QKlBFk4E7xV9MEYhPv7dAzEP06TLIvULfPVPkLsyBWHPvbCnpc0B76YJTr8Y/I7Xvo Px8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from; bh=qYKY+8bp2I9/xfakV4zOMB0yfy7C/IxPAJ8PIdHw9dQ=; b=Jq8Q8xBCe1pCljKnDVUmC1PXH0Ywexq9JTKKtBxEiauvH0aW9d6vlQfcnEDfW0d9aw JTl6GGZzUpi2vi+Pjpw8LscEZ3RTQoUvgxi6MgVRdKiCjZkovEnTWFBGUvYYpeScIbQX M4sPbM0BF/S/gwX2/q3T/lbUJg9ND0BW2dhJqpwZr7ormoAsw8Bo+GAvvnXhFpYMzyYS sM92ElzknKoQ0/eBi0gdy3/+/WKuKCyhEqFJQUo3mFwfLKPuQYOHzOaiUvVc/9hR/7LR ZIzd3hfQyYWecVfrHlTBpSDENegZNyvgW236AlUkJKUfE6l4O6gFpsmHH3A2kSjOUEkm /ArQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 191si12136258pgf.41.2019.01.21.00.10.02; Mon, 21 Jan 2019 00:10:17 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728849AbfAUIIg (ORCPT + 99 others); Mon, 21 Jan 2019 03:08:36 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38658 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729635AbfAUIEz (ORCPT ); Mon, 21 Jan 2019 03:04:55 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0L83mO1132171 for ; Mon, 21 Jan 2019 03:04:54 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2q59werwyc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 21 Jan 2019 03:04:54 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 Jan 2019 08:04:51 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 21 Jan 2019 08:04:39 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0L84cJ71114462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 21 Jan 2019 08:04:39 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D32BE4C046; Mon, 21 Jan 2019 08:04:38 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BBE7E4C052; Mon, 21 Jan 2019 08:04:33 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.207.125]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 21 Jan 2019 08:04:33 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Mon, 21 Jan 2019 10:04:33 +0200 From: Mike Rapoport To: linux-mm@kvack.org Cc: Andrew Morton , Catalin Marinas , Christoph Hellwig , "David S. Miller" , Dennis Zhou , Geert Uytterhoeven , Greentime Hu , Greg Kroah-Hartman , Guan Xuetao , Guo Ren , Heiko Carstens , Mark Salter , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Paul Burton , Petr Mladek , Rich Felker , Richard Weinberger , Rob Herring , Russell King , Stafford Horne , Tony Luck , Vineet Gupta , Yoshinori Sato , devicetree@vger.kernel.org, kasan-dev@googlegroups.com, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-usb@vger.kernel.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, x86@kernel.org, xen-devel@lists.xenproject.org, Mike Rapoport Subject: [PATCH v2 04/21] memblock: drop memblock_alloc_base_nid() Date: Mon, 21 Jan 2019 10:03:51 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19012108-4275-0000-0000-00000301E9EB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19012108-4276-0000-0000-0000381015C0 Message-Id: <1548057848-15136-5-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-21_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=833 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901210066 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The memblock_alloc_base_nid() is a oneliner wrapper for memblock_alloc_range_nid() without any side effect. Replace it's usage by the direct calls to memblock_alloc_range_nid(). Signed-off-by: Mike Rapoport --- include/linux/memblock.h | 3 --- mm/memblock.c | 15 ++++----------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 60e100f..f7ef313 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -490,9 +490,6 @@ static inline bool memblock_bottom_up(void) phys_addr_t __init memblock_alloc_range(phys_addr_t size, phys_addr_t align, phys_addr_t start, phys_addr_t end, enum memblock_flags flags); -phys_addr_t memblock_alloc_base_nid(phys_addr_t size, - phys_addr_t align, phys_addr_t max_addr, - int nid, enum memblock_flags flags); phys_addr_t memblock_alloc_base(phys_addr_t size, phys_addr_t align, phys_addr_t max_addr); phys_addr_t __memblock_alloc_base(phys_addr_t size, phys_addr_t align, diff --git a/mm/memblock.c b/mm/memblock.c index a32db30..c80029e 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -1346,21 +1346,14 @@ phys_addr_t __init memblock_alloc_range(phys_addr_t size, phys_addr_t align, flags); } -phys_addr_t __init memblock_alloc_base_nid(phys_addr_t size, - phys_addr_t align, phys_addr_t max_addr, - int nid, enum memblock_flags flags) -{ - return memblock_alloc_range_nid(size, align, 0, max_addr, nid, flags); -} - phys_addr_t __init memblock_phys_alloc_nid(phys_addr_t size, phys_addr_t align, int nid) { enum memblock_flags flags = choose_memblock_flags(); phys_addr_t ret; again: - ret = memblock_alloc_base_nid(size, align, MEMBLOCK_ALLOC_ACCESSIBLE, - nid, flags); + ret = memblock_alloc_range_nid(size, align, 0, + MEMBLOCK_ALLOC_ACCESSIBLE, nid, flags); if (!ret && (flags & MEMBLOCK_MIRROR)) { flags &= ~MEMBLOCK_MIRROR; @@ -1371,8 +1364,8 @@ phys_addr_t __init memblock_phys_alloc_nid(phys_addr_t size, phys_addr_t align, phys_addr_t __init __memblock_alloc_base(phys_addr_t size, phys_addr_t align, phys_addr_t max_addr) { - return memblock_alloc_base_nid(size, align, max_addr, NUMA_NO_NODE, - MEMBLOCK_NONE); + return memblock_alloc_range_nid(size, align, 0, max_addr, NUMA_NO_NODE, + MEMBLOCK_NONE); } phys_addr_t __init memblock_alloc_base(phys_addr_t size, phys_addr_t align, phys_addr_t max_addr) -- 2.7.4