From patchwork Mon Aug 13 15:46:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 10564463 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2500A1390 for ; Mon, 13 Aug 2018 15:46:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14CEA29501 for ; Mon, 13 Aug 2018 15:46:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08C4B29506; Mon, 13 Aug 2018 15:46:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A660129501 for ; Mon, 13 Aug 2018 15:46:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 758916B0006; Mon, 13 Aug 2018 11:46:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 701256B0007; Mon, 13 Aug 2018 11:46:52 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5AF0D6B000A; Mon, 13 Aug 2018 11:46:52 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by kanga.kvack.org (Postfix) with ESMTP id D9E376B0006 for ; Mon, 13 Aug 2018 11:46:51 -0400 (EDT) Received: by mail-wr1-f70.google.com with SMTP id r4-v6so13349057wrt.2 for ; Mon, 13 Aug 2018 08:46:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=u8/RQnqvKaB52sUTxj99rxlBwtcgMKNF8ab+i1Lq2fw=; b=G2LmW3mH0xJ/MbqeF7L6Ud+qEM9CJWZT16c3s/ywgMfNIXrOJfGJTpIAn4xd2ldf8C mYdomS33SaCrOY4PttwwdsDCcHPROM0YfsmJZnrxhch5RbEJum8QnbkfvTD6ApK8fhpZ sVFq4jp79DaPTWmER2ldk8NiCHYiPSJS/uXRSMZ7sKSapiVHwX4zQr2HYZWq1xIho8tk PQFk4oGQNHyClk1pLxXfqzmSE0mKaJPSy4CykxSCmfZ15JemkV4ZWzJfNzVYu+cGfWKL S+HS1+DoDPTZPQTpmIIq/6YuzWH5BfvYfaYPKkmiRup8ltp+oTBIUM78GTfHGG+jPhau 1yDw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Gm-Message-State: AOUpUlEUgaXuDgh23vZ5NUy8/OEpgizV9WJGdCI//v/b2BACLBdt/sHZ zqstWSNh91hAhIoxxA7na1OpyZtyyxxQf3VkSe6lEk0SzaHSo49uKZnL4pBnF5XFD6vtnHmHlFh mn6L1DqJ8sx7xf63xJsGkQeuVA0mznj3XcW/aGq+VvPlNr51iuBA5ePnBdGSpvGu7DyAnK0Nrif IZIP8lOJz6DECDunvMzyV6swIXYX90k8RDyx/rCjcPe6ropGrVLPYhuTM0UWAN9KtZe5AunTmOe cAOOt0sicAZFvGtQjRtQak5NBhxnqtTwZfYgGIffGMax8C1mI842DZ0Dxk798oCKBYONw3AYjdp wJXPnJtrdeleXo72QEZf/WGl9hR5M//bAGDcOpG6cMJe2VBsj5wzsT6W3Ole/w1chUr0cIhr+w= = X-Received: by 2002:a1c:f306:: with SMTP id q6-v6mr8285274wmq.111.1534175211290; Mon, 13 Aug 2018 08:46:51 -0700 (PDT) X-Received: by 2002:a1c:f306:: with SMTP id q6-v6mr8285256wmq.111.1534175210598; Mon, 13 Aug 2018 08:46:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534175210; cv=none; d=google.com; s=arc-20160816; b=C0vHwRrGM3wURiJ8qb/QFRHCuOGQACLkjFSoLkQV2tHig7PjnZjbuaytX2hdnmIsN7 fUuUJwfuC0XLsJIa/v4+vK0gn+BIjNKSVZymxTsig8yMZeXwMgL+j9Mlf/CB35vDi46R YBTfbkyHJRG4xLytO66IcvgWYcmSLuBAOLM1pUWxv52l/uxQAq1l97Crh2Abdaa/WPwT AemWcaeBJgyGOdfqTMVQ6vNLqYjdgCzwaMap3qN/lt3R6tP2mXKD3rC6Q6c3eSp0mVJN z6z5+/RpOlAZfDxAKV/NzpFNa5HFMxOg3aOpjebOITFCHALsYBVJ5Ayc90kmV6WZ1rpb y6cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=u8/RQnqvKaB52sUTxj99rxlBwtcgMKNF8ab+i1Lq2fw=; b=H4quhtvDrYO2U6BbcXfRMth0u9J2FgQvq/M0L6VFFbKXsghMEgwwqg88kTsdNgWTyd MQh9VDxa8c1Ygn3B6MrSh0cFwy4EWn0VO08PF2PlssXWcznqK8+rkfYlBbXjrhlbAO5K nWHyVKGmNmHyG+mfEzn1GJXDUTiJar62avRYfpyFvFzRWAY22HJQp1wy43CcJhKKY0QW gd25GbH4dE/zlj4blyBbdQzXrthIhENMBRWxTUJTaXAEOo1hfkcYlxEy79qhy47svwtE fNt8KyjOrkNu8gmFE/NokYDIyHCs3OSXjqYkrmBDFhPK3H7vQw4ZVbf+bjPKV1sWKINc xbQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id t184-v6sor2249044wmb.7.2018.08.13.08.46.50 for (Google Transport Security); Mon, 13 Aug 2018 08:46:50 -0700 (PDT) Received-SPF: pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Google-Smtp-Source: AA+uWPzOfyAJfKFcSVM7PWZ/919D7tsBXQmsa0ftfxohKtspqdwbjunV/BfCEzSQ8FqdwsCbsTcS9g== X-Received: by 2002:a1c:64c:: with SMTP id 73-v6mr7992915wmg.7.1534175210325; Mon, 13 Aug 2018 08:46:50 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id t186-v6sm11773743wmf.14.2018.08.13.08.46.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Aug 2018 08:46:49 -0700 (PDT) Received: from d104.suse.de (nat.nue.novell.com [195.135.221.2]) by techadventures.net (Postfix) with ESMTPA id 56CFB12485D; Mon, 13 Aug 2018 17:46:48 +0200 (CEST) From: osalvador@techadventures.net To: akpm@linux-foundation.org Cc: mhocko@suse.com, dan.j.williams@intel.com, jglisse@redhat.com, rafael@kernel.org, david@redhat.com, yasu.isimatu@gmail.com, logang@deltatee.com, dave.jiang@intel.com, Jonathan.Cameron@huawei.com, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oscar Salvador Subject: [PATCH v2 1/3] mm/memory-hotplug: Drop unused args from remove_memory_section Date: Mon, 13 Aug 2018 17:46:37 +0200 Message-Id: <20180813154639.19454-2-osalvador@techadventures.net> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180813154639.19454-1-osalvador@techadventures.net> References: <20180813154639.19454-1-osalvador@techadventures.net> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Oscar Salvador unregister_memory_section() calls remove_memory_section() with three arguments: * node_id * section * phys_device Neither node_id nor phys_device are used. Let us drop them from the function. Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand --- drivers/base/memory.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/base/memory.c b/drivers/base/memory.c index c8a1cb0b6136..2c622a9a7490 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -752,8 +752,7 @@ unregister_memory(struct memory_block *memory) device_unregister(&memory->dev); } -static int remove_memory_section(unsigned long node_id, - struct mem_section *section, int phys_device) +static int remove_memory_section(struct mem_section *section) { struct memory_block *mem; @@ -785,7 +784,7 @@ int unregister_memory_section(struct mem_section *section) if (!present_section(section)) return -EINVAL; - return remove_memory_section(0, section, 0); + return remove_memory_section(section); } #endif /* CONFIG_MEMORY_HOTREMOVE */