From patchwork Sat Jan 29 02:14:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12729362 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 4F81BC433EF for ; Sat, 29 Jan 2022 02:14:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D54966B00D1; Fri, 28 Jan 2022 21:14:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CDD1F6B00D2; Fri, 28 Jan 2022 21:14:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B7DF46B00D4; Fri, 28 Jan 2022 21:14:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0003.hostedemail.com [216.40.44.3]) by kanga.kvack.org (Postfix) with ESMTP id A90A06B00D1 for ; Fri, 28 Jan 2022 21:14:27 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 7088C96353 for ; Sat, 29 Jan 2022 02:14:27 +0000 (UTC) X-FDA: 79081705374.14.3C64F1C Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf03.hostedemail.com (Postfix) with ESMTP id A7B8E20003 for ; Sat, 29 Jan 2022 02:14:26 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id 771EEB826A5; Sat, 29 Jan 2022 02:14:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBBF0C340E8; Sat, 29 Jan 2022 02:14:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1643422464; bh=f5jLvhnm9yNe/zMKjo8gyaqBIg5K7lhZuhAKD/Z+CqU=; h=Date:From:To:Subject:In-Reply-To:From; b=rGPKDev6UfbPAOr1rRoBbzWyB0HmLAmUDicqpScY77cTSiuiQZOnk6BsmwpFsHlGS 7U8RkcFeZdWqWBEQgQtLs5dYdxCwgW79P4SAr1f4OVLmBU/lwa6692DnwxTSyrW4a2 eaVNfbtibqNxPQ4q60VDmVKTAR7VWkNnERDCC06M= Date: Fri, 28 Jan 2022 18:14:23 -0800 From: Andrew Morton To: akpm@linux-foundation.org, bigeasy@linutronix.de, hch@lst.de, linux-mm@kvack.org, maorg@nvidia.com, mm-commits@vger.kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org Subject: [patch 4/7] tools/testing/scatterlist: add missing defines Message-ID: <20220129021423.pzhI3k31o%akpm@linux-foundation.org> In-Reply-To: <20220128181341.2103de95948608a65958ae40@linux-foundation.org> User-Agent: s-nail v14.8.16 MIME-Version: 1.0 X-Rspam-User: nil X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A7B8E20003 X-Stat-Signature: c937ho9q5rotswzjuu3yu4u3cksjruwp Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=rGPKDev6; dmarc=none; spf=pass (imf03.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1643422466-438658 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Maor Gottlieb Subject: tools/testing/scatterlist: add missing defines The cited commits replaced preemptible with pagefault_disabled and flush_kernel_dcache_page with flush_dcache_page respectively, hence need to update the corresponding defines in the test. scatterlist.c: In function ‘sg_miter_stop’: scatterlist.c:919:4: warning: implicit declaration of function ‘flush_dcache_page’ [-Wimplicit-function-declaration] flush_dcache_page(miter->page); ^~~~~~~~~~~~~~~~~ In file included from ./linux/scatterlist.h:8:0, from scatterlist.c:9: scatterlist.c:922:18: warning: implicit declaration of function ‘pagefault_disabled’ [-Wimplicit-function-declaration] WARN_ON_ONCE(!pagefault_disabled()); ^ ./linux/mm.h:23:25: note: in definition of macro ‘WARN_ON_ONCE’ int __ret_warn_on = !!(condition); \ ^~~~~~~~~ Link: https://lkml.kernel.org/r/20220118082105.1737320-1-maorg@nvidia.com Fixes: 723aca208516 ("mm/scatterlist: replace the !preemptible warning in sg_miter_stop()") Fixes: 0e84f5dbf8d6 ("scatterlist: replace flush_kernel_dcache_page with flush_dcache_page") Signed-off-by: Maor Gottlieb Tested-by: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Christoph Hellwig Signed-off-by: Andrew Morton --- tools/testing/scatterlist/linux/mm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/tools/testing/scatterlist/linux/mm.h~tools-testing-scatterlist-add-missing-defines +++ a/tools/testing/scatterlist/linux/mm.h @@ -74,7 +74,7 @@ static inline unsigned long page_to_phys __UNIQUE_ID(min1_), __UNIQUE_ID(min2_), \ x, y) -#define preemptible() (1) +#define pagefault_disabled() (0) static inline void *kmap(struct page *page) { @@ -127,6 +127,7 @@ kmalloc_array(unsigned int n, unsigned i #define kmemleak_free(a) #define PageSlab(p) (0) +#define flush_dcache_page(p) #define MAX_ERRNO 4095