From: kernel test robot <lkp@intel.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [rmk-arm:ktext-current 1/19] include/linux/minmax.h:30:50: error: braced-group within expression allowed only inside a function
Date: Thu, 13 Jul 2023 23:49:13 +0800 [thread overview]
Message-ID: <202307132330.IUoEgOym-lkp@intel.com> (raw)
tree: git://git.armlinux.org.uk/~rmk/linux-arm ktext-current
head: 1085162f4939fd1d436ba6ec27b54c707a2a7c47
commit: b392b426ad1dad14b1f13a984fef3f8e082b58e6 [1/19] arm64: place kernel in its own L0 page table entry
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20230713/202307132330.IUoEgOym-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230713/202307132330.IUoEgOym-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/202307132330.IUoEgOym-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:27,
from arch/arm64/include/asm/cpufeature.h:25,
from arch/arm64/include/asm/ptrace.h:11,
from arch/arm64/include/asm/irqflags.h:10,
from include/linux/irqflags.h:17,
from include/linux/spinlock.h:59,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from arch/arm64/mm/ptdump.c:12:
include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:74:25: note: in expansion of macro '__careful_cmp'
74 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
arch/arm64/include/asm/memory.h:47:34: note: in expansion of macro 'max'
47 | max(MODULES_VSIZE, PGDIR_SIZE))
| ^~~
arch/arm64/include/asm/memory.h:48:34: note: in expansion of macro 'KIMAGE_VADDR'
48 | #define MODULES_END (KIMAGE_VADDR)
| ^~~~~~~~~~~~
arch/arm64/include/asm/memory.h:49:34: note: in expansion of macro 'MODULES_END'
49 | #define MODULES_VADDR (MODULES_END - MODULES_VSIZE)
| ^~~~~~~~~~~
arch/arm64/mm/ptdump.c:44:11: note: in expansion of macro 'MODULES_VADDR'
44 | { MODULES_VADDR, "Modules start" },
| ^~~~~~~~~~~~~
>> include/linux/minmax.h:30:50: error: braced-group within expression allowed only inside a function
30 | #define __cmp_once(x, y, unique_x, unique_y, op) ({ \
| ^
include/linux/minmax.h:38:17: note: in expansion of macro '__cmp_once'
38 | __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
| ^~~~~~~~~~
include/linux/minmax.h:74:25: note: in expansion of macro '__careful_cmp'
74 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
arch/arm64/include/asm/memory.h:47:34: note: in expansion of macro 'max'
47 | max(MODULES_VSIZE, PGDIR_SIZE))
| ^~~
arch/arm64/include/asm/memory.h:48:34: note: in expansion of macro 'KIMAGE_VADDR'
48 | #define MODULES_END (KIMAGE_VADDR)
| ^~~~~~~~~~~~
arch/arm64/include/asm/memory.h:49:34: note: in expansion of macro 'MODULES_END'
49 | #define MODULES_VADDR (MODULES_END - MODULES_VSIZE)
| ^~~~~~~~~~~
arch/arm64/mm/ptdump.c:44:11: note: in expansion of macro 'MODULES_VADDR'
44 | { MODULES_VADDR, "Modules start" },
| ^~~~~~~~~~~~~
include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:74:25: note: in expansion of macro '__careful_cmp'
74 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
arch/arm64/include/asm/memory.h:47:34: note: in expansion of macro 'max'
47 | max(MODULES_VSIZE, PGDIR_SIZE))
| ^~~
arch/arm64/include/asm/memory.h:48:34: note: in expansion of macro 'KIMAGE_VADDR'
48 | #define MODULES_END (KIMAGE_VADDR)
| ^~~~~~~~~~~~
arch/arm64/mm/ptdump.c:45:11: note: in expansion of macro 'MODULES_END'
45 | { MODULES_END, "Modules end" },
| ^~~~~~~~~~~
>> include/linux/minmax.h:30:50: error: braced-group within expression allowed only inside a function
30 | #define __cmp_once(x, y, unique_x, unique_y, op) ({ \
| ^
include/linux/minmax.h:38:17: note: in expansion of macro '__cmp_once'
38 | __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
| ^~~~~~~~~~
include/linux/minmax.h:74:25: note: in expansion of macro '__careful_cmp'
74 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
arch/arm64/include/asm/memory.h:47:34: note: in expansion of macro 'max'
47 | max(MODULES_VSIZE, PGDIR_SIZE))
| ^~~
arch/arm64/include/asm/memory.h:48:34: note: in expansion of macro 'KIMAGE_VADDR'
48 | #define MODULES_END (KIMAGE_VADDR)
| ^~~~~~~~~~~~
arch/arm64/mm/ptdump.c:45:11: note: in expansion of macro 'MODULES_END'
45 | { MODULES_END, "Modules end" },
| ^~~~~~~~~~~
include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^~
include/linux/minmax.h:26:18: note: in expansion of macro '__typecheck'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:74:25: note: in expansion of macro '__careful_cmp'
74 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
arch/arm64/include/asm/memory.h:47:34: note: in expansion of macro 'max'
47 | max(MODULES_VSIZE, PGDIR_SIZE))
| ^~~
arch/arm64/include/asm/memory.h:48:34: note: in expansion of macro 'KIMAGE_VADDR'
48 | #define MODULES_END (KIMAGE_VADDR)
| ^~~~~~~~~~~~
arch/arm64/include/asm/pgtable.h:24:34: note: in expansion of macro 'MODULES_END'
24 | #define VMALLOC_START (MODULES_END + PGDIR_SIZE)
| ^~~~~~~~~~~
arch/arm64/mm/ptdump.c:46:11: note: in expansion of macro 'VMALLOC_START'
46 | { VMALLOC_START, "vmalloc() area" },
| ^~~~~~~~~~~~~
>> include/linux/minmax.h:30:50: error: braced-group within expression allowed only inside a function
30 | #define __cmp_once(x, y, unique_x, unique_y, op) ({ \
| ^
include/linux/minmax.h:38:17: note: in expansion of macro '__cmp_once'
38 | __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
| ^~~~~~~~~~
include/linux/minmax.h:74:25: note: in expansion of macro '__careful_cmp'
74 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
arch/arm64/include/asm/memory.h:47:34: note: in expansion of macro 'max'
47 | max(MODULES_VSIZE, PGDIR_SIZE))
| ^~~
arch/arm64/include/asm/memory.h:48:34: note: in expansion of macro 'KIMAGE_VADDR'
48 | #define MODULES_END (KIMAGE_VADDR)
| ^~~~~~~~~~~~
arch/arm64/include/asm/pgtable.h:24:34: note: in expansion of macro 'MODULES_END'
24 | #define VMALLOC_START (MODULES_END + PGDIR_SIZE)
| ^~~~~~~~~~~
arch/arm64/mm/ptdump.c:46:11: note: in expansion of macro 'VMALLOC_START'
46 | { VMALLOC_START, "vmalloc() area" },
| ^~~~~~~~~~~~~
vim +30 include/linux/minmax.h
b296a6d53339a7 Andy Shevchenko 2020-10-15 29
b296a6d53339a7 Andy Shevchenko 2020-10-15 @30 #define __cmp_once(x, y, unique_x, unique_y, op) ({ \
b296a6d53339a7 Andy Shevchenko 2020-10-15 31 typeof(x) unique_x = (x); \
b296a6d53339a7 Andy Shevchenko 2020-10-15 32 typeof(y) unique_y = (y); \
b296a6d53339a7 Andy Shevchenko 2020-10-15 33 __cmp(unique_x, unique_y, op); })
b296a6d53339a7 Andy Shevchenko 2020-10-15 34
:::::: The code at line 30 was first introduced by commit
:::::: b296a6d53339a79082c1d2c1761e948e8b3def69 kernel.h: split out min()/max() et al. helpers
:::::: TO: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-07-13 15:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202307132330.IUoEgOym-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rmk+kernel@armlinux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.