drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1807:1: warning: unused variable 'iwl_dbgfs_dbg_time_point_ops'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: 9dbb62a29042e543ab6671dc12c1473c3cbc58c2 iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point
date: 9 months ago
config: riscv-randconfig-r026-20211115 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 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 9dbb62a29042e543ab6671dc12c1473c3cbc58c2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1807:1: warning: unused variable 'iwl_dbgfs_dbg_time_point_ops' [-Wunused-const-variable]
MVM_DEBUGFS_WRITE_FILE_OPS(dbg_time_point, 64);
^
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1554:2: note: expanded from macro 'MVM_DEBUGFS_WRITE_FILE_OPS'
_MVM_DEBUGFS_WRITE_FILE_OPS(name, bufsz, struct iwl_mvm)
^
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.h:39:37: note: expanded from macro '_MVM_DEBUGFS_WRITE_FILE_OPS'
static const struct file_operations iwl_dbgfs_##name##_ops = { \
^
<scratch space>:169:1: note: expanded from here
iwl_dbgfs_dbg_time_point_ops
^
1 warning generated.
vim +/iwl_dbgfs_dbg_time_point_ops +1807 drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
1780
1781 /* Device wide debugfs entries */
1782 MVM_DEBUGFS_READ_FILE_OPS(ctdp_budget);
1783 MVM_DEBUGFS_WRITE_FILE_OPS(stop_ctdp, 8);
1784 MVM_DEBUGFS_WRITE_FILE_OPS(force_ctkill, 8);
1785 MVM_DEBUGFS_WRITE_FILE_OPS(tx_flush, 16);
1786 MVM_DEBUGFS_WRITE_FILE_OPS(sta_drain, 8);
1787 MVM_DEBUGFS_WRITE_FILE_OPS(send_echo_cmd, 8);
1788 MVM_DEBUGFS_READ_WRITE_FILE_OPS(sram, 64);
1789 MVM_DEBUGFS_READ_WRITE_FILE_OPS(set_nic_temperature, 64);
1790 MVM_DEBUGFS_READ_FILE_OPS(nic_temp);
1791 MVM_DEBUGFS_READ_FILE_OPS(stations);
1792 MVM_DEBUGFS_READ_FILE_OPS(rs_data);
1793 MVM_DEBUGFS_READ_FILE_OPS(bt_notif);
1794 MVM_DEBUGFS_READ_FILE_OPS(bt_cmd);
1795 MVM_DEBUGFS_READ_WRITE_FILE_OPS(disable_power_off, 64);
1796 MVM_DEBUGFS_READ_FILE_OPS(fw_rx_stats);
1797 MVM_DEBUGFS_READ_FILE_OPS(drv_rx_stats);
1798 MVM_DEBUGFS_READ_FILE_OPS(fw_ver);
1799 MVM_DEBUGFS_READ_FILE_OPS(phy_integration_ver);
1800 MVM_DEBUGFS_WRITE_FILE_OPS(fw_restart, 10);
1801 MVM_DEBUGFS_WRITE_FILE_OPS(fw_nmi, 10);
1802 MVM_DEBUGFS_WRITE_FILE_OPS(bt_tx_prio, 10);
1803 MVM_DEBUGFS_WRITE_FILE_OPS(bt_force_ant, 10);
1804 MVM_DEBUGFS_READ_WRITE_FILE_OPS(scan_ant_rxchain, 8);
1805 MVM_DEBUGFS_READ_WRITE_FILE_OPS(fw_dbg_conf, 8);
1806 MVM_DEBUGFS_WRITE_FILE_OPS(fw_dbg_collect, 64);
> 1807 MVM_DEBUGFS_WRITE_FILE_OPS(dbg_time_point, 64);
1808 MVM_DEBUGFS_WRITE_FILE_OPS(indirection_tbl,
1809 (IWL_RSS_INDIRECTION_TABLE_SIZE * 2));
1810 MVM_DEBUGFS_WRITE_FILE_OPS(inject_packet, 512);
1811 MVM_DEBUGFS_WRITE_FILE_OPS(inject_beacon_ie, 512);
1812 MVM_DEBUGFS_WRITE_FILE_OPS(inject_beacon_ie_restore, 512);
1813
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
include/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: e1edc277e6f6dfb372216522dfc57f9381c39e35 linux/container_of.h: switch to static_assert
date: 5 days ago
config: alpha-randconfig-r012-20211115 (attached as .config)
compiler: alpha-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 e1edc277e6f6dfb372216522dfc57f9381c39e35
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/gpu/drm/
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 include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/dma-fence.h:17,
from drivers/gpu/drm/drm_file.c:35:
drivers/gpu/drm/drm_file.c: In function 'drm_open_helper':
drivers/gpu/drm/drm_file.c:385:56: error: 'pci_root_buses' undeclared (first use in this function); did you mean 'pci_is_root_bus'?
385 | struct pci_bus *b = list_entry(pci_root_buses.next,
| ^~~~~~~~~~~~~~
include/linux/container_of.h:18:33: note: in definition of macro 'container_of'
18 | void *__mptr = (void *)(ptr); \
| ^~~
drivers/gpu/drm/drm_file.c:385:45: note: in expansion of macro 'list_entry'
385 | struct pci_bus *b = list_entry(pci_root_buses.next,
| ^~~~~~~~~~
drivers/gpu/drm/drm_file.c:385:56: note: each undeclared identifier is reported only once for each function it appears in
385 | struct pci_bus *b = list_entry(pci_root_buses.next,
| ^~~~~~~~~~~~~~
include/linux/container_of.h:18:33: note: in definition of macro 'container_of'
18 | void *__mptr = (void *)(ptr); \
| ^~~
drivers/gpu/drm/drm_file.c:385:45: note: in expansion of macro 'list_entry'
385 | struct pci_bus *b = list_entry(pci_root_buses.next,
| ^~~~~~~~~~
In file included from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/dma-fence.h:17,
from drivers/gpu/drm/drm_file.c:35:
>> include/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
276 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:513:9: note: in expansion of macro 'container_of'
513 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
drivers/gpu/drm/drm_file.c:385:45: note: in expansion of macro 'list_entry'
385 | struct pci_bus *b = list_entry(pci_root_buses.next,
| ^~~~~~~~~~
vim +276 include/linux/compiler_types.h
eb111869301e15 Rasmus Villemoes 2019-09-13 274
d15155824c5014 Will Deacon 2017-10-24 275 /* Are two types/vars the same type (ignoring qualifiers)? */
d15155824c5014 Will Deacon 2017-10-24 @276 #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
d15155824c5014 Will Deacon 2017-10-24 277
:::::: The code at line 276 was first introduced by commit
:::::: d15155824c5014803d91b829736d249c500bdda6 linux/compiler.h: Split into compiler.h and compiler_types.h
:::::: TO: Will Deacon <will.deacon(a)arm.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH 1/2] iio: humidity: Add support for Sensirion SHTC3 sensor
by kernel test robot
Hi Gilles,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on robh/for-next v5.16-rc1 next-20211112]
[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/Gilles-Talis/iio-humidity-add-su...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: s390-randconfig-s032-20211115 (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/d4b528fcce840650354227c99ec7f6c0b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gilles-Talis/iio-humidity-add-support-for-Sensirion-SHTC3/20211114-212618
git checkout d4b528fcce840650354227c99ec7f6c0bdd076b0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/iio/humidity/shtc3.c:88:39: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [addressable] [usertype] cmd @@ got restricted __be16 @@
drivers/iio/humidity/shtc3.c:88:39: sparse: expected unsigned short [addressable] [usertype] cmd
drivers/iio/humidity/shtc3.c:88:39: sparse: got restricted __be16
>> drivers/iio/humidity/shtc3.c:88:56: sparse: sparse: Using plain integer as NULL pointer
drivers/iio/humidity/shtc3.c:93:36: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [addressable] [usertype] cmd @@ got restricted __be16 @@
drivers/iio/humidity/shtc3.c:93:36: sparse: expected unsigned short [addressable] [usertype] cmd
drivers/iio/humidity/shtc3.c:93:36: sparse: got restricted __be16
drivers/iio/humidity/shtc3.c:93:54: sparse: sparse: Using plain integer as NULL pointer
>> drivers/iio/humidity/shtc3.c:122:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] cmd @@ got restricted __be16 @@
drivers/iio/humidity/shtc3.c:122:13: sparse: expected unsigned short [usertype] cmd
drivers/iio/humidity/shtc3.c:122:13: sparse: got restricted __be16
drivers/iio/humidity/shtc3.c:189:38: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [addressable] [usertype] cmd @@ got restricted __be16 @@
drivers/iio/humidity/shtc3.c:189:38: sparse: expected unsigned short [addressable] [usertype] cmd
drivers/iio/humidity/shtc3.c:189:38: sparse: got restricted __be16
drivers/iio/humidity/shtc3.c:204:38: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [addressable] [usertype] cmd @@ got restricted __be16 @@
drivers/iio/humidity/shtc3.c:204:38: sparse: expected unsigned short [addressable] [usertype] cmd
drivers/iio/humidity/shtc3.c:204:38: sparse: got restricted __be16
drivers/iio/humidity/shtc3.c:204:60: sparse: sparse: Using plain integer as NULL pointer
vim +88 drivers/iio/humidity/shtc3.c
85
86 static int shtc3_sleep(struct i2c_client *client)
87 {
> 88 return shtc3_send_cmd(client, SHTC3_CMD_SLEEP, 0);
89 }
90
91 static int shtc3_wakeup(struct i2c_client *client)
92 {
93 if (shtc3_send_cmd(client, SHTC3_CMD_WAKEUP, 0) < 0)
94 return -EIO;
95
96 /* Wait for device to wake up */
97 usleep_range(180, 240);
98
99 return 0;
100 }
101
102 static int shtc3_read_channel(struct i2c_client *client, bool temp)
103 {
104 int ret;
105 u16 cmd;
106 u16 meas;
107
108 ret = shtc3_wakeup(client);
109 if (ret < 0)
110 return ret;
111
112 /*
113 * Sensor sends back measurement results after measurement command
114 * has been issued by the host.
115 * Sensor sends 3 bytes (2 bytes of data + 1 byte of CRC) for each
116 * channel sequentially
117 * The command issued by the host determines the channel for which
118 * the sensor will first send the data.
119 * We select the channel for which we need the results
120 * then only read back the 2 bytes corresponding to this channel.
121 */
> 122 cmd = temp ? SHTC3_CMD_TEMP_MEAS_LP_CS : SHTC3_CMD_RH_MEAS_LP_CS;
123 ret = shtc3_send_cmd(client, cmd, &meas);
124 if (ret < 0)
125 return ret;
126
127 /* Go back to sleep */
128 shtc3_sleep(client);
129
130 return meas;
131 }
132
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[sashal-stable:pending-5.15 390/807] arch/x86/kernel/process.c:953:2: error: implicit declaration of function 'stack_trace_save_tsk'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-5.15
head: d67a6e7b954de93239657201bf85d3a6156e9ad3
commit: 3d79226ba332066e0af90c26da1636e508a09cfc [390/807] x86: Fix get_wchan() to support the ORC unwinder
config: i386-tinyconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-stable pending-5.15
git checkout 3d79226ba332066e0af90c26da1636e508a09cfc
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the sashal-stable/pending-5.15 HEAD d67a6e7b954de93239657201bf85d3a6156e9ad3 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
arch/x86/kernel/process.c:871:13: warning: no previous prototype for 'arch_post_acpi_subsys_init' [-Wmissing-prototypes]
871 | void __init arch_post_acpi_subsys_init(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/process.c: In function 'get_wchan':
>> arch/x86/kernel/process.c:953:2: error: implicit declaration of function 'stack_trace_save_tsk' [-Werror=implicit-function-declaration]
953 | stack_trace_save_tsk(p, &entry, 1, 0);
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/stack_trace_save_tsk +953 arch/x86/kernel/process.c
939
940 /*
941 * Called from fs/proc with a reference on @p to find the function
942 * which called into schedule(). This needs to be done carefully
943 * because the task might wake up and we might look at a stack
944 * changing under us.
945 */
946 unsigned long get_wchan(struct task_struct *p)
947 {
948 unsigned long entry = 0;
949
950 if (p == current || task_is_running(p))
951 return 0;
952
> 953 stack_trace_save_tsk(p, &entry, 1, 0);
954 return entry;
955 }
956
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[ast-bpf:relo_core 9/19] tools/lib/bpf/relo_core.c:1348:1: warning: the frame size of 1136 bytes is larger than 1024 bytes
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git relo_core
head: f17ef55e5e0bac0d11d3186cd1c468b5a1e047d7
commit: 03c354f8c71c2478c421d5552d284e0befb03861 [9/19] bpf: Prepare relo_core.c for kernel duty.
config: arc-randconfig-r043-20211115 (attached as .config)
compiler: arceb-elf-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/ast/bpf.git/commit/?id=03...
git remote add ast-bpf https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git
git fetch --no-tags ast-bpf relo_core
git checkout 03c354f8c71c2478c421d5552d284e0befb03861
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
tools/lib/bpf/relo_core.c: In function 'bpf_core_apply_relo_insn':
>> tools/lib/bpf/relo_core.c:1348:1: warning: the frame size of 1136 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1348 | }
| ^
vim +1348 tools/lib/bpf/relo_core.c
b0588390dbcedc Alexei Starovoitov 2021-07-20 1147
b0588390dbcedc Alexei Starovoitov 2021-07-20 1148 /*
b0588390dbcedc Alexei Starovoitov 2021-07-20 1149 * CO-RE relocate single instruction.
b0588390dbcedc Alexei Starovoitov 2021-07-20 1150 *
b0588390dbcedc Alexei Starovoitov 2021-07-20 1151 * The outline and important points of the algorithm:
b0588390dbcedc Alexei Starovoitov 2021-07-20 1152 * 1. For given local type, find corresponding candidate target types.
b0588390dbcedc Alexei Starovoitov 2021-07-20 1153 * Candidate type is a type with the same "essential" name, ignoring
b0588390dbcedc Alexei Starovoitov 2021-07-20 1154 * everything after last triple underscore (___). E.g., `sample`,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1155 * `sample___flavor_one`, `sample___flavor_another_one`, are all candidates
b0588390dbcedc Alexei Starovoitov 2021-07-20 1156 * for each other. Names with triple underscore are referred to as
b0588390dbcedc Alexei Starovoitov 2021-07-20 1157 * "flavors" and are useful, among other things, to allow to
b0588390dbcedc Alexei Starovoitov 2021-07-20 1158 * specify/support incompatible variations of the same kernel struct, which
b0588390dbcedc Alexei Starovoitov 2021-07-20 1159 * might differ between different kernel versions and/or build
b0588390dbcedc Alexei Starovoitov 2021-07-20 1160 * configurations.
b0588390dbcedc Alexei Starovoitov 2021-07-20 1161 *
b0588390dbcedc Alexei Starovoitov 2021-07-20 1162 * N.B. Struct "flavors" could be generated by bpftool's BTF-to-C
b0588390dbcedc Alexei Starovoitov 2021-07-20 1163 * converter, when deduplicated BTF of a kernel still contains more than
b0588390dbcedc Alexei Starovoitov 2021-07-20 1164 * one different types with the same name. In that case, ___2, ___3, etc
b0588390dbcedc Alexei Starovoitov 2021-07-20 1165 * are appended starting from second name conflict. But start flavors are
b0588390dbcedc Alexei Starovoitov 2021-07-20 1166 * also useful to be defined "locally", in BPF program, to extract same
b0588390dbcedc Alexei Starovoitov 2021-07-20 1167 * data from incompatible changes between different kernel
b0588390dbcedc Alexei Starovoitov 2021-07-20 1168 * versions/configurations. For instance, to handle field renames between
b0588390dbcedc Alexei Starovoitov 2021-07-20 1169 * kernel versions, one can use two flavors of the struct name with the
b0588390dbcedc Alexei Starovoitov 2021-07-20 1170 * same common name and use conditional relocations to extract that field,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1171 * depending on target kernel version.
b0588390dbcedc Alexei Starovoitov 2021-07-20 1172 * 2. For each candidate type, try to match local specification to this
b0588390dbcedc Alexei Starovoitov 2021-07-20 1173 * candidate target type. Matching involves finding corresponding
b0588390dbcedc Alexei Starovoitov 2021-07-20 1174 * high-level spec accessors, meaning that all named fields should match,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1175 * as well as all array accesses should be within the actual bounds. Also,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1176 * types should be compatible (see bpf_core_fields_are_compat for details).
b0588390dbcedc Alexei Starovoitov 2021-07-20 1177 * 3. It is supported and expected that there might be multiple flavors
b0588390dbcedc Alexei Starovoitov 2021-07-20 1178 * matching the spec. As long as all the specs resolve to the same set of
b0588390dbcedc Alexei Starovoitov 2021-07-20 1179 * offsets across all candidates, there is no error. If there is any
b0588390dbcedc Alexei Starovoitov 2021-07-20 1180 * ambiguity, CO-RE relocation will fail. This is necessary to accomodate
b0588390dbcedc Alexei Starovoitov 2021-07-20 1181 * imprefection of BTF deduplication, which can cause slight duplication of
b0588390dbcedc Alexei Starovoitov 2021-07-20 1182 * the same BTF type, if some directly or indirectly referenced (by
b0588390dbcedc Alexei Starovoitov 2021-07-20 1183 * pointer) type gets resolved to different actual types in different
b0588390dbcedc Alexei Starovoitov 2021-07-20 1184 * object files. If such situation occurs, deduplicated BTF will end up
b0588390dbcedc Alexei Starovoitov 2021-07-20 1185 * with two (or more) structurally identical types, which differ only in
b0588390dbcedc Alexei Starovoitov 2021-07-20 1186 * types they refer to through pointer. This should be OK in most cases and
b0588390dbcedc Alexei Starovoitov 2021-07-20 1187 * is not an error.
b0588390dbcedc Alexei Starovoitov 2021-07-20 1188 * 4. Candidate types search is performed by linearly scanning through all
b0588390dbcedc Alexei Starovoitov 2021-07-20 1189 * types in target BTF. It is anticipated that this is overall more
b0588390dbcedc Alexei Starovoitov 2021-07-20 1190 * efficient memory-wise and not significantly worse (if not better)
b0588390dbcedc Alexei Starovoitov 2021-07-20 1191 * CPU-wise compared to prebuilding a map from all local type names to
b0588390dbcedc Alexei Starovoitov 2021-07-20 1192 * a list of candidate type names. It's also sped up by caching resolved
b0588390dbcedc Alexei Starovoitov 2021-07-20 1193 * list of matching candidates per each local "root" type ID, that has at
b0588390dbcedc Alexei Starovoitov 2021-07-20 1194 * least one bpf_core_relo associated with it. This list is shared
b0588390dbcedc Alexei Starovoitov 2021-07-20 1195 * between multiple relocations for the same type ID and is updated as some
b0588390dbcedc Alexei Starovoitov 2021-07-20 1196 * of the candidates are pruned due to structural incompatibility.
b0588390dbcedc Alexei Starovoitov 2021-07-20 1197 */
b0588390dbcedc Alexei Starovoitov 2021-07-20 1198 int bpf_core_apply_relo_insn(const char *prog_name, struct bpf_insn *insn,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1199 int insn_idx,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1200 const struct bpf_core_relo *relo,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1201 int relo_idx,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1202 const struct btf *local_btf,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1203 struct bpf_core_cand_list *cands)
b0588390dbcedc Alexei Starovoitov 2021-07-20 1204 {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1205 struct bpf_core_spec local_spec, cand_spec, targ_spec = {};
b0588390dbcedc Alexei Starovoitov 2021-07-20 1206 struct bpf_core_relo_res cand_res, targ_res;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1207 const struct btf_type *local_type;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1208 const char *local_name;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1209 __u32 local_id;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1210 const char *spec_str;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1211 int i, j, err;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1212
b0588390dbcedc Alexei Starovoitov 2021-07-20 1213 local_id = relo->type_id;
9954f5c668fde7 Alexei Starovoitov 2021-09-30 1214 local_type = btf_type_by_id(local_btf, local_id);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1215 if (!local_type)
b0588390dbcedc Alexei Starovoitov 2021-07-20 1216 return -EINVAL;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1217
b0588390dbcedc Alexei Starovoitov 2021-07-20 1218 local_name = btf__name_by_offset(local_btf, local_type->name_off);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1219 if (!local_name)
b0588390dbcedc Alexei Starovoitov 2021-07-20 1220 return -EINVAL;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1221
b0588390dbcedc Alexei Starovoitov 2021-07-20 1222 spec_str = btf__name_by_offset(local_btf, relo->access_str_off);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1223 if (str_is_empty(spec_str))
b0588390dbcedc Alexei Starovoitov 2021-07-20 1224 return -EINVAL;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1225
b0588390dbcedc Alexei Starovoitov 2021-07-20 1226 err = bpf_core_parse_spec(local_btf, local_id, spec_str, relo->kind, &local_spec);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1227 if (err) {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1228 pr_warn("prog '%s': relo #%d: parsing [%d] %s %s + %s failed: %d\n",
b0588390dbcedc Alexei Starovoitov 2021-07-20 1229 prog_name, relo_idx, local_id, btf_kind_str(local_type),
b0588390dbcedc Alexei Starovoitov 2021-07-20 1230 str_is_empty(local_name) ? "<anon>" : local_name,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1231 spec_str, err);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1232 return -EINVAL;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1233 }
b0588390dbcedc Alexei Starovoitov 2021-07-20 1234
b0588390dbcedc Alexei Starovoitov 2021-07-20 1235 pr_debug("prog '%s': relo #%d: kind <%s> (%d), spec is ", prog_name,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1236 relo_idx, core_relo_kind_str(relo->kind), relo->kind);
03c354f8c71c24 Alexei Starovoitov 2021-09-07 1237 bpf_core_dump_spec(prog_name, LIBBPF_DEBUG, &local_spec);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1238 libbpf_print(LIBBPF_DEBUG, "\n");
b0588390dbcedc Alexei Starovoitov 2021-07-20 1239
b0588390dbcedc Alexei Starovoitov 2021-07-20 1240 /* TYPE_ID_LOCAL relo is special and doesn't need candidate search */
b0588390dbcedc Alexei Starovoitov 2021-07-20 1241 if (relo->kind == BPF_TYPE_ID_LOCAL) {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1242 targ_res.validate = true;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1243 targ_res.poison = false;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1244 targ_res.orig_val = local_spec.root_type_id;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1245 targ_res.new_val = local_spec.root_type_id;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1246 goto patch_insn;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1247 }
b0588390dbcedc Alexei Starovoitov 2021-07-20 1248
b0588390dbcedc Alexei Starovoitov 2021-07-20 1249 /* libbpf doesn't support candidate search for anonymous types */
b0588390dbcedc Alexei Starovoitov 2021-07-20 1250 if (str_is_empty(spec_str)) {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1251 pr_warn("prog '%s': relo #%d: <%s> (%d) relocation doesn't support anonymous types\n",
b0588390dbcedc Alexei Starovoitov 2021-07-20 1252 prog_name, relo_idx, core_relo_kind_str(relo->kind), relo->kind);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1253 return -EOPNOTSUPP;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1254 }
b0588390dbcedc Alexei Starovoitov 2021-07-20 1255
b0588390dbcedc Alexei Starovoitov 2021-07-20 1256
b0588390dbcedc Alexei Starovoitov 2021-07-20 1257 for (i = 0, j = 0; i < cands->len; i++) {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1258 err = bpf_core_spec_match(&local_spec, cands->cands[i].btf,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1259 cands->cands[i].id, &cand_spec);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1260 if (err < 0) {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1261 pr_warn("prog '%s': relo #%d: error matching candidate #%d ",
b0588390dbcedc Alexei Starovoitov 2021-07-20 1262 prog_name, relo_idx, i);
03c354f8c71c24 Alexei Starovoitov 2021-09-07 1263 bpf_core_dump_spec(prog_name, LIBBPF_WARN, &cand_spec);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1264 libbpf_print(LIBBPF_WARN, ": %d\n", err);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1265 return err;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1266 }
b0588390dbcedc Alexei Starovoitov 2021-07-20 1267
b0588390dbcedc Alexei Starovoitov 2021-07-20 1268 pr_debug("prog '%s': relo #%d: %s candidate #%d ", prog_name,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1269 relo_idx, err == 0 ? "non-matching" : "matching", i);
03c354f8c71c24 Alexei Starovoitov 2021-09-07 1270 bpf_core_dump_spec(prog_name, LIBBPF_DEBUG, &cand_spec);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1271 libbpf_print(LIBBPF_DEBUG, "\n");
b0588390dbcedc Alexei Starovoitov 2021-07-20 1272
b0588390dbcedc Alexei Starovoitov 2021-07-20 1273 if (err == 0)
b0588390dbcedc Alexei Starovoitov 2021-07-20 1274 continue;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1275
b0588390dbcedc Alexei Starovoitov 2021-07-20 1276 err = bpf_core_calc_relo(prog_name, relo, relo_idx, &local_spec, &cand_spec, &cand_res);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1277 if (err)
b0588390dbcedc Alexei Starovoitov 2021-07-20 1278 return err;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1279
b0588390dbcedc Alexei Starovoitov 2021-07-20 1280 if (j == 0) {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1281 targ_res = cand_res;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1282 targ_spec = cand_spec;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1283 } else if (cand_spec.bit_offset != targ_spec.bit_offset) {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1284 /* if there are many field relo candidates, they
b0588390dbcedc Alexei Starovoitov 2021-07-20 1285 * should all resolve to the same bit offset
b0588390dbcedc Alexei Starovoitov 2021-07-20 1286 */
b0588390dbcedc Alexei Starovoitov 2021-07-20 1287 pr_warn("prog '%s': relo #%d: field offset ambiguity: %u != %u\n",
b0588390dbcedc Alexei Starovoitov 2021-07-20 1288 prog_name, relo_idx, cand_spec.bit_offset,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1289 targ_spec.bit_offset);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1290 return -EINVAL;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1291 } else if (cand_res.poison != targ_res.poison || cand_res.new_val != targ_res.new_val) {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1292 /* all candidates should result in the same relocation
b0588390dbcedc Alexei Starovoitov 2021-07-20 1293 * decision and value, otherwise it's dangerous to
b0588390dbcedc Alexei Starovoitov 2021-07-20 1294 * proceed due to ambiguity
b0588390dbcedc Alexei Starovoitov 2021-07-20 1295 */
b0588390dbcedc Alexei Starovoitov 2021-07-20 1296 pr_warn("prog '%s': relo #%d: relocation decision ambiguity: %s %u != %s %u\n",
b0588390dbcedc Alexei Starovoitov 2021-07-20 1297 prog_name, relo_idx,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1298 cand_res.poison ? "failure" : "success", cand_res.new_val,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1299 targ_res.poison ? "failure" : "success", targ_res.new_val);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1300 return -EINVAL;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1301 }
b0588390dbcedc Alexei Starovoitov 2021-07-20 1302
b0588390dbcedc Alexei Starovoitov 2021-07-20 1303 cands->cands[j++] = cands->cands[i];
b0588390dbcedc Alexei Starovoitov 2021-07-20 1304 }
b0588390dbcedc Alexei Starovoitov 2021-07-20 1305
b0588390dbcedc Alexei Starovoitov 2021-07-20 1306 /*
b0588390dbcedc Alexei Starovoitov 2021-07-20 1307 * For BPF_FIELD_EXISTS relo or when used BPF program has field
b0588390dbcedc Alexei Starovoitov 2021-07-20 1308 * existence checks or kernel version/config checks, it's expected
b0588390dbcedc Alexei Starovoitov 2021-07-20 1309 * that we might not find any candidates. In this case, if field
b0588390dbcedc Alexei Starovoitov 2021-07-20 1310 * wasn't found in any candidate, the list of candidates shouldn't
b0588390dbcedc Alexei Starovoitov 2021-07-20 1311 * change at all, we'll just handle relocating appropriately,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1312 * depending on relo's kind.
b0588390dbcedc Alexei Starovoitov 2021-07-20 1313 */
b0588390dbcedc Alexei Starovoitov 2021-07-20 1314 if (j > 0)
b0588390dbcedc Alexei Starovoitov 2021-07-20 1315 cands->len = j;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1316
b0588390dbcedc Alexei Starovoitov 2021-07-20 1317 /*
b0588390dbcedc Alexei Starovoitov 2021-07-20 1318 * If no candidates were found, it might be both a programmer error,
b0588390dbcedc Alexei Starovoitov 2021-07-20 1319 * as well as expected case, depending whether instruction w/
b0588390dbcedc Alexei Starovoitov 2021-07-20 1320 * relocation is guarded in some way that makes it unreachable (dead
b0588390dbcedc Alexei Starovoitov 2021-07-20 1321 * code) if relocation can't be resolved. This is handled in
b0588390dbcedc Alexei Starovoitov 2021-07-20 1322 * bpf_core_patch_insn() uniformly by replacing that instruction with
b0588390dbcedc Alexei Starovoitov 2021-07-20 1323 * BPF helper call insn (using invalid helper ID). If that instruction
b0588390dbcedc Alexei Starovoitov 2021-07-20 1324 * is indeed unreachable, then it will be ignored and eliminated by
b0588390dbcedc Alexei Starovoitov 2021-07-20 1325 * verifier. If it was an error, then verifier will complain and point
b0588390dbcedc Alexei Starovoitov 2021-07-20 1326 * to a specific instruction number in its log.
b0588390dbcedc Alexei Starovoitov 2021-07-20 1327 */
b0588390dbcedc Alexei Starovoitov 2021-07-20 1328 if (j == 0) {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1329 pr_debug("prog '%s': relo #%d: no matching targets found\n",
b0588390dbcedc Alexei Starovoitov 2021-07-20 1330 prog_name, relo_idx);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1331
b0588390dbcedc Alexei Starovoitov 2021-07-20 1332 /* calculate single target relo result explicitly */
b0588390dbcedc Alexei Starovoitov 2021-07-20 1333 err = bpf_core_calc_relo(prog_name, relo, relo_idx, &local_spec, NULL, &targ_res);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1334 if (err)
b0588390dbcedc Alexei Starovoitov 2021-07-20 1335 return err;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1336 }
b0588390dbcedc Alexei Starovoitov 2021-07-20 1337
b0588390dbcedc Alexei Starovoitov 2021-07-20 1338 patch_insn:
b0588390dbcedc Alexei Starovoitov 2021-07-20 1339 /* bpf_core_patch_insn() should know how to handle missing targ_spec */
b0588390dbcedc Alexei Starovoitov 2021-07-20 1340 err = bpf_core_patch_insn(prog_name, insn, insn_idx, relo, relo_idx, &targ_res);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1341 if (err) {
b0588390dbcedc Alexei Starovoitov 2021-07-20 1342 pr_warn("prog '%s': relo #%d: failed to patch insn #%u: %d\n",
b0588390dbcedc Alexei Starovoitov 2021-07-20 1343 prog_name, relo_idx, relo->insn_off / 8, err);
b0588390dbcedc Alexei Starovoitov 2021-07-20 1344 return -EINVAL;
b0588390dbcedc Alexei Starovoitov 2021-07-20 1345 }
b0588390dbcedc Alexei Starovoitov 2021-07-20 1346
b0588390dbcedc Alexei Starovoitov 2021-07-20 1347 return 0;
b0588390dbcedc Alexei Starovoitov 2021-07-20 @1348 }
:::::: The code at line 1348 was first introduced by commit
:::::: b0588390dbcedcd74fab6ffb8afe8d52380fd8b6 libbpf: Split CO-RE logic into relo_core.c.
:::::: TO: Alexei Starovoitov <ast(a)kernel.org>
:::::: CC: Andrii Nakryiko <andrii(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[ast-bpf:relo_core 9/19] kernel/bpf/btf.c:6417:5: error: no previous prototype for 'bpf_core_types_are_compat'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git relo_core
head: f17ef55e5e0bac0d11d3186cd1c468b5a1e047d7
commit: 03c354f8c71c2478c421d5552d284e0befb03861 [9/19] bpf: Prepare relo_core.c for kernel duty.
config: m68k-allyesconfig (attached as .config)
compiler: m68k-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/ast/bpf.git/commit/?id=03...
git remote add ast-bpf https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git
git fetch --no-tags ast-bpf relo_core
git checkout 03c354f8c71c2478c421d5552d284e0befb03861
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the ast-bpf/relo_core HEAD f17ef55e5e0bac0d11d3186cd1c468b5a1e047d7 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
kernel/bpf/btf.c: In function 'btf_seq_show':
kernel/bpf/btf.c:5888:29: error: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
5888 | seq_vprintf((struct seq_file *)show->target, fmt, args);
| ^~~~~~~~
kernel/bpf/btf.c: In function 'btf_snprintf_show':
kernel/bpf/btf.c:5925:9: error: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
5925 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
| ^~~
kernel/bpf/btf.c: At top level:
>> kernel/bpf/btf.c:6417:5: error: no previous prototype for 'bpf_core_types_are_compat' [-Werror=missing-prototypes]
6417 | int bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6431:8: error: no previous prototype for 'bpf_core_essential_name_len' [-Werror=missing-prototypes]
6431 | size_t bpf_core_essential_name_len(const char *name)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/bpf_core_types_are_compat +6417 kernel/bpf/btf.c
6416
> 6417 int bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id,
6418 const struct btf *targ_btf, __u32 targ_id)
6419 {
6420 return -EOPNOTSUPP;
6421 }
6422
6423 static bool bpf_core_is_flavor_sep(const char *s)
6424 {
6425 /* check X___Y name pattern, where X and Y are not underscores */
6426 return s[0] != '_' && /* X */
6427 s[1] == '_' && s[2] == '_' && s[3] == '_' && /* ___ */
6428 s[4] != '_'; /* Y */
6429 }
6430
> 6431 size_t bpf_core_essential_name_len(const char *name)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[sashal-stable:pending-5.10 486/511] drivers/block/ataflop.c:2105:17: error: implicit declaration of function 'blk_cleanup_disk'; did you mean 'blk_cleanup_queue'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-5.10
head: 28d8a1bafb1d3ba5b9e84a0ef9f7505340737187
commit: 3ae415bcd38a078e241976dd34a19f49f1bab390 [486/511] block/ataflop: use the blk_cleanup_disk() helper
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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/sashal/linux-stable.git/c...
git remote add sashal-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-stable pending-5.10
git checkout 3ae415bcd38a078e241976dd34a19f49f1bab390
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
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 include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/block/ataflop.c:65:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:50: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:9: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:17: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/block/ataflop.c: In function 'atari_floppy_init':
drivers/block/ataflop.c:2045:15: error: implicit declaration of function '__register_blkdev'; did you mean 'unregister_blkdev'? [-Werror=implicit-function-declaration]
2045 | ret = __register_blkdev(FLOPPY_MAJOR, "fd", ataflop_probe);
| ^~~~~~~~~~~~~~~~~
| unregister_blkdev
>> drivers/block/ataflop.c:2105:17: error: implicit declaration of function 'blk_cleanup_disk'; did you mean 'blk_cleanup_queue'? [-Werror=implicit-function-declaration]
2105 | blk_cleanup_disk(unit[i].disk[0]);
| ^~~~~~~~~~~~~~~~
| blk_cleanup_queue
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES
Depends on DISCONTIGMEM || NUMA
Selected by
- SINGLE_MEMORY_CHUNK && MMU
vim +2105 drivers/block/ataflop.c
2034
2035 static int __init atari_floppy_init (void)
2036 {
2037 int i;
2038 int ret;
2039
2040 if (!MACH_IS_ATARI)
2041 /* Amiga, Mac, ... don't have Atari-compatible floppy :-) */
2042 return -ENODEV;
2043
2044 mutex_lock(&ataflop_probe_lock);
2045 ret = __register_blkdev(FLOPPY_MAJOR, "fd", ataflop_probe);
2046 if (ret)
2047 goto out_unlock;
2048
2049 for (i = 0; i < FD_MAX_UNITS; i++) {
2050 memset(&unit[i].tag_set, 0, sizeof(unit[i].tag_set));
2051 unit[i].tag_set.ops = &ataflop_mq_ops;
2052 unit[i].tag_set.nr_hw_queues = 1;
2053 unit[i].tag_set.nr_maps = 1;
2054 unit[i].tag_set.queue_depth = 2;
2055 unit[i].tag_set.numa_node = NUMA_NO_NODE;
2056 unit[i].tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
2057 ret = blk_mq_alloc_tag_set(&unit[i].tag_set);
2058 if (ret)
2059 goto err;
2060
2061 ret = ataflop_alloc_disk(i, 0);
2062 if (ret) {
2063 blk_mq_free_tag_set(&unit[i].tag_set);
2064 goto err;
2065 }
2066 }
2067
2068 if (UseTrackbuffer < 0)
2069 /* not set by user -> use default: for now, we turn
2070 track buffering off for all Medusas, though it
2071 could be used with ones that have a counter
2072 card. But the test is too hard :-( */
2073 UseTrackbuffer = !MACH_IS_MEDUSA;
2074
2075 /* initialize variables */
2076 SelectedDrive = -1;
2077 BufferDrive = -1;
2078
2079 DMABuffer = atari_stram_alloc(BUFFER_SIZE+512, "ataflop");
2080 if (!DMABuffer) {
2081 printk(KERN_ERR "atari_floppy_init: cannot get dma buffer\n");
2082 ret = -ENOMEM;
2083 goto err;
2084 }
2085 TrackBuffer = DMABuffer + 512;
2086 PhysDMABuffer = atari_stram_to_phys(DMABuffer);
2087 PhysTrackBuffer = virt_to_phys(TrackBuffer);
2088 BufferDrive = BufferSide = BufferTrack = -1;
2089
2090 for (i = 0; i < FD_MAX_UNITS; i++) {
2091 unit[i].track = -1;
2092 unit[i].flags = 0;
2093 add_disk(unit[i].disk[0]);
2094 }
2095
2096 printk(KERN_INFO "Atari floppy driver: max. %cD, %strack buffering\n",
2097 DriveType == 0 ? 'D' : DriveType == 1 ? 'H' : 'E',
2098 UseTrackbuffer ? "" : "no ");
2099 config_types();
2100
2101 return 0;
2102
2103 err:
2104 while (--i >= 0) {
> 2105 blk_cleanup_disk(unit[i].disk[0]);
2106 blk_mq_free_tag_set(&unit[i].tag_set);
2107 }
2108
2109 unregister_blkdev(FLOPPY_MAJOR, "fd");
2110 out_unlock:
2111 mutex_unlock(&ataflop_probe_lock);
2112 return ret;
2113 }
2114
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week