Hay

Known issue: selftests: ublk: build: null.c:21:25: error: 'UBLK_PARAM_TYPE_SEGMENT' undeclared

Description

The following build warnings / errors noticed while building the selftest/ublk with gcc-13 and clang-nightly toolchains on Linux next tree.

Please suggest if I am missing something in my build setup.

Regressions found on arm arm64 x86_64 - selftests ublk

Regression Analysis: - New regression? Yes - Reproducibility? Yes

Build regression: selftests ublk UBLK_IO_F_NEED_REG_BUF undeclared

Reported-by: Linux Kernel Functional Testing lkft@linaro.org

<h2>Build log</h2>

CC kublk In file included from kublk.c:6: kublk.h: In function 'ublk_io_auto_zc_fallback': kublk.h:240:35: error: 'UBLK_IO_F_NEED_REG_BUF' undeclared (first use in this function); did you mean 'UBLKSRV_NEED_REG_BUF'? 240 | return !!(iod->op_flags & UBLK_IO_F_NEED_REG_BUF); | ^~~~~~~~~~~~~~~~~~~~~~ | UBLKSRV_NEED_REG_BUF kublk.h:240:35: note: each undeclared identifier is reported only once for each function it appears in kublk.c: In function 'ublk_ctrl_update_size': kublk.c:223:27: error: 'UBLK_U_CMD_UPDATE_SIZE' undeclared (first use in this function) 223 | .cmd_op = UBLK_U_CMD_UPDATE_SIZE, | ^~~~~~~~~~~~~~~~~~~~~~ kublk.c: In function 'ublk_ctrl_quiesce_dev': kublk.c:235:27: error: 'UBLK_U_CMD_QUIESCE_DEV' undeclared (first use in this function); did you mean 'UBLK_U_CMD_DEL_DEV'? 235 | .cmd_op = UBLK_U_CMD_QUIESCE_DEV, | ^~~~~~~~~~~~~~~~~~~~~~ | UBLK_U_CMD_DEL_DEV kublk.c: In function 'ublk_queue_init': kublk.c:447:63: error: 'UBLK_F_AUTO_BUF_REG' undeclared (first use in this function); did you mean 'UBLKSRV_AUTO_BUF_REG'? 447 | if (dev->dev_info.flags & (UBLK_F_SUPPORT_ZERO_COPY | UBLK_F_AUTO_BUF_REG)) { | ^~~~~~~~~~~~~~~~~~~ | UBLKSRV_AUTO_BUF_REG kublk.c: In function 'ublk_thread_init': kublk.c:507:63: error: 'UBLK_F_AUTO_BUF_REG' undeclared (first use in this function); did you mean 'UBLKSRV_AUTO_BUF_REG'? 507 | if (dev->dev_info.flags & (UBLK_F_SUPPORT_ZERO_COPY | UBLK_F_AUTO_BUF_REG)) { | ^~~~~~~~~~~~~~~~~~~ | UBLKSRV_AUTO_BUF_REG kublk.c: In function 'ublk_set_auto_buf_reg': kublk.c:579:16: error: variable 'buf' has initializer but incomplete type 579 | struct ublk_auto_buf_reg buf = {}; | ^~~~~~~~~~~~~~~~~ kublk.c:579:34: error: storage size of 'buf' isn't known 579 | struct ublk_auto_buf_reg buf = {}; | ^~~ kublk.c:587:29: error: 'UBLK_AUTO_BUF_REG_FALLBACK' undeclared (first use in this function); did you mean 'UBLKSRV_AUTO_BUF_REG_FALLBACK'? 587 | buf.flags = UBLK_AUTO_BUF_REG_FALLBACK; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | UBLKSRV_AUTO_BUF_REG_FALLBACK kublk.c:589:21: error: implicit declaration of function 'ublk_auto_buf_reg_to_sqe_addr' [-Werror=implicit-function-declaration] 589 | sqe->addr = ublk_auto_buf_reg_to_sqe_addr(&buf); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kublk.c:579:34: error: unused variable 'buf' [-Werror=unused-variable] 579 | struct ublk_auto_buf_reg buf = {}; | ^~~ kublk.c: In function '__cmd_dev_add': kublk.c:1178:25: error: 'UBLK_F_QUIESCE' undeclared (first use in this function) 1178 | if ((features & UBLK_F_QUIESCE) && | ^~~~~~~~~~~~~~ kublk.c: In function 'cmd_dev_get_features': kublk.c:1381:30: error: 'UBLK_F_UPDATE_SIZE' undeclared (first use in this function) 1381 | [const_ilog2(UBLK_F_UPDATE_SIZE)] = "UPDATE_SIZE", | ^~~~~~~~~~~~~~~~~~ kublk.c:1369:46: note: in definition of macro 'const_ilog2' 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1369:24: error: array index in initializer not of integer type 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1381:18: note: in expansion of macro 'const_ilog2' 1381 | [const_ilog2(UBLK_F_UPDATE_SIZE)] = "UPDATE_SIZE", | ^~~~~~~~~~~ kublk.c:1369:24: note: (near initialization for 'feat_map') 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1381:18: note: in expansion of macro 'const_ilog2' 1381 | [const_ilog2(UBLK_F_UPDATE_SIZE)] = "UPDATE_SIZE", | ^~~~~~~~~~~ kublk.c:1382:30: error: 'UBLK_F_AUTO_BUF_REG' undeclared (first use in this function); did you mean 'UBLKSRV_AUTO_BUF_REG'? 1382 | [const_ilog2(UBLK_F_AUTO_BUF_REG)] = "AUTO_BUF_REG", | ^~~~~~~~~~~~~~~~~~~ kublk.c:1369:46: note: in definition of macro 'const_ilog2' 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1369:24: error: array index in initializer not of integer type 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1382:18: note: in expansion of macro 'const_ilog2' 1382 | [const_ilog2(UBLK_F_AUTO_BUF_REG)] = "AUTO_BUF_REG", | ^~~~~~~~~~~ kublk.c:1369:24: note: (near initialization for 'feat_map') 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1382:18: note: in expansion of macro 'const_ilog2' 1382 | [const_ilog2(UBLK_F_AUTO_BUF_REG)] = "AUTO_BUF_REG", | ^~~~~~~~~~~ kublk.c:1383:30: error: 'UBLK_F_QUIESCE' undeclared (first use in this function) 1383 | [const_ilog2(UBLK_F_QUIESCE)] = "QUIESCE", | ^~~~~~~~~~~~~~ kublk.c:1369:46: note: in definition of macro 'const_ilog2' 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1369:24: error: array index in initializer not of integer type 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1383:18: note: in expansion of macro 'const_ilog2' 1383 | [const_ilog2(UBLK_F_QUIESCE)] = "QUIESCE", | ^~~~~~~~~~~ kublk.c:1369:24: note: (near initialization for 'feat_map') 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1383:18: note: in expansion of macro 'const_ilog2' 1383 | [const_ilog2(UBLK_F_QUIESCE)] = "QUIESCE", | ^~~~~~~~~~~ kublk.c:1384:30: error: 'UBLK_F_PER_IO_DAEMON' undeclared (first use in this function) 1384 | [const_ilog2(UBLK_F_PER_IO_DAEMON)] = "PER_IO_DAEMON", | ^~~~~~~~~~~~~~~~~~~~ kublk.c:1369:46: note: in definition of macro 'const_ilog2' 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1369:24: error: array index in initializer not of integer type 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1384:18: note: in expansion of macro 'const_ilog2' 1384 | [const_ilog2(UBLK_F_PER_IO_DAEMON)] = "PER_IO_DAEMON", | ^~~~~~~~~~~ kublk.c:1369:24: note: (near initialization for 'feat_map') 1369 | #define const_ilog2(x) (63 - __builtin_clzll(x)) | ^ kublk.c:1384:18: note: in expansion of macro 'const_ilog2' 1384 | [const_ilog2(UBLK_F_PER_IO_DAEMON)] = "PER_IO_DAEMON", | ^~~~~~~~~~~ kublk.c: In function 'main': kublk.c:1613:46: error: 'UBLK_F_AUTO_BUF_REG' undeclared (first use in this function); did you mean 'UBLKSRV_AUTO_BUF_REG'? 1613 | ctx.flags |= UBLK_F_AUTO_BUF_REG; | ^~~~~~~~~~~~~~~~~~~ | UBLKSRV_AUTO_BUF_REG cc1: all warnings being treated as errors

<h2>Source</h2>
  • Kernel version: 6.16.0-rc2
  • Git tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git
  • Git sha: 050f8ad7b58d9079455af171ac279c4b9b828c11
  • Git describe: next-20250616
  • Project details: https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20250616/
  • Architectures: arm, arm64, x86_64
  • Toolchains: gcc-13, clang nightly
  • Kconfigs: selftest/*/config+defconfig+
<h2>Build arm64</h2>
  • Build log clang: https://regressions.linaro.org/lkft/linux-next-master/next-20250617/log-parser-build-clang/clang-compiler-null_c-error-use-of-undeclared-identifier-ublk_param_type_segment/
  • Build log gcc: https://regressions.linaro.org/lkft/linux-next-master/next-20250617/log-parser-build-gcc/gcc-compiler-null_c-error-ublk_param_type_segment-undeclared-first-use-in-this-function-did-you-mean-ublk_param_type_devt/
  • Build details: https://regressions.linaro.org/lkft/linux-next-master/next-20250617/log-parser-build-clang/clang-compiler-kublk_c-error-variable-has-incomplete-type-struct-ublk_auto_buf_reg/
  • Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/2ycmBy2r4aPm6emlo7FXwX0my1D/
  • Kernel config: https://storage.tuxsuite.com/public/linaro/lkft/builds/2ycmBy2r4aPm6emlo7FXwX0my1D/config

Lore link: - https://lore.kernel.org/all/CA+G9fYsiWN1gWhHBk9uruDBzVHvLYCTL-VcxU2iiPMcS1EXyBg@mail.gmail.com/ - https://lore.kernel.org/all/aFFL8DQufPXnerlm@fedora/

Labels
First seen March 31, 2025, 6:36 a.m.
Last seen June 17, 2025, 6:35 a.m.

Incidents