From patchwork Wed Feb 15 23:02:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13142296 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D014BC636D6 for ; Wed, 15 Feb 2023 23:03:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 719956B0074; Wed, 15 Feb 2023 18:03:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 67B566B0078; Wed, 15 Feb 2023 18:03:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CE2A6B007B; Wed, 15 Feb 2023 18:03:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 3C9926B0074 for ; Wed, 15 Feb 2023 18:03:12 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 0F9B11C636A for ; Wed, 15 Feb 2023 23:03:12 +0000 (UTC) X-FDA: 80471053824.18.414FF88 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id B2446140023 for ; Wed, 15 Feb 2023 23:03:09 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="RRN/etES"; spf=pass (imf23.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676502189; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=kOPOQuVW2mQDEUu/vdmrygAXVon3Ak9fMFR1ZN1UH4k=; b=TPCKpLKYeg3p98I9vY6R73kKpv98QHh+MN6G4O67bOmuwZW3UNA4jEvRxq3ZxF3FoazaUS BI0SHJPBreTo6adh2FR+JPnccoPYq3cB0CW9ZyXU8XiuTDOG2ExC07lVCcVSrywIVB9QNi nRPNBhcdQL9DhiCYY9pvOr6iBKN2IMY= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="RRN/etES"; spf=pass (imf23.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676502189; a=rsa-sha256; cv=none; b=sQoWOUbcy8e6GzL4FLxOO/ICvUMcCtxx3r50EEg72STU+v53EoMUDf/GCI8ne374SOa8Dv f9C7HwKyttzFqO2+9kleu2ZPdInrflElti31TSgpDYk8YB048LNxS8ULCHl8JNGKIGSF4K CdDvk+nnNSjtUrL1oTyXfldiSP0zCvA= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 985CE61DC0; Wed, 15 Feb 2023 23:03:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89883C433EF; Wed, 15 Feb 2023 23:03:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676502188; bh=UKPr8oh22HzQYTrLgMsIu2vdyosO47eeoc8UdL0ln30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RRN/etESUyuiZB3K3jWcCHT/Vlvrlx9cP+9haAT0fEkyexVuIGTJczYfGWgHa36/V qRLIIOF+FjArs5oN4Qcd6izqOzLs16cg5Q+yz7S+xxpkmVPaggs64E2UTIZbwIRlXZ SEjpDrkQY2duscuoD2Lz75jV8cy4Wx7qHvd3yKk27HUNxX8DgtJOFrJxoB8ZhFxiCv QKCc0MghhRzIrI3MESAmaMyiZAwyDSxn4xRC2UaIZEwP90cf3OCuO+DvULghKkjn8d qdSrtChI4nh242kgB2Luputd0TQfHj4lvtrA05S1Fk1ALjbwtXG3Ps7EUa0ijWYpwJ YaVHgucqHaCiQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , David Hildenbrand , Oscar Salvador , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] mm/memory_hotplug: return nothing from do_migrate_range() Date: Wed, 15 Feb 2023 23:02:59 +0000 Message-Id: <20230215230300.61125-2-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230215230300.61125-1-sj@kernel.org> References: <20230215230300.61125-1-sj@kernel.org> MIME-Version: 1.0 X-Stat-Signature: 4ht7h3hxd9os7ufykabup67rcsuiitr5 X-Rspam-User: X-Rspamd-Queue-Id: B2446140023 X-Rspamd-Server: rspam06 X-HE-Tag: 1676502189-561467 X-HE-Meta: U2FsdGVkX19AIS0m1VpobUnxS70U/D8/qkdSDIMV/Bayh9zN8LTZFf49DxnUirPioTfde/vZuSM8LLSESEIT89CdI/AqyLwlEtZ4yza8HWOJf44qcdZUl/8YJepfCXqijtXrFT6qfunB6prOtq1AUdgdGzQterNIwDxr8D5heOoH5Hm8Pk/tBEz8EujAedXLo/EASlMC7F5I20mz8MlB0fMjY/d03I4ZrgFQh3YU0Hcth/Nxc+qcvKRwObYt4ISroUFloFKR1rgkpahYECKc5p6t0wQuYRz+gV9OqfNkfvwjNLAZmUWxyV4VckkUxl5AoLfiQNB1REV1JOuh4z0EJtQl6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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: Return value mechanism of do_migrate_range() is not very simple, while no caller of the function checks the return value. Make the function return nothing to be more simple. Suggested-by: David Hildenbrand Signed-off-by: SeongJae Park Acked-by: David Hildenbrand Reviewed-by: Baolin Wang --- mm/memory_hotplug.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index bcb0dc41c2f2..6c615ba1a5c7 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1620,8 +1620,7 @@ static int scan_movable_pages(unsigned long start, unsigned long end, return 0; } -static int -do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) +static void do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) { unsigned long pfn; struct page *page, *head; @@ -1721,8 +1720,6 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) putback_movable_pages(&source); } } - - return ret; } static int __init cmdline_parse_movable_node(char *p)