Re: [akpm-mm:mm-unstable 300/300] include/linux/mmdebug.h:114:35: error: expected expression before 'do'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 4 Apr 2024 19:31:40 +0800 kernel test robot <lkp@xxxxxxxxx> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head:   e04f729678f630b7304f9a8d5d22819fe589681a
> commit: e04f729678f630b7304f9a8d5d22819fe589681a [300/300] __mod_memcg_lruvec_state(): enhance diagnostics
> config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240404/202404041924.UiccBz3l-lkp@xxxxxxxxx/config)
> compiler: aarch64-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240404/202404041924.UiccBz3l-lkp@xxxxxxxxx/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@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202404041924.UiccBz3l-lkp@xxxxxxxxx/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from arch/arm64/include/asm/memory.h:213,
>                     from arch/arm64/include/asm/page.h:46,
>                     from include/linux/page_counter.h:8,
>                     from mm/memcontrol.c:28:
>    mm/memcontrol.c: In function '__mod_memcg_lruvec_state':
> >> include/linux/mmdebug.h:114:35: error: expected expression before 'do'
>      114 | #define VM_WARN_ON_IRQS_ENABLED() do { } while (0)
>          |                                   ^~
>    mm/memcontrol.c:867:29: note: in expansion of macro 'VM_WARN_ON_IRQS_ENABLED'
>      867 |                         if (VM_WARN_ON_IRQS_ENABLED())
>          |                             ^~~~~~~~~~~~~~~~~~~~~~~

Thanks.  Macro is annoying.

--- a/mm/memcontrol.c~__mod_memcg_lruvec_state-enhance-diagnostics-fix
+++ a/mm/memcontrol.c
@@ -864,7 +864,8 @@ void __mod_memcg_lruvec_state(struct lru
 				pr_warn("stat item index: %d\n", idx);
 			break;
 		default:
-			if (VM_WARN_ON_IRQS_ENABLED())
+			VM_WARN_ON_IRQS_ENABLED();
+			if (!irqs_disabled())
 				pr_warn("stat item index: %d\n", idx);
 		}
 	}
_





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux