From patchwork Thu Jun 6 10:14:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 10979151 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 693BD14E5 for ; Thu, 6 Jun 2019 10:15:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 591FA28560 for ; Thu, 6 Jun 2019 10:15:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DB112886C; Thu, 6 Jun 2019 10:15:27 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 487F5287AD for ; Thu, 6 Jun 2019 10:15:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 01FC66B0269; Thu, 6 Jun 2019 06:15:24 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id F13C56B026A; Thu, 6 Jun 2019 06:15:23 -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 DB4946B026C; Thu, 6 Jun 2019 06:15:23 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by kanga.kvack.org (Postfix) with ESMTP id A34C76B0269 for ; Thu, 6 Jun 2019 06:15:23 -0400 (EDT) Received: by mail-pf1-f199.google.com with SMTP id l4so1530261pff.5 for ; Thu, 06 Jun 2019 03:15:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=8+IwF0335QNXDHgSaRi4xr3Z8UVNirnqsUP9wOtPXKs=; b=mfvSw1n+IlhWC+e7cpdap0Zwwu472eFIwhAbz1BgJMhMSZBABIjhA/wua009rFLeJy BzkL0Jnqtj0y/6MK3rOLExM83eTfys3sjN7LE2WvveCrkq/2W1tR8RRol18yl4nQzDPL dH24lCJEVYFLHDzY3QibTVPK06JwZO6ibJoFyM41ymJPpUbwNiMIrDxmzAnYlVJCvKQL 0f+hotcfEPk9k4ij8r6YUSDDesG39Wy3h7uCz/2cRgBz8R7CJURIg8otXib1FFd8Me4R FU1I8rg72uItVda+/F6LgnFT+LSXWgmBH1tiSns7BvFT2U7LL/slj2I7BJ7KE2mMPS2u M3IA== X-Gm-Message-State: APjAAAU4t54+BvRuWZqr6adIAvKV8ZEdVXYUGONoitivjL7xPF575xed xsl6vqINzZMxRjieYX4SK+oPl6LyOLz5pPfpmtUVuU1XanxE5+6doY0XONwnZO4nDkk41sYXzS9 6Iy6kEUYK+an5xYJ8EM3L7yK+homdtO7rQY/UAPivFkb9G9UgeUiaI+fUreQDGVISvw== X-Received: by 2002:a62:6844:: with SMTP id d65mr52706642pfc.175.1559816123118; Thu, 06 Jun 2019 03:15:23 -0700 (PDT) X-Received: by 2002:a62:6844:: with SMTP id d65mr52706559pfc.175.1559816122057; Thu, 06 Jun 2019 03:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559816122; cv=none; d=google.com; s=arc-20160816; b=QxbO7fT+g7PhE2Ex94+YCo5sJurxzqDGMBv4nXPi+OAC1GkRPnxtJ+a91AWqFNpmE9 WaHCcdhw6qym2xKJvKrSlqF02eCy7EDEOx4nBSnhGEOfsJw4wLFyGOMk5gH1HPjmEOIc tIhYKZGG9DszLaAbF8qT5KY/lqPb0zhpJb6gBJC4e9F1rf5Ux4VutmvW9v8gcVN3VncC Y3GZkgA4Nz9uwNCJmNIouCXZfqoaJ22GYO4tvbbATQ1bCEk9xmjGh5pIFnRVi/afhnJo RzbctiaitikJua/SDawPFMQ88fcB1RjzT9fyMlbstwuF1fTlYH2cFDOzCKy34fQcgtqp PiaQ== 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 :dkim-signature; bh=8+IwF0335QNXDHgSaRi4xr3Z8UVNirnqsUP9wOtPXKs=; b=ddEvN/Ru0w9tckFcovRDacqKoRqLKk9w5IZXuxVObEwG4HiqAzLnfAPMWuz9x3Iigb ecSXcrLKx81urKERlKQlS5NkPksnAIOpLuQjFemQE+nJ62skMIKAlVPDYIwbNX+SpGqG AHJ7epMvq8hHhThtAd/94BH8PHmaHrlQo3dX0sKUoTyTZPFRnFIdUHujGy4Tw7gWGEsH ELJTBqzvHfGVcB/IAuC+m1QJHHnvSf/2AE4pruwSP1DNsx3XV+AZ1h9EAqpux3hsDFsJ WVXy0PL88zn9xD4DQJ2Z4VBtRnE0ANnQnLZJtSVQLF9FZ9ai0kLuWVR+kGxVl3+q6hlh 1GXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jg3GgoVm; spf=pass (google.com: domain of laoar.shao@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=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 u6sor1552099pjn.27.2019.06.06.03.15.21 for (Google Transport Security); Thu, 06 Jun 2019 03:15:22 -0700 (PDT) Received-SPF: pass (google.com: domain of laoar.shao@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jg3GgoVm; spf=pass (google.com: domain of laoar.shao@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8+IwF0335QNXDHgSaRi4xr3Z8UVNirnqsUP9wOtPXKs=; b=jg3GgoVmCY/bC92MYCfLgi6NuTGRDm/487IydZ68+fijsLV0d8QxsKpi3gevxG9MKv CStbLX6GcKQhMDuDtfH2TO6FMGyratyZUUmu1DDva5BTYrq8x2y9NwVtMKQL73uAMWb9 LZTVLPDSvrwDNly8FTs5U5LwOomGuOWQGaRAV0rXqIp1lbhDWLSAbs9/X0F3ZK4jyhYv w/BtCr89WltsywNUQu/KINBbhTtoHYQC/+5ymTZzu90d/5xhoSH4GhK0D7UbetwEhSjh kpNL2h1jmFzmo0NG6xoztwVGzFHhJRgQXkAyotG4Y7PRE9fQiVzVYYVALkY2IG8/7wOv vXGg== X-Google-Smtp-Source: APXvYqzG3+8/LzV9uQ9G3bjFjX0YqT5YWawQvI2XSVm68YYd7+NjikxYEiHsmbZD7zjSF9YXSvPNuA== X-Received: by 2002:a17:90a:364b:: with SMTP id s69mr52048168pjb.15.1559816121658; Thu, 06 Jun 2019 03:15:21 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id z68sm1895829pfb.37.2019.06.06.03.15.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jun 2019 03:15:21 -0700 (PDT) From: Yafang Shao To: akpm@linux-foundation.org, mhocko@suse.com, linux.bhar@gmail.com Cc: linux-mm@kvack.org, shaoyafang@didiglobal.com, Yafang Shao Subject: [PATCH v4 2/3] mm/vmscan: change return type of shrink_node() to void Date: Thu, 6 Jun 2019 18:14:39 +0800 Message-Id: <1559816080-26405-3-git-send-email-laoar.shao@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1559816080-26405-1-git-send-email-laoar.shao@gmail.com> References: <1559816080-26405-1-git-send-email-laoar.shao@gmail.com> 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 As the return value of shrink_node() isn't used by any callsites, we'd better change the return type of shrink_node() from static inline to void. Signed-off-by: Yafang Shao --- mm/vmscan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 84dcb65..281bfa9 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2687,7 +2687,7 @@ static bool pgdat_memcg_congested(pg_data_t *pgdat, struct mem_cgroup *memcg) (memcg && memcg_congested(pgdat, memcg)); } -static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc) +static void shrink_node(pg_data_t *pgdat, struct scan_control *sc) { struct reclaim_state *reclaim_state = current->reclaim_state; unsigned long nr_reclaimed, nr_scanned; @@ -2857,8 +2857,6 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc) */ if (reclaimable) pgdat->kswapd_failures = 0; - - return reclaimable; } /*