linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: Balbir Singh <balbirs@nvidia.com>,
	oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [akpm-mm:mm-unstable 39/428] include/linux/pgtable.h:235:36: error: expected expression before 'do'
Date: Fri, 12 Sep 2025 23:03:13 -0700	[thread overview]
Message-ID: <20250912230313.117341d5491a3145e7bcf311@linux-foundation.org> (raw)
In-Reply-To: <202509131255.x9EfvIGt-lkp@intel.com>

On Sat, 13 Sep 2025 12:53:27 +0800 kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head:   8ded915c4409a5190b1c9c57c172d62ab5534274
> commit: f6748cc302fdca7c486c6098f315bd4174f5c614 [39/428] kasan: Fix warnings caused by use of arch_enter_lazy_mmu_mode()
> config: s390-randconfig-002-20250913 (https://download.01.org/0day-ci/archive/20250913/202509131255.x9EfvIGt-lkp@intel.com/config)
> compiler: s390-linux-gcc (GCC) 8.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250913/202509131255.x9EfvIGt-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202509131255.x9EfvIGt-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/linux/kasan.h:37,
>                     from mm/kasan/shadow.c:14:
>    mm/kasan/shadow.c: In function 'kasan_populate_vmalloc_pte':
> >> include/linux/pgtable.h:235:36: error: expected expression before 'do'
>     #define arch_enter_lazy_mmu_mode() do {} while (0)
>                                        ^~
>    mm/kasan/shadow.c:322:8: note: in expansion of macro 'arch_enter_lazy_mmu_mode'
>      (void)arch_enter_lazy_mmu_mode();
>            ^~~~~~~~~~~~~~~~~~~~~~~~
>    mm/kasan/shadow.c: In function 'kasan_depopulate_vmalloc_pte':
> >> include/linux/pgtable.h:235:36: error: expected expression before 'do'
>     #define arch_enter_lazy_mmu_mode() do {} while (0)
>                                     ^~

Huh, thanks.  Another reason why static inlines are better than macros.

>    mm/kasan/shadow.c:497:8: note: in expansion of macro 'arch_enter_lazy_mmu_mode'
>      (void)arch_enter_lazy_mmu_mode();
>            ^~~~~~~~~~~~~~~~~~~~~~~~

You can't do that with them!

I'll add this.

--- a/mm/kasan/shadow.c~kasan-fix-warnings-caused-by-use-of-arch_enter_lazy_mmu_mode-fix
+++ a/mm/kasan/shadow.c
@@ -319,7 +319,7 @@ static int kasan_populate_vmalloc_pte(pt
 	}
 	spin_unlock(&init_mm.page_table_lock);
 
-	(void)arch_enter_lazy_mmu_mode();
+	arch_enter_lazy_mmu_mode();
 
 	return 0;
 }
@@ -494,7 +494,7 @@ static int kasan_depopulate_vmalloc_pte(
 	if (likely(!none))
 		__free_page(pfn_to_page(pte_pfn(pte)));
 
-	(void)arch_enter_lazy_mmu_mode();
+	arch_enter_lazy_mmu_mode();
 
 	return 0;
 }
_



  reply	other threads:[~2025-09-13  6:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-13  4:53 kernel test robot
2025-09-13  6:03 ` Andrew Morton [this message]
2025-09-13 22:57   ` Balbir Singh
2025-09-14  0:06     ` Andrew Morton

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=20250912230313.117341d5491a3145e7bcf311@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=balbirs@nvidia.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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