linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: kernel test robot <lkp@intel.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	linux-arm-kernel@lists.arm.linux.org.uk,
	Russell King <rmk@arm.linux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff
Date: Sun, 8 Nov 2020 18:55:22 -0800	[thread overview]
Message-ID: <20201108185522.a581d330cd4a9b25f5cbd339@linux-foundation.org> (raw)
In-Reply-To: <30c06c32-e3dd-4ce9-606b-d5731c0ae27c@arm.com>

On Mon, 9 Nov 2020 08:20:05 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:

> 
> 
> On 11/7/20 10:37 AM, Andrew Morton wrote:
> > On Fri, 06 Nov 2020 08:19:36 +0800 kernel test robot <lkp@intel.com> 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 <ardb@kernel.org>
> + Linus Walleij <linus.walleij@linaro.org>
> 
> 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?



  reply	other threads:[~2020-11-09  2:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06  0:19 [linux-next:master] BUILD REGRESSION 0a6f624a86e766a27d23cbb73c23be62231d10ff kernel test robot
2020-11-07  5:07 ` Andrew Morton
2020-11-09  2:50   ` Anshuman Khandual
2020-11-09  2:55     ` Andrew Morton [this message]
2020-11-09  6:01       ` Anshuman Khandual
2020-11-09 15:54         ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201108185522.a581d330cd4a9b25f5cbd339@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=rmk@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).