Wycena paneli fotowoltaicznych
by Jacek Szkudlarski
Dzień dobry,
dostrzegam możliwość współpracy z Państwa firmą.
Świadczymy kompleksową obsługę inwestycji w fotowoltaikę, która obniża koszty energii elektrycznej nawet o 90%.
Czy są Państwo zainteresowani weryfikacją wstępnych propozycji?
Pozdrawiam,
Jacek Szkudlarski
7 months, 1 week
[thesofproject:pr/3427 1/2] sound/soc/sof/intel/pci-apl.c:46:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)'
by kernel test robot
tree: https://github.com/thesofproject/linux pr/3427
head: f7dc1697ebbe67bea0e2cfde9d089efabf536399
commit: abddc06728abeb7a003de76a7e6f05dd80bf1a36 [1/2] fixup! ASoC: SOF: remove const qualifier for 'struct snd_sof_dsp_ops'
config: x86_64-sof-customedconfig-sof-defconfig (https://download.01.org/0day-ci/archive/20220214/202202141556.6CCDqxvE-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/thesofproject/linux/commit/abddc06728abeb7a003de76a7e6...
git remote add thesofproject https://github.com/thesofproject/linux
git fetch --no-tags thesofproject pr/3427
git checkout abddc06728abeb7a003de76a7e6f05dd80bf1a36
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash sound/soc/sof/intel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the thesofproject/pr/3427 HEAD f7dc1697ebbe67bea0e2cfde9d089efabf536399 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
>> sound/soc/sof/intel/pci-apl.c:46:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
46 | .ops_init = sof_apl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-apl.c:46:14: note: (near initialization for 'bxt_desc.ops_init')
sound/soc/sof/intel/pci-apl.c:73:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
73 | .ops_init = sof_apl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-apl.c:73:14: note: (near initialization for 'glk_desc.ops_init')
cc1: some warnings being treated as errors
--
>> sound/soc/sof/intel/pci-cnl.c:47:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
47 | .ops_init = sof_cnl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-cnl.c:47:14: note: (near initialization for 'cnl_desc.ops_init')
sound/soc/sof/intel/pci-cnl.c:75:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
75 | .ops_init = sof_cnl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-cnl.c:75:14: note: (near initialization for 'cfl_desc.ops_init')
sound/soc/sof/intel/pci-cnl.c:103:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
103 | .ops_init = sof_cnl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-cnl.c:103:14: note: (near initialization for 'cml_desc.ops_init')
cc1: some warnings being treated as errors
--
>> sound/soc/sof/intel/pci-icl.c:47:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
47 | .ops_init = sof_icl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-icl.c:47:14: note: (near initialization for 'icl_desc.ops_init')
sound/soc/sof/intel/pci-icl.c:74:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
74 | .ops_init = sof_cnl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-icl.c:74:14: note: (near initialization for 'jsl_desc.ops_init')
cc1: some warnings being treated as errors
--
>> sound/soc/sof/intel/pci-tgl.c:47:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
47 | .ops_init = sof_tgl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-tgl.c:47:14: note: (near initialization for 'tgl_desc.ops_init')
sound/soc/sof/intel/pci-tgl.c:75:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
75 | .ops_init = sof_tgl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-tgl.c:75:14: note: (near initialization for 'tglh_desc.ops_init')
sound/soc/sof/intel/pci-tgl.c:102:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
102 | .ops_init = sof_tgl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-tgl.c:102:14: note: (near initialization for 'ehl_desc.ops_init')
sound/soc/sof/intel/pci-tgl.c:130:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
130 | .ops_init = sof_tgl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-tgl.c:130:14: note: (near initialization for 'adls_desc.ops_init')
sound/soc/sof/intel/pci-tgl.c:158:14: error: initialization of 'int (*)(struct snd_sof_dev *)' from incompatible pointer type 'void (*)(struct snd_sof_dev *)' [-Werror=incompatible-pointer-types]
158 | .ops_init = sof_tgl_ops_init,
| ^~~~~~~~~~~~~~~~
sound/soc/sof/intel/pci-tgl.c:158:14: note: (near initialization for 'adl_desc.ops_init')
cc1: some warnings being treated as errors
vim +46 sound/soc/sof/intel/pci-apl.c
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 21
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 22 static const struct sof_dev_desc bxt_desc = {
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 23 .machines = snd_soc_acpi_intel_bxt_machines,
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 24 .use_acpi_target_states = true,
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 25 .resindex_lpe_base = 0,
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 26 .resindex_pcicfg_base = -1,
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 27 .resindex_imr_base = -1,
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 28 .irqindex_host_ipc = -1,
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 29 .chip_info = &apl_chip_info,
d7fb0e1b5b07fa8 Pierre-Louis Bossart 2021-12-10 30 .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
d7fb0e1b5b07fa8 Pierre-Louis Bossart 2021-12-10 31 .ipc_default = SOF_IPC,
ed74ea3027df008 Pierre-Louis Bossart 2021-12-10 32 .default_fw_path = {
ed74ea3027df008 Pierre-Louis Bossart 2021-12-10 33 [SOF_IPC] = "intel/sof",
d7fb0e1b5b07fa8 Pierre-Louis Bossart 2021-12-10 34 [SOF_INTEL_IPC4] = "intel/avs/apl",
ed74ea3027df008 Pierre-Louis Bossart 2021-12-10 35 },
ed74ea3027df008 Pierre-Louis Bossart 2021-12-10 36 .default_tplg_path = {
ed74ea3027df008 Pierre-Louis Bossart 2021-12-10 37 [SOF_IPC] = "intel/sof-tplg",
d7fb0e1b5b07fa8 Pierre-Louis Bossart 2021-12-10 38 [SOF_INTEL_IPC4] = "intel/avs-tplg",
ed74ea3027df008 Pierre-Louis Bossart 2021-12-10 39 },
240267dad6a45b5 Pierre-Louis Bossart 2021-12-13 40 .default_fw_filename = {
240267dad6a45b5 Pierre-Louis Bossart 2021-12-13 41 [SOF_IPC] = "sof-apl.ri",
240267dad6a45b5 Pierre-Louis Bossart 2021-12-13 42 [SOF_INTEL_IPC4] = "dsp_basefw.bin",
240267dad6a45b5 Pierre-Louis Bossart 2021-12-13 43 },
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 44 .nocodec_tplg_filename = "sof-apl-nocodec.tplg",
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 45 .ops = &sof_apl_ops,
99350688e8bbc6a Pierre-Louis Bossart 2022-01-31 @46 .ops_init = sof_apl_ops_init,
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 47 };
8ad061775dfc3b0 Pierre-Louis Bossart 2021-01-12 48
:::::: The code at line 46 was first introduced by commit
:::::: 99350688e8bbc6a75495daaa40e837820baecefd ASoC: SOF: Intel: hda: use common ops across platforms
:::::: TO: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
:::::: CC: Kai Vehmanen <kai.vehmanen(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH] random: do not take pool spinlock at boot
by kernel test robot
Hi "Jason,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20220211]
[cannot apply to char-misc/char-misc-testing linux/master linus/master v5.17-rc3 v5.17-rc2 v5.17-rc1 v5.17-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jason-A-Donenfeld/random-do-not-...
base: 6d9bd4ad4ca08b1114e814c2c42383b8b13be631
config: um-x86_64_defconfig (https://download.01.org/0day-ci/archive/20220212/202202121318.QSBkUcwP-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/cac377f6ab22a8bfe966643ebe19812e8...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jason-A-Donenfeld/random-do-not-take-pool-spinlock-at-boot/20220212-083131
git checkout cac377f6ab22a8bfe966643ebe19812e8187de3b
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/char/random.c: In function 'rand_initialize':
>> drivers/char/random.c:162:3: error: implicit declaration of function '_mix_pool_bytes'; did you mean 'mix_pool_bytes'? [-Werror=implicit-function-declaration]
162 | _mix_pool_bytes(&rv, sizeof(rv));
| ^~~~~~~~~~~~~~~
| mix_pool_bytes
drivers/char/random.c: At top level:
drivers/char/random.c:822:13: warning: conflicting types for '_mix_pool_bytes'
822 | static void _mix_pool_bytes(const void *in, size_t nbytes)
| ^~~~~~~~~~~~~~~
>> drivers/char/random.c:822:13: error: static declaration of '_mix_pool_bytes' follows non-static declaration
drivers/char/random.c:162:3: note: previous implicit declaration of '_mix_pool_bytes' was here
162 | _mix_pool_bytes(&rv, sizeof(rv));
| ^~~~~~~~~~~~~~~
drivers/char/random.c:1109:6: warning: no previous prototype for 'add_hwgenerator_randomness' [-Wmissing-prototypes]
1109 | void add_hwgenerator_randomness(const void *buffer, size_t count,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +162 drivers/char/random.c
138
139 /*
140 * Note that setup_arch() may call add_device_randomness()
141 * long before we get here. This allows seeding of the pools
142 * with some platform dependent data very early in the boot
143 * process. But it limits our options here. We must use
144 * statically allocated structures that already have all
145 * initializations complete at compile time. We should also
146 * take care not to overwrite the precious per platform data
147 * we were given.
148 */
149 int __init rand_initialize(void)
150 {
151 size_t i;
152 ktime_t now = ktime_get_real();
153 bool arch_init = true;
154 unsigned long rv;
155
156 for (i = BLAKE2S_BLOCK_SIZE; i > 0; i -= sizeof(rv)) {
157 if (!arch_get_random_seed_long_early(&rv) &&
158 !arch_get_random_long_early(&rv)) {
159 rv = random_get_entropy();
160 arch_init = false;
161 }
> 162 _mix_pool_bytes(&rv, sizeof(rv));
163 }
164 _mix_pool_bytes(&now, sizeof(now));
165 _mix_pool_bytes(utsname(), sizeof(*(utsname())));
166
167 extract_entropy(base_crng.key, sizeof(base_crng.key));
168 ++base_crng.generation;
169
170 if (arch_init && trust_cpu && crng_init < 2) {
171 crng_init = 2;
172 pr_notice("crng init done (trusting CPU's manufacturer)\n");
173 }
174
175 if (ratelimit_disable) {
176 urandom_warning.interval = 0;
177 unseeded_warning.interval = 0;
178 }
179 return 0;
180 }
181
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, compound_head) == offsetof(struct folio, lru)"
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: 7b230db3b8d373219f88a3d25c8fbbf12cc7f233 mm: Introduce struct folio
date: 5 months ago
config: parisc-randconfig-r004-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131828.VxAopBqR-lk...)
compiler: hppa64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7b230db3b8d373219f88a3d25c8fbbf12cc7f233
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/parisc/include/asm/bitops.h:203,
from include/linux/bitops.h:33,
from include/linux/kernel.h:12,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/bitops/__fls.h: In function '__fls':
include/asm-generic/bitops/__fls.h:18:28: warning: left shift count >= width of type [-Wshift-count-overflow]
18 | if (!(word & (~0ul << 32))) {
| ^~
include/asm-generic/bitops/__fls.h:20:22: warning: left shift count >= width of type [-Wshift-count-overflow]
20 | word <<= 32;
| ^~~
include/asm-generic/bitops/__fls.h:23:28: warning: left shift count >= width of type [-Wshift-count-overflow]
23 | if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
| ^~
include/asm-generic/bitops/__fls.h:27:28: warning: left shift count >= width of type [-Wshift-count-overflow]
27 | if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
| ^~
include/asm-generic/bitops/__fls.h:31:28: warning: left shift count >= width of type [-Wshift-count-overflow]
31 | if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
| ^~
include/asm-generic/bitops/__fls.h:35:28: warning: left shift count >= width of type [-Wshift-count-overflow]
35 | if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
| ^~
include/asm-generic/bitops/__fls.h:39:28: warning: left shift count >= width of type [-Wshift-count-overflow]
39 | if (!(word & (~0ul << (BITS_PER_LONG-1))))
| ^~
In file included from arch/parisc/include/asm/bitops.h:203,
from include/linux/bitops.h:33,
from include/linux/kernel.h:12,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from arch/parisc/kernel/asm-offsets.c:18:
include/asm-generic/bitops/__fls.h: In function '__fls':
include/asm-generic/bitops/__fls.h:18:28: warning: left shift count >= width of type [-Wshift-count-overflow]
18 | if (!(word & (~0ul << 32))) {
| ^~
include/asm-generic/bitops/__fls.h:20:22: warning: left shift count >= width of type [-Wshift-count-overflow]
20 | word <<= 32;
| ^~~
include/asm-generic/bitops/__fls.h:23:28: warning: left shift count >= width of type [-Wshift-count-overflow]
23 | if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
| ^~
include/asm-generic/bitops/__fls.h:27:28: warning: left shift count >= width of type [-Wshift-count-overflow]
27 | if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
| ^~
include/asm-generic/bitops/__fls.h:31:28: warning: left shift count >= width of type [-Wshift-count-overflow]
31 | if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
| ^~
include/asm-generic/bitops/__fls.h:35:28: warning: left shift count >= width of type [-Wshift-count-overflow]
35 | if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
| ^~
include/asm-generic/bitops/__fls.h:39:28: warning: left shift count >= width of type [-Wshift-count-overflow]
39 | if (!(word & (~0ul << (BITS_PER_LONG-1))))
| ^~
In file included from arch/parisc/include/asm/processor.h:17,
from arch/parisc/include/asm/thread_info.h:8,
from include/linux/thread_info.h:60,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from arch/parisc/kernel/asm-offsets.c:18:
arch/parisc/include/asm/pdc.h: At top level:
arch/parisc/include/asm/pdc.h:75:24: warning: 'struct pdc_memory_table' declared inside parameter list will not be visible outside of this definition or declaration
75 | struct pdc_memory_table *tbl, unsigned long entries);
| ^~~~~~~~~~~~~~~~
arch/parisc/include/asm/pdc.h:74:30: warning: 'struct pdc_memory_table_raddr' declared inside parameter list will not be visible outside of this definition or declaration
74 | int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/compiler_types.h:65,
from <command-line>:
include/linux/smp.h:34:33: error: requested alignment '20' is not a positive power of 2
34 | __aligned(sizeof(struct __call_single_data));
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler_attributes.h:33:68: note: in definition of macro '__aligned'
33 | #define __aligned(x) __attribute__((__aligned__(x)))
| ^
In file included from include/linux/bits.h:22,
from include/linux/bitops.h:6,
from include/linux/kernel.h:12,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from arch/parisc/kernel/asm-offsets.c:18:
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, lru) == offsetof(struct folio, lru)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
289 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:291:1: note: in expansion of macro 'FOLIO_MATCH'
291 | FOLIO_MATCH(lru, lru);
| ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, compound_head) == offsetof(struct folio, lru)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
289 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:292:1: note: in expansion of macro 'FOLIO_MATCH'
292 | FOLIO_MATCH(compound_head, lru);
| ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, index) == offsetof(struct folio, index)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
289 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:293:1: note: in expansion of macro 'FOLIO_MATCH'
293 | FOLIO_MATCH(index, index);
| ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, private) == offsetof(struct folio, private)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
289 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:294:1: note: in expansion of macro 'FOLIO_MATCH'
294 | FOLIO_MATCH(private, private);
| ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, _mapcount) == offsetof(struct folio, _mapcount)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
289 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:295:1: note: in expansion of macro 'FOLIO_MATCH'
295 | FOLIO_MATCH(_mapcount, _mapcount);
| ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, _refcount) == offsetof(struct folio, _refcount)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
289 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:296:1: note: in expansion of macro 'FOLIO_MATCH'
296 | FOLIO_MATCH(_refcount, _refcount);
| ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, memcg_data) == offsetof(struct folio, memcg_data)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:289:9: note: in expansion of macro 'static_assert'
289 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:298:1: note: in expansion of macro 'FOLIO_MATCH'
298 | FOLIO_MATCH(memcg_data, memcg_data);
| ^~~~~~~~~~~
In file included from include/linux/mm.h:33,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/parisc/kernel/asm-offsets.c:20:
include/linux/pgtable.h: In function 'pud_index':
include/linux/pgtable.h:77:25: warning: right shift count >= width of type [-Wshift-count-overflow]
77 | return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1);
| ^~
include/linux/pgtable.h: In function 'pgd_offset_pgd':
include/linux/pgtable.h:84:29: warning: right shift count >= width of type [-Wshift-count-overflow]
84 | #define pgd_index(a) (((a) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
| ^~
include/linux/pgtable.h:124:23: note: in expansion of macro 'pgd_index'
124 | return (pgd + pgd_index(address));
| ^~~~~~~~~
In file included from include/linux/stringhash.h:7,
from include/linux/dcache.h:15,
from include/linux/fs.h:8,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:727,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/parisc/kernel/asm-offsets.c:20:
include/linux/hash.h: In function 'hash32_ptr':
include/linux/hash.h:99:21: warning: right shift count >= width of type [-Wshift-count-overflow]
99 | val ^= (val >> 32);
| ^~
In file included from arch/parisc/kernel/asm-offsets.c:22:
arch/parisc/kernel/asm-offsets.c: In function 'main':
arch/parisc/kernel/asm-offsets.c:270:43: warning: right shift count >= width of type [-Wshift-count-overflow]
270 | DEFINE(ASM_PGD_ENTRY, PAGE_OFFSET >> PGDIR_SHIFT);
| ^~
include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
make[2]: *** [scripts/Makefile.build:121: arch/parisc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1219: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +78 include/linux/build_bug.h
bc6245e5efd70c Ian Abbott 2017-07-10 60
6bab69c65013be Rasmus Villemoes 2019-03-07 61 /**
6bab69c65013be Rasmus Villemoes 2019-03-07 62 * static_assert - check integer constant expression at build time
6bab69c65013be Rasmus Villemoes 2019-03-07 63 *
6bab69c65013be Rasmus Villemoes 2019-03-07 64 * static_assert() is a wrapper for the C11 _Static_assert, with a
6bab69c65013be Rasmus Villemoes 2019-03-07 65 * little macro magic to make the message optional (defaulting to the
6bab69c65013be Rasmus Villemoes 2019-03-07 66 * stringification of the tested expression).
6bab69c65013be Rasmus Villemoes 2019-03-07 67 *
6bab69c65013be Rasmus Villemoes 2019-03-07 68 * Contrary to BUILD_BUG_ON(), static_assert() can be used at global
6bab69c65013be Rasmus Villemoes 2019-03-07 69 * scope, but requires the expression to be an integer constant
6bab69c65013be Rasmus Villemoes 2019-03-07 70 * expression (i.e., it is not enough that __builtin_constant_p() is
6bab69c65013be Rasmus Villemoes 2019-03-07 71 * true for expr).
6bab69c65013be Rasmus Villemoes 2019-03-07 72 *
6bab69c65013be Rasmus Villemoes 2019-03-07 73 * Also note that BUILD_BUG_ON() fails the build if the condition is
6bab69c65013be Rasmus Villemoes 2019-03-07 74 * true, while static_assert() fails the build if the expression is
6bab69c65013be Rasmus Villemoes 2019-03-07 75 * false.
6bab69c65013be Rasmus Villemoes 2019-03-07 76 */
6bab69c65013be Rasmus Villemoes 2019-03-07 77 #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
6bab69c65013be Rasmus Villemoes 2019-03-07 @78 #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
6bab69c65013be Rasmus Villemoes 2019-03-07 79
:::::: The code at line 78 was first introduced by commit
:::::: 6bab69c65013bed5fce9f101a64a84d0385b3946 build_bug.h: add wrapper for _Static_assert
:::::: TO: Rasmus Villemoes <linux(a)rasmusvillemoes.dk>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, mapping) == offsetof(struct folio, mapping)"
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: 536f4217ced62b671bd759f6b549621a5654a70f mm: page->mapping folio->mapping should have the same offset
date: 2 weeks ago
config: parisc-randconfig-r004-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131932.diaqTbxo-lk...)
compiler: hppa64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 536f4217ced62b671bd759f6b549621a5654a70f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
18 | if (!(word & (~0ul << 32))) {
| ^~
include/asm-generic/bitops/__fls.h:20:22: warning: left shift count >= width of type [-Wshift-count-overflow]
20 | word <<= 32;
| ^~~
include/asm-generic/bitops/__fls.h:23:28: warning: left shift count >= width of type [-Wshift-count-overflow]
23 | if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
| ^~
include/asm-generic/bitops/__fls.h:27:28: warning: left shift count >= width of type [-Wshift-count-overflow]
27 | if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
| ^~
include/asm-generic/bitops/__fls.h:31:28: warning: left shift count >= width of type [-Wshift-count-overflow]
31 | if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
| ^~
include/asm-generic/bitops/__fls.h:35:28: warning: left shift count >= width of type [-Wshift-count-overflow]
35 | if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
| ^~
include/asm-generic/bitops/__fls.h:39:28: warning: left shift count >= width of type [-Wshift-count-overflow]
39 | if (!(word & (~0ul << (BITS_PER_LONG-1))))
| ^~
In file included from arch/parisc/include/asm/bitops.h:201,
from include/linux/bitops.h:33,
from include/linux/kernel.h:22,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5,
from ./arch/parisc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/parisc/kernel/asm-offsets.c:18:
include/asm-generic/bitops/__fls.h: In function '__fls':
include/asm-generic/bitops/__fls.h:18:28: warning: left shift count >= width of type [-Wshift-count-overflow]
18 | if (!(word & (~0ul << 32))) {
| ^~
include/asm-generic/bitops/__fls.h:20:22: warning: left shift count >= width of type [-Wshift-count-overflow]
20 | word <<= 32;
| ^~~
include/asm-generic/bitops/__fls.h:23:28: warning: left shift count >= width of type [-Wshift-count-overflow]
23 | if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
| ^~
include/asm-generic/bitops/__fls.h:27:28: warning: left shift count >= width of type [-Wshift-count-overflow]
27 | if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
| ^~
include/asm-generic/bitops/__fls.h:31:28: warning: left shift count >= width of type [-Wshift-count-overflow]
31 | if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
| ^~
include/asm-generic/bitops/__fls.h:35:28: warning: left shift count >= width of type [-Wshift-count-overflow]
35 | if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
| ^~
include/asm-generic/bitops/__fls.h:39:28: warning: left shift count >= width of type [-Wshift-count-overflow]
39 | if (!(word & (~0ul << (BITS_PER_LONG-1))))
| ^~
In file included from arch/parisc/include/asm/processor.h:18,
from arch/parisc/include/asm/thread_info.h:6,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/parisc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/parisc/kernel/asm-offsets.c:18:
arch/parisc/include/asm/pdc.h: At top level:
arch/parisc/include/asm/pdc.h:77:24: warning: 'struct pdc_memory_table' declared inside parameter list will not be visible outside of this definition or declaration
77 | struct pdc_memory_table *tbl, unsigned long entries);
| ^~~~~~~~~~~~~~~~
arch/parisc/include/asm/pdc.h:76:30: warning: 'struct pdc_memory_table_raddr' declared inside parameter list will not be visible outside of this definition or declaration
76 | int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/compiler_types.h:65,
from <command-line>:
include/linux/smp.h:34:33: error: requested alignment '20' is not a positive power of 2
34 | __aligned(sizeof(struct __call_single_data));
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler_attributes.h:33:68: note: in definition of macro '__aligned'
33 | #define __aligned(x) __attribute__((__aligned__(x)))
| ^
In file included from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/parisc/kernel/asm-offsets.c:18:
include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, lru) == offsetof(struct folio, lru)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:261:9: note: in expansion of macro 'static_assert'
261 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:263:1: note: in expansion of macro 'FOLIO_MATCH'
263 | FOLIO_MATCH(lru, lru);
| ^~~~~~~~~~~
>> include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, mapping) == offsetof(struct folio, mapping)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:261:9: note: in expansion of macro 'static_assert'
261 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:264:1: note: in expansion of macro 'FOLIO_MATCH'
264 | FOLIO_MATCH(mapping, mapping);
| ^~~~~~~~~~~
include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, compound_head) == offsetof(struct folio, lru)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:261:9: note: in expansion of macro 'static_assert'
261 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:265:1: note: in expansion of macro 'FOLIO_MATCH'
265 | FOLIO_MATCH(compound_head, lru);
| ^~~~~~~~~~~
include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, index) == offsetof(struct folio, index)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:261:9: note: in expansion of macro 'static_assert'
261 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:266:1: note: in expansion of macro 'FOLIO_MATCH'
266 | FOLIO_MATCH(index, index);
| ^~~~~~~~~~~
include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, private) == offsetof(struct folio, private)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:261:9: note: in expansion of macro 'static_assert'
261 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:267:1: note: in expansion of macro 'FOLIO_MATCH'
267 | FOLIO_MATCH(private, private);
| ^~~~~~~~~~~
include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, _mapcount) == offsetof(struct folio, _mapcount)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:261:9: note: in expansion of macro 'static_assert'
261 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:268:1: note: in expansion of macro 'FOLIO_MATCH'
268 | FOLIO_MATCH(_mapcount, _mapcount);
| ^~~~~~~~~~~
include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, _refcount) == offsetof(struct folio, _refcount)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:261:9: note: in expansion of macro 'static_assert'
261 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:269:1: note: in expansion of macro 'FOLIO_MATCH'
269 | FOLIO_MATCH(_refcount, _refcount);
| ^~~~~~~~~~~
include/linux/build_bug.h:78:41: error: static assertion failed: "offsetof(struct page, memcg_data) == offsetof(struct folio, memcg_data)"
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
| ^~~~~~~~~~~~~~~
include/linux/mm_types.h:261:9: note: in expansion of macro 'static_assert'
261 | static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
| ^~~~~~~~~~~~~
include/linux/mm_types.h:271:1: note: in expansion of macro 'FOLIO_MATCH'
271 | FOLIO_MATCH(memcg_data, memcg_data);
| ^~~~~~~~~~~
In file included from include/linux/mm.h:33,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from arch/parisc/kernel/asm-offsets.c:20:
include/linux/pgtable.h: In function 'pud_index':
include/linux/pgtable.h:77:25: warning: right shift count >= width of type [-Wshift-count-overflow]
77 | return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1);
| ^~
include/linux/pgtable.h: In function 'pgd_offset_pgd':
include/linux/pgtable.h:84:29: warning: right shift count >= width of type [-Wshift-count-overflow]
84 | #define pgd_index(a) (((a) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
| ^~
include/linux/pgtable.h:124:23: note: in expansion of macro 'pgd_index'
124 | return (pgd + pgd_index(address));
| ^~~~~~~~~
In file included from include/linux/stringhash.h:7,
from include/linux/dcache.h:15,
vim +78 include/linux/build_bug.h
bc6245e5efd70c Ian Abbott 2017-07-10 60
6bab69c65013be Rasmus Villemoes 2019-03-07 61 /**
6bab69c65013be Rasmus Villemoes 2019-03-07 62 * static_assert - check integer constant expression at build time
6bab69c65013be Rasmus Villemoes 2019-03-07 63 *
6bab69c65013be Rasmus Villemoes 2019-03-07 64 * static_assert() is a wrapper for the C11 _Static_assert, with a
6bab69c65013be Rasmus Villemoes 2019-03-07 65 * little macro magic to make the message optional (defaulting to the
6bab69c65013be Rasmus Villemoes 2019-03-07 66 * stringification of the tested expression).
6bab69c65013be Rasmus Villemoes 2019-03-07 67 *
6bab69c65013be Rasmus Villemoes 2019-03-07 68 * Contrary to BUILD_BUG_ON(), static_assert() can be used at global
6bab69c65013be Rasmus Villemoes 2019-03-07 69 * scope, but requires the expression to be an integer constant
6bab69c65013be Rasmus Villemoes 2019-03-07 70 * expression (i.e., it is not enough that __builtin_constant_p() is
6bab69c65013be Rasmus Villemoes 2019-03-07 71 * true for expr).
6bab69c65013be Rasmus Villemoes 2019-03-07 72 *
6bab69c65013be Rasmus Villemoes 2019-03-07 73 * Also note that BUILD_BUG_ON() fails the build if the condition is
6bab69c65013be Rasmus Villemoes 2019-03-07 74 * true, while static_assert() fails the build if the expression is
6bab69c65013be Rasmus Villemoes 2019-03-07 75 * false.
6bab69c65013be Rasmus Villemoes 2019-03-07 76 */
6bab69c65013be Rasmus Villemoes 2019-03-07 77 #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
6bab69c65013be Rasmus Villemoes 2019-03-07 @78 #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
6bab69c65013be Rasmus Villemoes 2019-03-07 79
:::::: The code at line 78 was first introduced by commit
:::::: 6bab69c65013bed5fce9f101a64a84d0385b3946 build_bug.h: add wrapper for _Static_assert
:::::: TO: Rasmus Villemoes <linux(a)rasmusvillemoes.dk>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week