From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 C7EDFC4742C for ; Mon, 9 Nov 2020 02:55:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3F492206F4 for ; Mon, 9 Nov 2020 02:55:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="R7BqR31z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F492206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B13436B0068; Sun, 8 Nov 2020 21:55:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AC2E66B006C; Sun, 8 Nov 2020 21:55:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 989856B006E; Sun, 8 Nov 2020 21:55:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0122.hostedemail.com [216.40.44.122]) by kanga.kvack.org (Postfix) with ESMTP id 6A3066B0068 for ; Sun, 8 Nov 2020 21:55:25 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0A8E38249980 for ; Mon, 9 Nov 2020 02:55:25 +0000 (UTC) X-FDA: 77463363810.14.blood09_5112396272e9 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id D571A1822987A for ; Mon, 9 Nov 2020 02:55:24 +0000 (UTC) X-HE-Tag: blood09_5112396272e9 X-Filterd-Recvd-Size: 4399 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Mon, 9 Nov 2020 02:55:24 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DEA4206D8; Mon, 9 Nov 2020 02:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604890523; bh=YPEdFNEQ6eLibuoeixxr9UjjbtOYmtxrQe3Xo8Njf1w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=R7BqR31zCWgVk/7ihLwuhGKRih7BksIIu6vrPpovvIRTND8xaXUzrXjLh4M5UfVCQ ELDVaWqSab+l5eilnvfWUvw4nPFoAsIRdEOpfMsebaAhG3b/qGfjNmbT+X5KAxb5He rup8Q3vfX0u/9WPB96vC2SmigsCViWEqviTi8DYI= Date: Sun, 8 Nov 2020 18:55:22 -0800 From: Andrew Morton To: Anshuman Khandual Cc: kernel test robot , Linux Memory Management List , linux-arm-kernel@lists.arm.linux.org.uk, Russell King , Catalin Marinas , Linus Walleij , Ard Biesheuvel Subject: Re: [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff Message-Id: <20201108185522.a581d330cd4a9b25f5cbd339@linux-foundation.org> In-Reply-To: <30c06c32-e3dd-4ce9-606b-d5731c0ae27c@arm.com> References: <5fa49698.Vu2O3r+dU20UoEJ+%lkp@intel.com> <20201106210721.42351b86042b54d7d2c280e5@linux-foundation.org> <30c06c32-e3dd-4ce9-606b-d5731c0ae27c@arm.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: On Mon, 9 Nov 2020 08:20:05 +0530 Anshuman Khandual wrote: > > > On 11/7/20 10:37 AM, Andrew Morton wrote: > > On Fri, 06 Nov 2020 08:19:36 +0800 kernel test robot wrote: > > > >> tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > >> branch HEAD: 0a6f624a86e766a27d23cbb73c23be62231d10ff Add linux-next specific files for 20201105 > >> > >> Error/Warning reports: > >> > >> https://lore.kernel.org/linux-mm/202010281624.9m2gZw45-lkp@intel.com > >> https://lore.kernel.org/linux-mm/202010290238.M1tDrV8p-lkp@intel.com > >> https://lore.kernel.org/linux-mm/202010291054.WEZO3olr-lkp@intel.com > >> https://lore.kernel.org/linux-mm/202011020749.5XQ3Hfzc-lkp@intel.com > >> > >> ... > >> > >> mm/kasan/init.c:318:9: warning: variable 'pud' set but not used [-Wunused-but-set-variable] > >> > > > > This is because mm/kasan/init.c does > > > > static void kasan_free_pud(pud_t *pud_start, p4d_t *p4d) > > { > > pud_t *pud; > > int i; > > > > for (i = 0; i < PTRS_PER_PUD; i++) { > > pud = pud_start + i; > > if (!pud_none(*pud)) > > return; > > } > > > > pud_free(&init_mm, (pud_t *)page_to_virt(p4d_page(*p4d))); > > p4d_clear(p4d); > > } > > > > but arch/arm/include/asm/pgtable-2level.h does > > > > #define pud_none(pud) (0) > > > > The solution here is for the arm implementation to reference `pud'. > > Typically this is done via the use of an empty static inline C function > > rather than a macro. But really all of these > > > > #define pud_none(pud) (0) > > #define pud_bad(pud) (0) > > #define pud_present(pud) (1) > > #define pud_clear(pudp) do { } while (0) > > #define set_pud(pud,pudp) do { } while (0) > > > > should be thus converted. > > > > Could someone in arm world please attend to this? > > + Ard Biesheuvel > + Linus Walleij > > There were some earlier discussions to solve this in a different way. > > https://lore.kernel.org/linux-mm/CACRpkdbAXCMTW--BmVs8SQ_u5baaeUob+U57E=4=CrMxWtMO2g@mail.gmail.com/ > > with a subsequent follow up patch. > > https://lore.kernel.org/linux-arm-kernel/20201106085157.11211-1-linus.walleij@linaro.org/ Yes, but why? macros-pretending-to-be-functions just keep on causing problems and they're so unnecessary. Why not just write functions in the first place?? Did anyone try implementing that?