Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2771989pxv; Mon, 12 Jul 2021 01:17:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgdujTdKyGhMiyRsuUdXla1L/26AKZac7faxzdHB6kRfcJClnS/SM4+X5ut58uFcMHTOWG X-Received: by 2002:a50:fe94:: with SMTP id d20mr9812244edt.114.1626077844972; Mon, 12 Jul 2021 01:17:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626077844; cv=none; d=google.com; s=arc-20160816; b=L378xIMkk11XCsw6HQ7Q1B8UYZB2crJ0XbuKbd+Wv5+gU/7rutEq+z2j2M+J1RX7uH MzAqQQYH28tFBt/subWtmpFi0jVMPY6WzSnb0Dpi9a5rM79mWcGcPa9+u0Xygul+rGzj qK2J3RgLluKx3wp0KMQDqky1xNg99LjwjpgAl8eOr2FNZjjFZDKyLb0a2vutMZYJpUrj oF1cvCHysWPY92n3E13eh2M1sK6nq47ORAqSr7zDzazTJJ7MiFjlg2nyvUybK3Qrd8DC CoO2EfiZklWZlpqbcT0BOeJQcQV0I5o1ivsaKO4Svtl/pGuJcCeq5nDL+lpanlDaxsEG +dTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PBvDy4L3seQw19FwrXm13YabUGGme0LRoRLxPiz3JrU=; b=QFdL+cX2N76d9cWTf5I4udrT2hwMBx0GqUztjrs1x2bs8nMpomp5K1tBaDLA2VpIcF DqZULOPeNQ3XSLIjJWjKsXLyRRno4jxIvU0ZWbWFG/gaZWH77v+zchczwkR+M+8K618e igF6qwkFXjhLGbsmcOwVjdmtuWbWXx2s6EL4MAGfbODIRQhW7Yc2y7KB1Yjp/K0DzSO8 3HZa15bIteTQpxyimzKSuSp+MkwIEv3pi4ZULJftGh1ze/EhQTf4ogoioATAgO2l5QGy MPI6dkxzEgdEUPR8ToUlBKrp9hkHzfDgxQHGnYrSPXKNdXi8kxTSCpkddXJUWRUaw/ZG 8nmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=PftOOU9p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg1si15603734edb.139.2021.07.12.01.17.02; Mon, 12 Jul 2021 01:17:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=PftOOU9p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351831AbhGLIOb (ORCPT + 99 others); Mon, 12 Jul 2021 04:14:31 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:46094 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245434AbhGLH2H (ORCPT ); Mon, 12 Jul 2021 03:28:07 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 8637E220C2; Mon, 12 Jul 2021 07:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1626074717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PBvDy4L3seQw19FwrXm13YabUGGme0LRoRLxPiz3JrU=; b=PftOOU9p+MK7AedePz5ObIeCy4vn+NDoUQKTThhbK53xJtxP4eR7XPLR69BwM9sSSsZgpL VteQ6BbiD+cmVtOtPZ485Anq1f0TDt8g+1uBB+Z8eR+5NXKGgGQST7rKfXqaJ6f+FVvMQ8 quFtyX0zQWxxmQXJwO41I4nDlyBMJhU= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 55CB6A3CCB; Mon, 12 Jul 2021 07:25:17 +0000 (UTC) Date: Mon, 12 Jul 2021 09:25:16 +0200 From: Michal Hocko To: Miaohe Lin Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, vbabka@suse.cz, axboe@kernel.dk, iamjoonsoo.kim@lge.com, alexs@kernel.org, apopple@nvidia.com, willy@infradead.org, minchan@kernel.org, david@redhat.com, shli@fb.com, hillf.zj@alibaba-inc.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/5] mm/vmscan: remove unneeded return value of kswapd_run() Message-ID: References: <20210710100329.49174-1-linmiaohe@huawei.com> <20210710100329.49174-4-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210710100329.49174-4-linmiaohe@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 10-07-21 18:03:27, Miaohe Lin wrote: > The return value of kswapd_run() is unused now. Clean it up. > > Signed-off-by: Miaohe Lin Acked-by: Michal Hocko > --- > include/linux/swap.h | 2 +- > mm/vmscan.c | 7 ++----- > 2 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/include/linux/swap.h b/include/linux/swap.h > index 6f5a43251593..717e6e500929 100644 > --- a/include/linux/swap.h > +++ b/include/linux/swap.h > @@ -408,7 +408,7 @@ static inline bool node_reclaim_enabled(void) > > extern void check_move_unevictable_pages(struct pagevec *pvec); > > -extern int kswapd_run(int nid); > +extern void kswapd_run(int nid); > extern void kswapd_stop(int nid); > > #ifdef CONFIG_SWAP > diff --git a/mm/vmscan.c b/mm/vmscan.c > index fbe53e60b248..c580bef6b885 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -4284,23 +4284,20 @@ unsigned long shrink_all_memory(unsigned long nr_to_reclaim) > * This kswapd start function will be called by init and node-hot-add. > * On node-hot-add, kswapd will moved to proper cpus if cpus are hot-added. > */ > -int kswapd_run(int nid) > +void kswapd_run(int nid) > { > pg_data_t *pgdat = NODE_DATA(nid); > - int ret = 0; > > if (pgdat->kswapd) > - return 0; > + return; > > pgdat->kswapd = kthread_run(kswapd, pgdat, "kswapd%d", nid); > if (IS_ERR(pgdat->kswapd)) { > /* failure at boot is fatal */ > BUG_ON(system_state < SYSTEM_RUNNING); > pr_err("Failed to start kswapd on node %d\n", nid); > - ret = PTR_ERR(pgdat->kswapd); > pgdat->kswapd = NULL; > } > - return ret; > } > > /* > -- > 2.23.0 -- Michal Hocko SUSE Labs