tree:
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
kunit-fixes
head: c1610aae495bae98319445d322a875556bbe3cba
commit: 8f0877c26e4b695f824c5dbcc4b964ce238328aa [14/24] thunderbolt: test: Remove some
casts which are no longer required
config: sparc-randconfig-r015-20210622 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.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/shuah/linux-kselftest.git...
git remote add kselftest
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
git fetch --no-tags kselftest kunit-fixes
git checkout 8f0877c26e4b695f824c5dbcc4b964ce238328aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
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 drivers/thunderbolt/test.c:9:
drivers/thunderbolt/test.c: In function 'tb_test_path_single_hop_walk':
> drivers/thunderbolt/test.c:387:25: error: 'typeof'
applied to a bit-field
387 | KUNIT_EXPECT_EQ(test, p->config.type,
test_data[i].type);
| ^
include/kunit/test.h:776:9: note: in definition of macro
'KUNIT_BASE_BINARY_ASSERTION'
776 | typeof(left) __left = (left); \
| ^~~~
include/kunit/test.h:890:2: note: in expansion of macro
'KUNIT_BASE_EQ_MSG_ASSERTION'
890 | KUNIT_BASE_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:900:2: note: in expansion of macro
'KUNIT_BINARY_EQ_MSG_ASSERTION'
900 | KUNIT_BINARY_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:1263:2: note: in expansion of macro
'KUNIT_BINARY_EQ_ASSERTION'
1263 | KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/thunderbolt/test.c:387:3: note: in expansion of macro
'KUNIT_EXPECT_EQ'
387 | KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
| ^~~~~~~~~~~~~~~
drivers/thunderbolt/test.c:398:25: error: 'typeof' applied to a bit-field
398 | KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
| ^
include/kunit/test.h:776:9: note: in definition of macro
'KUNIT_BASE_BINARY_ASSERTION'
776 | typeof(left) __left = (left); \
| ^~~~
include/kunit/test.h:890:2: note: in expansion of macro
'KUNIT_BASE_EQ_MSG_ASSERTION'
890 | KUNIT_BASE_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:900:2: note: in expansion of macro
'KUNIT_BINARY_EQ_MSG_ASSERTION'
900 | KUNIT_BINARY_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:1263:2: note: in expansion of macro
'KUNIT_BINARY_EQ_ASSERTION'
1263 | KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/thunderbolt/test.c:398:3: note: in expansion of macro
'KUNIT_EXPECT_EQ'
398 | KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
| ^~~~~~~~~~~~~~~
drivers/thunderbolt/test.c: In function 'tb_test_path_daisy_chain_walk':
drivers/thunderbolt/test.c:444:25: error: 'typeof' applied to a bit-field
444 | KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
| ^
include/kunit/test.h:776:9: note: in definition of macro
'KUNIT_BASE_BINARY_ASSERTION'
776 | typeof(left) __left = (left); \
| ^~~~
include/kunit/test.h:890:2: note: in expansion of macro
'KUNIT_BASE_EQ_MSG_ASSERTION'
890 | KUNIT_BASE_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:900:2: note: in expansion of macro
'KUNIT_BINARY_EQ_MSG_ASSERTION'
900 | KUNIT_BINARY_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:1263:2: note: in expansion of macro
'KUNIT_BINARY_EQ_ASSERTION'
1263 | KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/thunderbolt/test.c:444:3: note: in expansion of macro
'KUNIT_EXPECT_EQ'
444 | KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
| ^~~~~~~~~~~~~~~
drivers/thunderbolt/test.c:455:25: error: 'typeof' applied to a bit-field
455 | KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
| ^
include/kunit/test.h:776:9: note: in definition of macro
'KUNIT_BASE_BINARY_ASSERTION'
776 | typeof(left) __left = (left); \
| ^~~~
include/kunit/test.h:890:2: note: in expansion of macro
'KUNIT_BASE_EQ_MSG_ASSERTION'
890 | KUNIT_BASE_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:900:2: note: in expansion of macro
'KUNIT_BINARY_EQ_MSG_ASSERTION'
900 | KUNIT_BINARY_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:1263:2: note: in expansion of macro
'KUNIT_BINARY_EQ_ASSERTION'
1263 | KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/thunderbolt/test.c:455:3: note: in expansion of macro
'KUNIT_EXPECT_EQ'
455 | KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
| ^~~~~~~~~~~~~~~
drivers/thunderbolt/test.c: In function 'tb_test_path_simple_tree_walk':
drivers/thunderbolt/test.c:505:25: error: 'typeof' applied to a bit-field
505 | KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
| ^
include/kunit/test.h:776:9: note: in definition of macro
'KUNIT_BASE_BINARY_ASSERTION'
776 | typeof(left) __left = (left); \
| ^~~~
include/kunit/test.h:890:2: note: in expansion of macro
'KUNIT_BASE_EQ_MSG_ASSERTION'
890 | KUNIT_BASE_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:900:2: note: in expansion of macro
'KUNIT_BINARY_EQ_MSG_ASSERTION'
900 | KUNIT_BINARY_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:1263:2: note: in expansion of macro
'KUNIT_BINARY_EQ_ASSERTION'
1263 | KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/thunderbolt/test.c:505:3: note: in expansion of macro
'KUNIT_EXPECT_EQ'
505 | KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
| ^~~~~~~~~~~~~~~
drivers/thunderbolt/test.c:516:25: error: 'typeof' applied to a bit-field
516 | KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
| ^
include/kunit/test.h:776:9: note: in definition of macro
'KUNIT_BASE_BINARY_ASSERTION'
776 | typeof(left) __left = (left); \
| ^~~~
include/kunit/test.h:890:2: note: in expansion of macro
'KUNIT_BASE_EQ_MSG_ASSERTION'
890 | KUNIT_BASE_EQ_MSG_ASSERTION(test, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/typeof +387 drivers/thunderbolt/test.c
352
353 static void tb_test_path_single_hop_walk(struct kunit *test)
354 {
355 /*
356 * Walks from Host PCIe downstream port to Device #1 PCIe
357 * upstream port.
358 *
359 * [Host]
360 * 1 |
361 * 1 |
362 * [Device]
363 */
364 static const struct port_expectation test_data[] = {
365 { .route = 0x0, .port = 8, .type = TB_TYPE_PCIE_DOWN },
366 { .route = 0x0, .port = 1, .type = TB_TYPE_PORT },
367 { .route = 0x1, .port = 1, .type = TB_TYPE_PORT },
368 { .route = 0x1, .port = 9, .type = TB_TYPE_PCIE_UP },
369 };
370 struct tb_port *src_port, *dst_port, *p;
371 struct tb_switch *host, *dev;
372 int i;
373
374 host = alloc_host(test);
375 dev = alloc_dev_default(test, host, 1, true);
376
377 src_port = &host->ports[8];
378 dst_port = &dev->ports[9];
379
380 /* Walk both directions */
381
382 i = 0;
383 tb_for_each_port_on_path(src_port, dst_port, p) {
384 KUNIT_EXPECT_TRUE(test, i < ARRAY_SIZE(test_data));
385 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route);
386 KUNIT_EXPECT_EQ(test, p->port, test_data[i].port);
387 KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
388 i++;
389 }
390
391 KUNIT_EXPECT_EQ(test, i, ARRAY_SIZE(test_data));
392
393 i = ARRAY_SIZE(test_data) - 1;
394 tb_for_each_port_on_path(dst_port, src_port, p) {
395 KUNIT_EXPECT_TRUE(test, i < ARRAY_SIZE(test_data));
396 KUNIT_EXPECT_EQ(test, tb_route(p->sw), test_data[i].route);
397 KUNIT_EXPECT_EQ(test, p->port, test_data[i].port);
398 KUNIT_EXPECT_EQ(test, p->config.type, test_data[i].type);
399 i--;
400 }
401
402 KUNIT_EXPECT_EQ(test, i, -1);
403 }
404
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org