From patchwork Wed Jul 7 16:16:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 12363049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB385C07E95 for ; Wed, 7 Jul 2021 16:55:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2CB8E61CBE for ; Wed, 7 Jul 2021 16:55:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CB8E61CBE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D29F06B0011; Wed, 7 Jul 2021 12:55:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CDA516B005D; Wed, 7 Jul 2021 12:55:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B7B3B6B006C; Wed, 7 Jul 2021 12:55:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0154.hostedemail.com [216.40.44.154]) by kanga.kvack.org (Postfix) with ESMTP id 94E3E6B0011 for ; Wed, 7 Jul 2021 12:55:11 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id F058A18359F54 for ; Wed, 7 Jul 2021 16:55:10 +0000 (UTC) X-FDA: 78336391980.08.947350D Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) by imf30.hostedemail.com (Postfix) with ESMTP id 39A15E00199D for ; Wed, 7 Jul 2021 16:55:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=8vx2MlWUn5LIhwKdzrV6SOg1W/EZtZtrXCT9CRbQ+0g=; b=FV3ssxZghmBYayxtp6VYSP6mZJ ornbpTVgIMpLa550CiIgjKoj8bx72CdZ6pYZ+ZNVQ20OhUwrGy8visAobOoNpHlSVngpCldM5SLYw o85Tz9QpNRBpHI4zUIBLX6RnKFyzsacv8sZ0sDjdO9nbLGQDa9MmZ53XR73AZVAc4PQ8BFMUL6kKI 3RSLD7xjprLfKTs3bN4nCp03Jd5xgj0fOHsZRkqiRRLcK5RLCtwYeN327IVH35SFSnOiXBoxbQoAl LriR/x3fEMEGh6T/nxU8m68kdGPKrmaAV1U9PCZbHV8TrgOTTtgKHA6nwbTGVC+gCFR7liaLvPBdd jH6J6LwQ==; Received: from [2601:1c0:6280:3f0::a22f] (helo=smtpauth.infradead.org) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1ADk-00FP2Q-8B; Wed, 07 Jul 2021 16:16:20 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Yang Shi , Hugh Dickins , Andrew Morton , linux-mm@kvack.org, Greg Ungerer , linux-m68k@lists.linux-m68k.org, uclinux-dev@uclinux.org Subject: [PATCH] mm: try_to_unmap() is now void Date: Wed, 7 Jul 2021 09:16:14 -0700 Message-Id: <20210707161614.13001-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Rspam-User: nil Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=FV3ssxZg; dmarc=none; spf=none (imf30.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=rdunlap@infradead.org X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 39A15E00199D X-Stat-Signature: pjhck6gapb593ebx57fb7f4nxhxyoyjf X-HE-Tag: 1625676910-903337 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: Fix the "CONFIG_MMU is not set" case of converting try_to_unmap() from bool to void. (as seen on m68k/coldfire) In file included from ../mm/vmscan.c:33: ../mm/vmscan.c: In function 'shrink_page_list': ../include/linux/rmap.h:294:34: warning: statement with no effect [-Wunused-value] 294 | #define try_to_unmap(page, refs) false | ^~~~~ ../mm/vmscan.c:1508:4: note: in expansion of macro 'try_to_unmap' 1508 | try_to_unmap(page, flags); | ^~~~~~~~~~~~ Fixes: 1fb08ac63bee ("mm: rmap: make try_to_unmap() void function") Signed-off-by: Randy Dunlap Cc: Yang Shi Cc: Hugh Dickins Cc: Andrew Morton Cc: linux-mm@kvack.org Cc: Greg Ungerer Cc: linux-m68k@lists.linux-m68k.org Cc: uclinux-dev@uclinux.org --- v2: add linux-mm m.l. add M68K/Coldfire Cc's change to static inline function. include/linux/rmap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- linux-next-20210701.orig/include/linux/rmap.h +++ linux-next-20210701/include/linux/rmap.h @@ -291,7 +291,8 @@ static inline int page_referenced(struct return 0; } -#define try_to_unmap(page, refs) false +static inline void try_to_unmap(struct page *page, enum ttu_flags flags) +{} static inline int page_mkclean(struct page *page) {