kernel/fork.c:1205:22: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 923dcc5eb0c111eccd51cc7ce1658537e3c38b25
commit: 35d7bdc86031a2c1ae05ac27dfa93b2acdcbaecc kernel/fork: factor out replacing the current MM exe_file
date: 3 months ago
config: mips-randconfig-s032-20211116 (attached as .config)
compiler: mipsel-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://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 35d7bdc86031a2c1ae05ac27dfa93b2acdcbaecc
# 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=mips
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 >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
>> kernel/fork.c:1205:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *[assigned] old_exe_file @@ got struct file [noderef] __rcu *[assigned] __res @@
kernel/fork.c:1205:22: sparse: expected struct file *[assigned] old_exe_file
kernel/fork.c:1205:22: sparse: got struct file [noderef] __rcu *[assigned] __res
kernel/fork.c:1557:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
kernel/fork.c:1557:38: sparse: expected struct refcount_struct [usertype] *r
kernel/fork.c:1557:38: sparse: got struct refcount_struct [noderef] __rcu *
kernel/fork.c:1566:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1566:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1566:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1567:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *__from @@ got struct k_sigaction [noderef] __rcu * @@
kernel/fork.c:1567:36: sparse: expected void const *__from
kernel/fork.c:1567:36: sparse: got struct k_sigaction [noderef] __rcu *
kernel/fork.c:1568:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1568:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1568:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1980:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1980:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1980:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1984:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1984:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1984:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2287:32: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct [noderef] __rcu *real_parent @@ got struct task_struct *task @@
kernel/fork.c:2287:32: sparse: expected struct task_struct [noderef] __rcu *real_parent
kernel/fork.c:2287:32: sparse: got struct task_struct *task
kernel/fork.c:2296:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2296:27: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2296:27: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2345:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct list_head *head @@ got struct list_head [noderef] __rcu * @@
kernel/fork.c:2345:54: sparse: expected struct list_head *head
kernel/fork.c:2345:54: sparse: got struct list_head [noderef] __rcu *
kernel/fork.c:2366:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2366:29: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2366:29: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2384:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2384:29: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2384:29: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2411:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sighand_struct *sighand @@ got struct sighand_struct [noderef] __rcu *sighand @@
kernel/fork.c:2411:28: sparse: expected struct sighand_struct *sighand
kernel/fork.c:2411:28: sparse: got struct sighand_struct [noderef] __rcu *sighand
kernel/fork.c:2439:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2439:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2439:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2441:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2441:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2441:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2850:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *[assigned] parent @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/fork.c:2850:24: sparse: expected struct task_struct *[assigned] parent
kernel/fork.c:2850:24: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/fork.c:2931:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct const [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
kernel/fork.c:2931:43: sparse: expected struct refcount_struct const [usertype] *r
kernel/fork.c:2931:43: sparse: got struct refcount_struct [noderef] __rcu *
kernel/fork.c:2024:22: sparse: sparse: dereference of noderef expression
kernel/fork.c: note: in included file (through include/uapi/asm-generic/bpf_perf_event.h, arch/mips/include/generated/uapi/asm/bpf_perf_event.h, ...):
include/linux/ptrace.h:218:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *new_parent @@ got struct task_struct [noderef] __rcu *parent @@
include/linux/ptrace.h:218:45: sparse: expected struct task_struct *new_parent
include/linux/ptrace.h:218:45: sparse: got struct task_struct [noderef] __rcu *parent
include/linux/ptrace.h:218:62: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected struct cred const *ptracer_cred @@ got struct cred const [noderef] __rcu *ptracer_cred @@
include/linux/ptrace.h:218:62: sparse: expected struct cred const *ptracer_cred
include/linux/ptrace.h:218:62: sparse: got struct cred const [noderef] __rcu *ptracer_cred
kernel/fork.c:2343:59: sparse: sparse: dereference of noderef expression
kernel/fork.c:2344:59: sparse: sparse: dereference of noderef expression
vim +1205 kernel/fork.c
1170
1171 /**
1172 * replace_mm_exe_file - replace a reference to the mm's executable file
1173 *
1174 * This changes mm's executable file (shown as symlink /proc/[pid]/exe),
1175 * dealing with concurrent invocation and without grabbing the mmap lock in
1176 * write mode.
1177 *
1178 * Main user is sys_prctl(PR_SET_MM_MAP/EXE_FILE).
1179 */
1180 int replace_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file)
1181 {
1182 struct vm_area_struct *vma;
1183 struct file *old_exe_file;
1184 int ret = 0;
1185
1186 /* Forbid mm->exe_file change if old file still mapped. */
1187 old_exe_file = get_mm_exe_file(mm);
1188 if (old_exe_file) {
1189 mmap_read_lock(mm);
1190 for (vma = mm->mmap; vma && !ret; vma = vma->vm_next) {
1191 if (!vma->vm_file)
1192 continue;
1193 if (path_equal(&vma->vm_file->f_path,
1194 &old_exe_file->f_path))
1195 ret = -EBUSY;
1196 }
1197 mmap_read_unlock(mm);
1198 fput(old_exe_file);
1199 if (ret)
1200 return ret;
1201 }
1202
1203 /* set the new file, lockless */
1204 get_file(new_exe_file);
> 1205 old_exe_file = xchg(&mm->exe_file, new_exe_file);
1206 if (old_exe_file)
1207 fput(old_exe_file);
1208 return 0;
1209 }
1210
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[krzk-mem-ctrl:for-v5.17/renesas-rpc 5/5] drivers/memory/renesas-rpc-if.c:253:14: warning: cast to smaller integer type 'enum rpcif_type' from 'const void *'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git for-v5.17/renesas-rpc
head: b04cc0d912eb80d3c438b11d96ca847c3e77e8ab
commit: b04cc0d912eb80d3c438b11d96ca847c3e77e8ab [5/5] memory: renesas-rpc-if: Add support for RZ/G2L
config: x86_64-buildonly-randconfig-r002-20211116 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4c2cf3a314d9131b1b288e7c8ab0c75ac1b2be1d)
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/krzk/linux-mem-ctrl.git/c...
git remote add krzk-mem-ctrl https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git
git fetch --no-tags krzk-mem-ctrl for-v5.17/renesas-rpc
git checkout b04cc0d912eb80d3c438b11d96ca847c3e77e8ab
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
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/memory/renesas-rpc-if.c:253:14: warning: cast to smaller integer type 'enum rpcif_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
rpc->type = (enum rpcif_type)of_device_get_match_data(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +253 drivers/memory/renesas-rpc-if.c
226
227 int rpcif_sw_init(struct rpcif *rpc, struct device *dev)
228 {
229 struct platform_device *pdev = to_platform_device(dev);
230 struct resource *res;
231
232 rpc->dev = dev;
233
234 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
235 rpc->base = devm_ioremap_resource(&pdev->dev, res);
236 if (IS_ERR(rpc->base))
237 return PTR_ERR(rpc->base);
238
239 rpc->regmap = devm_regmap_init(&pdev->dev, NULL, rpc, &rpcif_regmap_config);
240 if (IS_ERR(rpc->regmap)) {
241 dev_err(&pdev->dev,
242 "failed to init regmap for rpcif, error %ld\n",
243 PTR_ERR(rpc->regmap));
244 return PTR_ERR(rpc->regmap);
245 }
246
247 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap");
248 rpc->dirmap = devm_ioremap_resource(&pdev->dev, res);
249 if (IS_ERR(rpc->dirmap))
250 return PTR_ERR(rpc->dirmap);
251 rpc->size = resource_size(res);
252
> 253 rpc->type = (enum rpcif_type)of_device_get_match_data(dev);
254 rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
255
256 return PTR_ERR_OR_ZERO(rpc->rstc);
257 }
258 EXPORT_SYMBOL(rpcif_sw_init);
259
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH v9 10/14] iio: test: add basic tests for the iio-rescale driver
by kernel test robot
Hi Liam,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on 2b6bff0b122785f09cfbdc34b1aa9edceea6e4c1]
url: https://github.com/0day-ci/linux/commits/Liam-Beguin/iio-afe-add-temperat...
base: 2b6bff0b122785f09cfbdc34b1aa9edceea6e4c1
config: nds32-randconfig-r003-20211115 (attached as .config)
compiler: nds32le-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://github.com/0day-ci/linux/commit/bef63a2e36c2ceccc6f5954ab7e7cbb17...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Liam-Beguin/iio-afe-add-temperature-rescaling-support/20211115-114729
git checkout bef63a2e36c2ceccc6f5954ab7e7cbb178c08fd8
# 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=nds32 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 >>):
nds32le-linux-ld: drivers/iio/test/iio-test-rescale.o: in function `iio_rescale_test_offset':
>> iio-test-rescale.c:(.text+0x16): undefined reference to `kunit_kmalloc_array'
>> nds32le-linux-ld: iio-test-rescale.c:(.text+0x1a): undefined reference to `kunit_kmalloc_array'
>> nds32le-linux-ld: iio-test-rescale.c:(.text+0x80): undefined reference to `kunit_binary_assert_format'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x84): undefined reference to `kunit_binary_assert_format'
>> nds32le-linux-ld: iio-test-rescale.c:(.text+0xe0): undefined reference to `kunit_do_assertion'
nds32le-linux-ld: iio-test-rescale.c:(.text+0xe4): undefined reference to `kunit_do_assertion'
>> nds32le-linux-ld: iio-test-rescale.c:(.text+0x104): undefined reference to `kunit_binary_str_assert_format'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x108): undefined reference to `kunit_binary_str_assert_format'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x158): undefined reference to `kunit_do_assertion'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x15c): undefined reference to `kunit_do_assertion'
nds32le-linux-ld: drivers/iio/test/iio-test-rescale.o: in function `iio_rescale_test_scale':
iio-test-rescale.c:(.text+0x236): undefined reference to `kunit_kmalloc_array'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x23a): undefined reference to `kunit_kmalloc_array'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x2d8): undefined reference to `kunit_binary_assert_format'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x2dc): undefined reference to `kunit_binary_assert_format'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x30a): undefined reference to `kunit_do_assertion'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x30e): undefined reference to `kunit_do_assertion'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x476): undefined reference to `kunit_do_assertion'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x47a): undefined reference to `kunit_do_assertion'
nds32le-linux-ld: iio-test-rescale.c:(.text+0x4d8): undefined reference to `kunit_do_assertion'
nds32le-linux-ld: drivers/iio/test/iio-test-rescale.o:iio-test-rescale.c:(.text+0x4dc): more undefined references to `kunit_do_assertion' follow
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend':
(.text+0x330): undefined reference to `fb_set_suspend'
nds32le-linux-ld: (.text+0x334): undefined reference to `fb_set_suspend'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_resume_worker':
drm_fb_helper.c:(.text+0x35c): undefined reference to `fb_set_suspend'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x360): undefined reference to `fb_set_suspend'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_unregister_fbi':
(.text+0x3c4): undefined reference to `unregister_framebuffer'
nds32le-linux-ld: (.text+0x3c8): undefined reference to `unregister_framebuffer'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_fini':
(.text+0x424): undefined reference to `fb_dealloc_cmap'
nds32le-linux-ld: (.text+0x428): undefined reference to `fb_dealloc_cmap'
nds32le-linux-ld: (.text+0x432): undefined reference to `framebuffer_release'
nds32le-linux-ld: (.text+0x436): undefined reference to `framebuffer_release'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_read':
(.text+0x4fc): undefined reference to `fb_sys_read'
nds32le-linux-ld: (.text+0x500): undefined reference to `fb_sys_read'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_alloc_fbi':
(.text+0xec2): undefined reference to `framebuffer_alloc'
nds32le-linux-ld: (.text+0xec6): undefined reference to `framebuffer_alloc'
nds32le-linux-ld: (.text+0xede): undefined reference to `fb_alloc_cmap'
nds32le-linux-ld: (.text+0xee2): undefined reference to `fb_alloc_cmap'
nds32le-linux-ld: (.text+0xf08): undefined reference to `fb_dealloc_cmap'
nds32le-linux-ld: (.text+0xf0c): undefined reference to `fb_dealloc_cmap'
nds32le-linux-ld: (.text+0xf2e): undefined reference to `framebuffer_release'
nds32le-linux-ld: (.text+0xf32): undefined reference to `framebuffer_release'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_generic_probe':
drm_fb_helper.c:(.text+0x102a): undefined reference to `fb_deferred_io_init'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x102e): undefined reference to `fb_deferred_io_init'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `__drm_fb_helper_initial_config_and_unlock':
drm_fb_helper.c:(.text+0x1118): undefined reference to `register_framebuffer'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x111c): undefined reference to `register_framebuffer'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_set_suspend_unlocked':
(.text+0x1680): undefined reference to `fb_set_suspend'
nds32le-linux-ld: (.text+0x1684): undefined reference to `fb_set_suspend'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_write':
(.text+0x1b96): undefined reference to `fb_sys_write'
nds32le-linux-ld: (.text+0x1b9a): undefined reference to `fb_sys_write'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_fillrect':
(.text+0x1bdc): undefined reference to `sys_fillrect'
nds32le-linux-ld: (.text+0x1be0): undefined reference to `sys_fillrect'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_copyarea':
(.text+0x1c0c): undefined reference to `sys_copyarea'
nds32le-linux-ld: (.text+0x1c10): undefined reference to `sys_copyarea'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_sys_imageblit':
(.text+0x1c3c): undefined reference to `sys_imageblit'
nds32le-linux-ld: (.text+0x1c40): undefined reference to `sys_imageblit'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_fillrect':
(.text+0x1c6c): undefined reference to `cfb_fillrect'
nds32le-linux-ld: (.text+0x1c70): undefined reference to `cfb_fillrect'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_copyarea':
(.text+0x1c9c): undefined reference to `cfb_copyarea'
nds32le-linux-ld: (.text+0x1ca0): undefined reference to `cfb_copyarea'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fb_helper_cfb_imageblit':
(.text+0x1ccc): undefined reference to `cfb_imageblit'
nds32le-linux-ld: (.text+0x1cd0): undefined reference to `cfb_imageblit'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_fb_copyarea':
drm_fb_helper.c:(.text+0x1f3e): undefined reference to `cfb_copyarea'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x1f42): undefined reference to `cfb_copyarea'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x1f4e): undefined reference to `sys_copyarea'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x1f52): undefined reference to `sys_copyarea'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_fb_fillrect':
drm_fb_helper.c:(.text+0x1f8e): undefined reference to `cfb_fillrect'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x1f92): undefined reference to `cfb_fillrect'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x1f9e): undefined reference to `sys_fillrect'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x1fa2): undefined reference to `sys_fillrect'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_fb_imageblit':
drm_fb_helper.c:(.text+0x1fde): undefined reference to `cfb_imageblit'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x1fe2): undefined reference to `cfb_imageblit'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x1fee): undefined reference to `sys_imageblit'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x1ff2): undefined reference to `sys_imageblit'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_cleanup':
drm_fb_helper.c:(.text+0x2040): undefined reference to `fb_deferred_io_cleanup'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x2044): undefined reference to `fb_deferred_io_cleanup'
nds32le-linux-ld: drivers/gpu/drm/drm_fb_helper.o: in function `drm_fbdev_client_unregister':
drm_fb_helper.c:(.text+0x20dc): undefined reference to `unregister_framebuffer'
nds32le-linux-ld: drm_fb_helper.c:(.text+0x20e0): undefined reference to `unregister_framebuffer'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
fs/xfs/xfs_icache.c:296:1: warning: unused function 'xfs_inew_wait'
by kernel test robot
Hi Dave,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 923dcc5eb0c111eccd51cc7ce1658537e3c38b25
commit: ab23a7768739a23d21d8a16ca37dff96b1ca957a xfs: per-cpu deferred inode inactivation queues
date: 4 months ago
config: mips-randconfig-c004-20211119 (attached as .config)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-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 ab23a7768739a23d21d8a16ca37dff96b1ca957a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash fs/xfs/
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 >>):
>> fs/xfs/xfs_icache.c:296:1: warning: unused function 'xfs_inew_wait'
xfs_inew_wait(
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set noat
.set push
.set arch=r4000
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 80, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $2 # __xchg_asm
.set pop
move $$1, ${3:z}
.set arch=r4000
sc $$1, $1
beqz $$1, 1b
.set pop
'
clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 14.0.0 (git://gitmirror/llvm_project fefe20b99313d6b0738806d1504652c3b7edb9e0)
Target: mipsel-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-fefe20b993/bin
clang-14: note: diagnostic msg:
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt
vim +/xfs_inew_wait +296 fs/xfs/xfs_icache.c
ad438c4038968e Dave Chinner 2016-05-18 294
7fdff52623b4df Darrick J. Wong 2021-05-31 295 static inline void
ae2c4ac2dd39b2 Brian Foster 2017-04-26 @296 xfs_inew_wait(
ae2c4ac2dd39b2 Brian Foster 2017-04-26 297 struct xfs_inode *ip)
ae2c4ac2dd39b2 Brian Foster 2017-04-26 298 {
ae2c4ac2dd39b2 Brian Foster 2017-04-26 299 wait_queue_head_t *wq = bit_waitqueue(&ip->i_flags, __XFS_INEW_BIT);
ae2c4ac2dd39b2 Brian Foster 2017-04-26 300 DEFINE_WAIT_BIT(wait, &ip->i_flags, __XFS_INEW_BIT);
ae2c4ac2dd39b2 Brian Foster 2017-04-26 301
ae2c4ac2dd39b2 Brian Foster 2017-04-26 302 do {
2141713616c652 Ingo Molnar 2017-03-05 303 prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
ae2c4ac2dd39b2 Brian Foster 2017-04-26 304 if (!xfs_iflags_test(ip, XFS_INEW))
ae2c4ac2dd39b2 Brian Foster 2017-04-26 305 break;
ae2c4ac2dd39b2 Brian Foster 2017-04-26 306 schedule();
ae2c4ac2dd39b2 Brian Foster 2017-04-26 307 } while (true);
2141713616c652 Ingo Molnar 2017-03-05 308 finish_wait(wq, &wait.wq_entry);
ae2c4ac2dd39b2 Brian Foster 2017-04-26 309 }
ae2c4ac2dd39b2 Brian Foster 2017-04-26 310
:::::: The code at line 296 was first introduced by commit
:::::: ae2c4ac2dd39b23a87ddb14ceddc3f2872c6aef5 xfs: update ag iterator to support wait on new inodes
:::::: TO: Brian Foster <bfoster(a)redhat.com>
:::::: CC: Darrick J. Wong <darrick.wong(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_optc.c:139:6: warning: no previous prototype for 'optc1_set_vupdate_keepout'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 923dcc5eb0c111eccd51cc7ce1658537e3c38b25
commit: 9df857f930d6035996d481b4e5bc9ce082990afb drm/amd/display: Move vupdate keepout programming from DCN20 to DCN10
date: 8 months ago
config: x86_64-randconfig-m001-20211109 (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/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 9df857f930d6035996d481b4e5bc9ce082990afb
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_optc.c:139:6: warning: no previous prototype for 'optc1_set_vupdate_keepout' [-Wmissing-prototypes]
139 | void optc1_set_vupdate_keepout(struct timing_generator *optc,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_optc.c:879:6: warning: no previous prototype for 'optc1_setup_manual_trigger' [-Wmissing-prototypes]
879 | void optc1_setup_manual_trigger(struct timing_generator *optc)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_optc.c:897:6: warning: no previous prototype for 'optc1_program_manual_trigger' [-Wmissing-prototypes]
897 | void optc1_program_manual_trigger(struct timing_generator *optc)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/optc1_set_vupdate_keepout +139 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_optc.c
133
134 /**
135 * Vupdate keepout can be set to a window to block the update lock for that pipe from changing.
136 * Start offset begins with vstartup and goes for x number of clocks,
137 * end offset starts from end of vupdate to x number of clocks.
138 */
> 139 void optc1_set_vupdate_keepout(struct timing_generator *optc,
140 struct vupdate_keepout_params *params)
141 {
142 struct optc *optc1 = DCN10TG_FROM_TG(optc);
143
144 REG_SET_3(OTG_VUPDATE_KEEPOUT, 0,
145 MASTER_UPDATE_LOCK_VUPDATE_KEEPOUT_START_OFFSET, params->start_offset,
146 MASTER_UPDATE_LOCK_VUPDATE_KEEPOUT_END_OFFSET, params->end_offset,
147 OTG_MASTER_UPDATE_LOCK_VUPDATE_KEEPOUT_EN, params->enable);
148 }
149
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
drivers/block/drbd/drbd_receiver.c:5315:25: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 923dcc5eb0c111eccd51cc7ce1658537e3c38b25
commit: d991bb1c8da842a2a0b9dc83b1005e655783f861 include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*()
date: 7 months ago
config: mips-randconfig-s032-20211116 (attached as .config)
compiler: mipsel-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://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 d991bb1c8da842a2a0b9dc83b1005e655783f861
# 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=mips
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/block/drbd/drbd_receiver.c:1169:28: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:1173:27: sparse: sparse: cast to restricted __be16
drivers/block/drbd/drbd_receiver.c:1174:28: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:1179:27: sparse: sparse: cast to restricted __be16
drivers/block/drbd/drbd_receiver.c:1180:28: sparse: sparse: cast to restricted __be16
drivers/block/drbd/drbd_receiver.c:822:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:822:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:822:14: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:877:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:877:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:877:14: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:1042:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:1042:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:1042:14: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:1434:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:1434:14: sparse: struct disk_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:1434:14: sparse: struct disk_conf *
drivers/block/drbd/drbd_receiver.c:1588:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:1588:14: sparse: struct disk_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:1588:14: sparse: struct disk_conf *
drivers/block/drbd/drbd_receiver.c:1893:22: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:1897:22: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:1909:22: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:2157:18: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:2191:18: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:2405:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:2405:22: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:2405:22: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:2415:27: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:2415:27: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:2415:27: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:2594:24: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:2622:18: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:2633:20: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:2666:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:2666:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:2666:14: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:2798:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:2798:22: sparse: struct disk_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:2798:22: sparse: struct disk_conf *
drivers/block/drbd/drbd_receiver.c:2854:18: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:2855:18: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:3066:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:3066:23: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:3066:23: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:3142:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:3142:23: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:3142:23: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:3199:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:3199:23: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:3199:23: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:3545:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:3545:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:3545:14: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:3677:27: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:3678:27: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:3679:27: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:3680:27: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:3681:27: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:3682:27: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:3703:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:3703:22: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:3703:22: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:3789:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:3789:9: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:3789:9: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:3946:46: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:4005:55: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:4006:57: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:4007:56: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:4008:53: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:4044:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:4044:25: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:4044:25: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:4049:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:4049:17: sparse: struct disk_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:4049:17: sparse: struct disk_conf *
drivers/block/drbd/drbd_receiver.c:4055:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:4055:17: sparse: struct fifo_buffer [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:4055:17: sparse: struct fifo_buffer *
drivers/block/drbd/drbd_receiver.c:4122:18: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:4123:19: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:4124:19: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:4132:28: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:4132:28: sparse: struct disk_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:4132:28: sparse: struct disk_conf *
drivers/block/drbd/drbd_receiver.c:4174:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:4174:25: sparse: struct disk_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:4174:25: sparse: struct disk_conf *
drivers/block/drbd/drbd_receiver.c:4297:29: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:4397:18: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:4398:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:4423:18: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:4424:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:4456:24: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:4660:52: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:4987:9: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:4987:9: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5005:18: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:5006:16: sparse: sparse: cast to restricted __be32
>> drivers/block/drbd/drbd_receiver.c:5315:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] protocol_min @@ got restricted __be32 [usertype] @@
>> drivers/block/drbd/drbd_receiver.c:5316:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] protocol_max @@ got restricted __be32 [usertype] @@
>> drivers/block/drbd/drbd_receiver.c:5317:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] feature_flags @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_receiver.c:5626:23: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5645:23: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5690:27: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:5691:23: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5700:38: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5742:27: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:5743:23: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5751:38: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5788:27: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:5789:20: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5797:38: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5824:27: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:5831:38: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5833:9: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5833:9: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5833:9: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5833:9: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5854:18: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:5855:16: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5857:38: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5884:44: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5916:18: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:5917:16: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5919:38: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_receiver.c:5921:13: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_receiver.c:5970:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:5970:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:5970:14: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:6060:37: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:6060:37: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:6060:37: sparse: struct net_conf *
drivers/block/drbd/drbd_receiver.c:6157:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_receiver.c:6157:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_receiver.c:6157:14: sparse: struct net_conf *
--
drivers/block/drbd/drbd_main.c:1393:31: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:1406:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sector @@ got restricted __be64 [usertype] @@
drivers/block/drbd/drbd_main.c:1406:19: sparse: expected unsigned long long [usertype] sector
drivers/block/drbd/drbd_main.c:1406:19: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:1407:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] blksize @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:1407:20: sparse: expected unsigned int [usertype] blksize
drivers/block/drbd/drbd_main.c:1407:20: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:1422:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sector @@ got restricted __be64 [usertype] @@
drivers/block/drbd/drbd_main.c:1422:19: sparse: expected unsigned long long [usertype] sector
drivers/block/drbd/drbd_main.c:1422:19: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:1424:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] blksize @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:1424:20: sparse: expected unsigned int [usertype] blksize
drivers/block/drbd/drbd_main.c:1424:20: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:1440:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sector @@ got restricted __be64 [usertype] @@
drivers/block/drbd/drbd_main.c:1440:19: sparse: expected unsigned long long [usertype] sector
drivers/block/drbd/drbd_main.c:1440:19: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:1442:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] blksize @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:1442:20: sparse: expected unsigned int [usertype] blksize
drivers/block/drbd/drbd_main.c:1442:20: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:1455:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sector @@ got restricted __be64 [usertype] @@
drivers/block/drbd/drbd_main.c:1455:19: sparse: expected unsigned long long [usertype] sector
drivers/block/drbd/drbd_main.c:1455:19: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:1457:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] blksize @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:1457:20: sparse: expected unsigned int [usertype] blksize
drivers/block/drbd/drbd_main.c:1457:20: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:1680:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sector @@ got restricted __be64 [usertype] @@
drivers/block/drbd/drbd_main.c:1680:19: sparse: expected unsigned long long [usertype] sector
drivers/block/drbd/drbd_main.c:1680:19: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:1682:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] seq_num @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:1682:20: sparse: expected unsigned int [usertype] seq_num
drivers/block/drbd/drbd_main.c:1682:20: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:1696:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] dp_flags @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:1696:21: sparse: expected unsigned int [usertype] dp_flags
drivers/block/drbd/drbd_main.c:1696:21: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:1701:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] size @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:1701:25: sparse: expected unsigned int [usertype] size
drivers/block/drbd/drbd_main.c:1701:25: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:1711:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] size @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:1711:29: sparse: expected unsigned int [usertype] size
drivers/block/drbd/drbd_main.c:1711:29: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:1787:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sector @@ got restricted __be64 [usertype] @@
drivers/block/drbd/drbd_main.c:1787:19: sparse: expected unsigned long long [usertype] sector
drivers/block/drbd/drbd_main.c:1787:19: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:1810:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sector @@ got restricted __be64 [usertype] @@
drivers/block/drbd/drbd_main.c:1810:19: sparse: expected unsigned long long [usertype] sector
drivers/block/drbd/drbd_main.c:1810:19: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:1811:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] blksize @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:1811:20: sparse: expected unsigned int [usertype] blksize
drivers/block/drbd/drbd_main.c:1811:20: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:1847:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_main.c:1847:40: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_main.c:1847:40: sparse: struct net_conf *
drivers/block/drbd/drbd_main.c:3020:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] la_size_sect @@ got restricted __be64 [usertype] @@
drivers/block/drbd/drbd_main.c:3020:30: sparse: expected unsigned long long [usertype] la_size_sect
drivers/block/drbd/drbd_main.c:3020:30: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:3022:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long @@ got restricted __be64 [usertype] @@
drivers/block/drbd/drbd_main.c:3022:33: sparse: expected unsigned long long
drivers/block/drbd/drbd_main.c:3022:33: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:3023:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] flags @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:3023:23: sparse: expected unsigned int [usertype] flags
drivers/block/drbd/drbd_main.c:3023:23: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:3024:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] magic @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:3024:23: sparse: expected unsigned int [usertype] magic
drivers/block/drbd/drbd_main.c:3024:23: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:3026:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] md_size_sect @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:3026:31: sparse: expected unsigned int [usertype] md_size_sect
drivers/block/drbd/drbd_main.c:3026:31: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:3027:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] al_offset @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:3027:31: sparse: expected unsigned int [usertype] al_offset
drivers/block/drbd/drbd_main.c:3027:31: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:3028:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] al_nr_extents @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:3028:31: sparse: expected unsigned int [usertype] al_nr_extents
drivers/block/drbd/drbd_main.c:3028:31: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:3029:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] bm_bytes_per_bit @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:3029:34: sparse: expected unsigned int [usertype] bm_bytes_per_bit
drivers/block/drbd/drbd_main.c:3029:34: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:3030:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] device_uuid @@ got restricted __be64 [usertype] @@
drivers/block/drbd/drbd_main.c:3030:29: sparse: expected unsigned long long [usertype] device_uuid
drivers/block/drbd/drbd_main.c:3030:29: sparse: got restricted __be64 [usertype]
drivers/block/drbd/drbd_main.c:3032:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] bm_offset @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:3032:27: sparse: expected unsigned int [usertype] bm_offset
drivers/block/drbd/drbd_main.c:3032:27: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:3033:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] la_peer_max_bio_size @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:3033:38: sparse: expected unsigned int [usertype] la_peer_max_bio_size
drivers/block/drbd/drbd_main.c:3033:38: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:3035:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] al_stripes @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:3035:28: sparse: expected unsigned int [usertype] al_stripes
drivers/block/drbd/drbd_main.c:3035:28: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:3036:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] al_stripe_size_4k @@ got restricted __be32 [usertype] @@
drivers/block/drbd/drbd_main.c:3036:35: sparse: expected unsigned int [usertype] al_stripe_size_4k
drivers/block/drbd/drbd_main.c:3036:35: sparse: got restricted __be32 [usertype]
drivers/block/drbd/drbd_main.c:3089:26: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3090:33: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3252:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3253:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3271:13: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3272:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3272:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3272:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3272:17: sparse: sparse: cast to restricted __be32
>> drivers/block/drbd/drbd_main.c:3279:33: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_main.c:3281:36: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_main.c:3282:26: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3283:32: sparse: sparse: cast to restricted __be64
drivers/block/drbd/drbd_main.c:3285:33: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3286:30: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3287:30: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3294:13: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3295:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3295:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3295:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3295:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3299:13: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3300:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3300:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3300:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3300:17: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3310:24: sparse: sparse: cast to restricted __be32
drivers/block/drbd/drbd_main.c:3693:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_main.c:3693:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_main.c:3693:14: sparse: struct net_conf *
drivers/block/drbd/drbd_main.c:860:9: sparse: sparse: context imbalance in 'drbd_print_uuids' - different lock contexts for basic block
drivers/block/drbd/drbd_main.c: note: in included file:
drivers/block/drbd/drbd_int.h:2141:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_int.h:2141:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_int.h:2141:14: sparse: struct net_conf *
drivers/block/drbd/drbd_int.h:2141:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_int.h:2141:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_int.h:2141:14: sparse: struct net_conf *
drivers/block/drbd/drbd_int.h:2141:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_int.h:2141:14: sparse: struct net_conf [noderef] __rcu *
drivers/block/drbd/drbd_int.h:2141:14: sparse: struct net_conf *
drivers/block/drbd/drbd_int.h:1722:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_int.h:1722:14: sparse: struct disk_conf [noderef] __rcu *
drivers/block/drbd/drbd_int.h:1722:14: sparse: struct disk_conf *
vim +5315 drivers/block/drbd/drbd_receiver.c
b411b3637fa71f Philipp Reisner 2009-09-25 5295
b411b3637fa71f Philipp Reisner 2009-09-25 5296 /*
b411b3637fa71f Philipp Reisner 2009-09-25 5297 * We support PRO_VERSION_MIN to PRO_VERSION_MAX. The protocol version
b411b3637fa71f Philipp Reisner 2009-09-25 5298 * we can agree on is stored in agreed_pro_version.
b411b3637fa71f Philipp Reisner 2009-09-25 5299 *
b411b3637fa71f Philipp Reisner 2009-09-25 5300 * feature flags and the reserved array should be enough room for future
b411b3637fa71f Philipp Reisner 2009-09-25 5301 * enhancements of the handshake protocol, and possible plugins...
b411b3637fa71f Philipp Reisner 2009-09-25 5302 *
b411b3637fa71f Philipp Reisner 2009-09-25 5303 * for now, they are expected to be zero, but ignored.
b411b3637fa71f Philipp Reisner 2009-09-25 5304 */
bde89a9e151b48 Andreas Gruenbacher 2011-05-30 5305 static int drbd_send_features(struct drbd_connection *connection)
b411b3637fa71f Philipp Reisner 2009-09-25 5306 {
9f5bdc339e3bec Andreas Gruenbacher 2011-03-28 5307 struct drbd_socket *sock;
9f5bdc339e3bec Andreas Gruenbacher 2011-03-28 5308 struct p_connection_features *p;
b411b3637fa71f Philipp Reisner 2009-09-25 5309
bde89a9e151b48 Andreas Gruenbacher 2011-05-30 5310 sock = &connection->data;
bde89a9e151b48 Andreas Gruenbacher 2011-05-30 5311 p = conn_prepare_command(connection, sock);
9f5bdc339e3bec Andreas Gruenbacher 2011-03-28 5312 if (!p)
e8d17b015eb810 Andreas Gruenbacher 2011-03-16 5313 return -EIO;
b411b3637fa71f Philipp Reisner 2009-09-25 5314 memset(p, 0, sizeof(*p));
b411b3637fa71f Philipp Reisner 2009-09-25 @5315 p->protocol_min = cpu_to_be32(PRO_VERSION_MIN);
b411b3637fa71f Philipp Reisner 2009-09-25 @5316 p->protocol_max = cpu_to_be32(PRO_VERSION_MAX);
20c68fdea1646e Lars Ellenberg 2014-04-28 @5317 p->feature_flags = cpu_to_be32(PRO_FEATURES);
bde89a9e151b48 Andreas Gruenbacher 2011-05-30 5318 return conn_send_command(connection, sock, P_CONNECTION_FEATURES, sizeof(*p), NULL, 0);
b411b3637fa71f Philipp Reisner 2009-09-25 5319 }
b411b3637fa71f Philipp Reisner 2009-09-25 5320
:::::: The code at line 5315 was first introduced by commit
:::::: b411b3637fa71fce9cf2acf0639009500f5892fe The DRBD driver
:::::: TO: Philipp Reisner <philipp.reisner(a)linbit.com>
:::::: CC: Jens Axboe <jens.axboe(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1966 iwl_mvm_rx_mpdu_mq() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 923dcc5eb0c111eccd51cc7ce1658537e3c38b25
commit: ce712478a458fc9ae7488b511088d43d311ccd2e iwlwifi: mvm: Support new rate_n_flags for REPLY_RX_MPDU_CMD and RX_NO_DATA_NOTIF
date: 4 weeks ago
config: mips-randconfig-m031-20211104 (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c:1966 iwl_mvm_rx_mpdu_mq() warn: inconsistent indenting
vim +1966 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1637
c630b477caf789 Sara Sharon 2018-04-09 1638 void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
c630b477caf789 Sara Sharon 2018-04-09 1639 struct iwl_rx_cmd_buffer *rxb, int queue)
c630b477caf789 Sara Sharon 2018-04-09 1640 {
c630b477caf789 Sara Sharon 2018-04-09 1641 struct ieee80211_rx_status *rx_status;
c630b477caf789 Sara Sharon 2018-04-09 1642 struct iwl_rx_packet *pkt = rxb_addr(rxb);
c630b477caf789 Sara Sharon 2018-04-09 1643 struct iwl_rx_mpdu_desc *desc = (void *)pkt->data;
c630b477caf789 Sara Sharon 2018-04-09 1644 struct ieee80211_hdr *hdr;
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1645 u32 len;
efc0ec5afb6e14 Johannes Berg 2020-12-09 1646 u32 pkt_len = iwl_rx_packet_payload_len(pkt);
c630b477caf789 Sara Sharon 2018-04-09 1647 u32 rate_n_flags, gp2_on_air_rise;
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1648 u16 phy_info;
c630b477caf789 Sara Sharon 2018-04-09 1649 struct ieee80211_sta *sta = NULL;
c630b477caf789 Sara Sharon 2018-04-09 1650 struct sk_buff *skb;
c630b477caf789 Sara Sharon 2018-04-09 1651 u8 crypt_len = 0, channel, energy_a, energy_b;
c630b477caf789 Sara Sharon 2018-04-09 1652 size_t desc_size;
6721039d5b8adf Shaul Triebitz 2018-07-02 1653 struct iwl_mvm_rx_phy_data phy_data = {
6721039d5b8adf Shaul Triebitz 2018-07-02 1654 .info_type = IWL_RX_PHY_INFO_TYPE_NONE,
6721039d5b8adf Shaul Triebitz 2018-07-02 1655 };
9bf13bee2d74a3 Johannes Berg 2018-11-20 1656 bool csi = false;
ce712478a458fc Luca Coelho 2021-10-17 1657 u32 format;
ce712478a458fc Luca Coelho 2021-10-17 1658 bool is_sgi;
c630b477caf789 Sara Sharon 2018-04-09 1659
c630b477caf789 Sara Sharon 2018-04-09 1660 if (unlikely(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)))
c630b477caf789 Sara Sharon 2018-04-09 1661 return;
c630b477caf789 Sara Sharon 2018-04-09 1662
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1663 if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1664 desc_size = sizeof(*desc);
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1665 else
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1666 desc_size = IWL_RX_DESC_SIZE_V1;
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1667
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1668 if (unlikely(pkt_len < desc_size)) {
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1669 IWL_DEBUG_DROP(mvm, "Bad REPLY_RX_MPDU_CMD size\n");
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1670 return;
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1671 }
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1672
3681021fc6af58 Johannes Berg 2019-11-15 1673 if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
c630b477caf789 Sara Sharon 2018-04-09 1674 rate_n_flags = le32_to_cpu(desc->v3.rate_n_flags);
c630b477caf789 Sara Sharon 2018-04-09 1675 channel = desc->v3.channel;
c630b477caf789 Sara Sharon 2018-04-09 1676 gp2_on_air_rise = le32_to_cpu(desc->v3.gp2_on_air_rise);
c630b477caf789 Sara Sharon 2018-04-09 1677 energy_a = desc->v3.energy_a;
c630b477caf789 Sara Sharon 2018-04-09 1678 energy_b = desc->v3.energy_b;
6721039d5b8adf Shaul Triebitz 2018-07-02 1679
6721039d5b8adf Shaul Triebitz 2018-07-02 1680 phy_data.d0 = desc->v3.phy_data0;
6721039d5b8adf Shaul Triebitz 2018-07-02 1681 phy_data.d1 = desc->v3.phy_data1;
6721039d5b8adf Shaul Triebitz 2018-07-02 1682 phy_data.d2 = desc->v3.phy_data2;
6721039d5b8adf Shaul Triebitz 2018-07-02 1683 phy_data.d3 = desc->v3.phy_data3;
c630b477caf789 Sara Sharon 2018-04-09 1684 } else {
c630b477caf789 Sara Sharon 2018-04-09 1685 rate_n_flags = le32_to_cpu(desc->v1.rate_n_flags);
c630b477caf789 Sara Sharon 2018-04-09 1686 channel = desc->v1.channel;
c630b477caf789 Sara Sharon 2018-04-09 1687 gp2_on_air_rise = le32_to_cpu(desc->v1.gp2_on_air_rise);
c630b477caf789 Sara Sharon 2018-04-09 1688 energy_a = desc->v1.energy_a;
c630b477caf789 Sara Sharon 2018-04-09 1689 energy_b = desc->v1.energy_b;
6721039d5b8adf Shaul Triebitz 2018-07-02 1690
6721039d5b8adf Shaul Triebitz 2018-07-02 1691 phy_data.d0 = desc->v1.phy_data0;
6721039d5b8adf Shaul Triebitz 2018-07-02 1692 phy_data.d1 = desc->v1.phy_data1;
6721039d5b8adf Shaul Triebitz 2018-07-02 1693 phy_data.d2 = desc->v1.phy_data2;
6721039d5b8adf Shaul Triebitz 2018-07-02 1694 phy_data.d3 = desc->v1.phy_data3;
c630b477caf789 Sara Sharon 2018-04-09 1695 }
ce712478a458fc Luca Coelho 2021-10-17 1696 if (iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP,
ce712478a458fc Luca Coelho 2021-10-17 1697 REPLY_RX_MPDU_CMD, 0) < 4) {
ce712478a458fc Luca Coelho 2021-10-17 1698 rate_n_flags = iwl_new_rate_from_v1(rate_n_flags);
ce712478a458fc Luca Coelho 2021-10-17 1699 IWL_DEBUG_DROP(mvm, "Got old format rate, converting. New rate: 0x%x\n",
ce712478a458fc Luca Coelho 2021-10-17 1700 rate_n_flags);
ce712478a458fc Luca Coelho 2021-10-17 1701 }
ce712478a458fc Luca Coelho 2021-10-17 1702 format = rate_n_flags & RATE_MCS_MOD_TYPE_MSK;
c630b477caf789 Sara Sharon 2018-04-09 1703
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1704 len = le16_to_cpu(desc->mpdu_len);
6721039d5b8adf Shaul Triebitz 2018-07-02 1705
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1706 if (unlikely(len + desc_size > pkt_len)) {
efc0ec5afb6e14 Johannes Berg 2020-12-09 1707 IWL_DEBUG_DROP(mvm, "FW lied about packet len\n");
efc0ec5afb6e14 Johannes Berg 2020-12-09 1708 return;
efc0ec5afb6e14 Johannes Berg 2020-12-09 1709 }
efc0ec5afb6e14 Johannes Berg 2020-12-09 1710
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1711 phy_info = le16_to_cpu(desc->phy_info);
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1712 phy_data.d4 = desc->phy_data4;
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1713
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1714 if (phy_info & IWL_RX_MPDU_PHY_TSF_OVERLOAD)
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1715 phy_data.info_type =
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1716 le32_get_bits(phy_data.d1,
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1717 IWL_RX_PHY_DATA1_INFO_TYPE_MASK);
b8aba27cdc0ea6 Johannes Berg 2020-12-09 1718
c630b477caf789 Sara Sharon 2018-04-09 1719 hdr = (void *)(pkt->data + desc_size);
c630b477caf789 Sara Sharon 2018-04-09 1720 /* Dont use dev_alloc_skb(), we'll have enough headroom once
c630b477caf789 Sara Sharon 2018-04-09 1721 * ieee80211_hdr pulled.
c630b477caf789 Sara Sharon 2018-04-09 1722 */
c630b477caf789 Sara Sharon 2018-04-09 1723 skb = alloc_skb(128, GFP_ATOMIC);
c630b477caf789 Sara Sharon 2018-04-09 1724 if (!skb) {
c630b477caf789 Sara Sharon 2018-04-09 1725 IWL_ERR(mvm, "alloc_skb failed\n");
c630b477caf789 Sara Sharon 2018-04-09 1726 return;
c630b477caf789 Sara Sharon 2018-04-09 1727 }
c630b477caf789 Sara Sharon 2018-04-09 1728
c630b477caf789 Sara Sharon 2018-04-09 1729 if (desc->mac_flags2 & IWL_RX_MPDU_MFLG2_PAD) {
c630b477caf789 Sara Sharon 2018-04-09 1730 /*
c630b477caf789 Sara Sharon 2018-04-09 1731 * If the device inserted padding it means that (it thought)
c630b477caf789 Sara Sharon 2018-04-09 1732 * the 802.11 header wasn't a multiple of 4 bytes long. In
c630b477caf789 Sara Sharon 2018-04-09 1733 * this case, reserve two bytes at the start of the SKB to
c630b477caf789 Sara Sharon 2018-04-09 1734 * align the payload properly in case we end up copying it.
c630b477caf789 Sara Sharon 2018-04-09 1735 */
c630b477caf789 Sara Sharon 2018-04-09 1736 skb_reserve(skb, 2);
514c30696fbc25 Luca Coelho 2018-06-24 1737 }
514c30696fbc25 Luca Coelho 2018-06-24 1738
18ead597daa17a Golan Ben Ami 2018-02-05 1739 rx_status = IEEE80211_SKB_RXCB(skb);
18ead597daa17a Golan Ben Ami 2018-02-05 1740
dabf9844385885 Johannes Berg 2018-04-26 1741 /* This may be overridden by iwl_mvm_rx_he() to HE_RU */
ce712478a458fc Luca Coelho 2021-10-17 1742 switch (rate_n_flags & RATE_MCS_CHAN_WIDTH_MSK) {
dabf9844385885 Johannes Berg 2018-04-26 1743 case RATE_MCS_CHAN_WIDTH_20:
dabf9844385885 Johannes Berg 2018-04-26 1744 break;
dabf9844385885 Johannes Berg 2018-04-26 1745 case RATE_MCS_CHAN_WIDTH_40:
dabf9844385885 Johannes Berg 2018-04-26 1746 rx_status->bw = RATE_INFO_BW_40;
dabf9844385885 Johannes Berg 2018-04-26 1747 break;
dabf9844385885 Johannes Berg 2018-04-26 1748 case RATE_MCS_CHAN_WIDTH_80:
dabf9844385885 Johannes Berg 2018-04-26 1749 rx_status->bw = RATE_INFO_BW_80;
dabf9844385885 Johannes Berg 2018-04-26 1750 break;
dabf9844385885 Johannes Berg 2018-04-26 1751 case RATE_MCS_CHAN_WIDTH_160:
dabf9844385885 Johannes Berg 2018-04-26 1752 rx_status->bw = RATE_INFO_BW_160;
dabf9844385885 Johannes Berg 2018-04-26 1753 break;
dabf9844385885 Johannes Berg 2018-04-26 1754 }
dabf9844385885 Johannes Berg 2018-04-26 1755
ce712478a458fc Luca Coelho 2021-10-17 1756 if (format == RATE_MCS_HE_MSK)
6721039d5b8adf Shaul Triebitz 2018-07-02 1757 iwl_mvm_rx_he(mvm, skb, &phy_data, rate_n_flags,
6721039d5b8adf Shaul Triebitz 2018-07-02 1758 phy_info, queue);
6721039d5b8adf Shaul Triebitz 2018-07-02 1759
6721039d5b8adf Shaul Triebitz 2018-07-02 1760 iwl_mvm_decode_lsig(skb, &phy_data);
c630b477caf789 Sara Sharon 2018-04-09 1761
780e87c29e7768 Johannes Berg 2015-09-03 1762 /*
780e87c29e7768 Johannes Berg 2015-09-03 1763 * Keep packets with CRC errors (and with overrun) for monitor mode
780e87c29e7768 Johannes Berg 2015-09-03 1764 * (otherwise the firmware discards them) but mark them as bad.
780e87c29e7768 Johannes Berg 2015-09-03 1765 */
e365e7de63e5b6 Johannes Berg 2020-09-30 1766 if (!(desc->status & cpu_to_le32(IWL_RX_MPDU_STATUS_CRC_OK)) ||
e365e7de63e5b6 Johannes Berg 2020-09-30 1767 !(desc->status & cpu_to_le32(IWL_RX_MPDU_STATUS_OVERRUN_OK))) {
780e87c29e7768 Johannes Berg 2015-09-03 1768 IWL_DEBUG_RX(mvm, "Bad CRC or FIFO: 0x%08X.\n",
e365e7de63e5b6 Johannes Berg 2020-09-30 1769 le32_to_cpu(desc->status));
780e87c29e7768 Johannes Berg 2015-09-03 1770 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
780e87c29e7768 Johannes Berg 2015-09-03 1771 }
fbe4112791b8fe Sara Sharon 2016-04-04 1772 /* set the preamble flag if appropriate */
ce712478a458fc Luca Coelho 2021-10-17 1773 if (format == RATE_MCS_CCK_MSK &&
486af86332c7f0 Johannes Berg 2018-10-29 1774 phy_info & IWL_RX_MPDU_PHY_SHORT_PREAMBLE)
7fdd69c5af2160 Johannes Berg 2017-04-26 1775 rx_status->enc_flags |= RX_ENC_FLAG_SHORTPRE;
780e87c29e7768 Johannes Berg 2015-09-03 1776
fbe4112791b8fe Sara Sharon 2016-04-04 1777 if (likely(!(phy_info & IWL_RX_MPDU_PHY_TSF_OVERLOAD))) {
18ead597daa17a Golan Ben Ami 2018-02-05 1778 u64 tsf_on_air_rise;
18ead597daa17a Golan Ben Ami 2018-02-05 1779
286ca8eb4d0a97 Luca Coelho 2019-07-12 1780 if (mvm->trans->trans_cfg->device_family >=
3681021fc6af58 Johannes Berg 2019-11-15 1781 IWL_DEVICE_FAMILY_AX210)
18ead597daa17a Golan Ben Ami 2018-02-05 1782 tsf_on_air_rise = le64_to_cpu(desc->v3.tsf_on_air_rise);
18ead597daa17a Golan Ben Ami 2018-02-05 1783 else
18ead597daa17a Golan Ben Ami 2018-02-05 1784 tsf_on_air_rise = le64_to_cpu(desc->v1.tsf_on_air_rise);
18ead597daa17a Golan Ben Ami 2018-02-05 1785
18ead597daa17a Golan Ben Ami 2018-02-05 1786 rx_status->mactime = tsf_on_air_rise;
fbe4112791b8fe Sara Sharon 2016-04-04 1787 /* TSF as indicated by the firmware is at INA time */
fbe4112791b8fe Sara Sharon 2016-04-04 1788 rx_status->flag |= RX_FLAG_MACTIME_PLCP_START;
bd6fc6552b053f Liad Kaufman 2018-03-04 1789 }
bd6fc6552b053f Liad Kaufman 2018-03-04 1790
18ead597daa17a Golan Ben Ami 2018-02-05 1791 rx_status->device_timestamp = gp2_on_air_rise;
65b9425ce9aa10 Tova Mussai 2019-08-01 1792 if (iwl_mvm_is_band_in_rx_supported(mvm)) {
65b9425ce9aa10 Tova Mussai 2019-08-01 1793 u8 band = BAND_IN_RX_STATUS(desc->mac_phy_idx);
65b9425ce9aa10 Tova Mussai 2019-08-01 1794
65b9425ce9aa10 Tova Mussai 2019-08-01 1795 rx_status->band = iwl_mvm_nl80211_band_from_rx_msdu(band);
65b9425ce9aa10 Tova Mussai 2019-08-01 1796 } else {
18ead597daa17a Golan Ben Ami 2018-02-05 1797 rx_status->band = channel > 14 ? NL80211_BAND_5GHZ :
57fbcce37be7c1 Johannes Berg 2016-04-12 1798 NL80211_BAND_2GHZ;
65b9425ce9aa10 Tova Mussai 2019-08-01 1799 }
18ead597daa17a Golan Ben Ami 2018-02-05 1800 rx_status->freq = ieee80211_channel_to_frequency(channel,
780e87c29e7768 Johannes Berg 2015-09-03 1801 rx_status->band);
18ead597daa17a Golan Ben Ami 2018-02-05 1802 iwl_mvm_get_signal_strength(mvm, rx_status, rate_n_flags, energy_a,
18ead597daa17a Golan Ben Ami 2018-02-05 1803 energy_b);
fbe4112791b8fe Sara Sharon 2016-04-04 1804
fbe4112791b8fe Sara Sharon 2016-04-04 1805 /* update aggregation data for monitor sake on default queue */
fbe4112791b8fe Sara Sharon 2016-04-04 1806 if (!queue && (phy_info & IWL_RX_MPDU_PHY_AMPDU)) {
fbe4112791b8fe Sara Sharon 2016-04-04 1807 bool toggle_bit = phy_info & IWL_RX_MPDU_PHY_AMPDU_TOGGLE;
fbe4112791b8fe Sara Sharon 2016-04-04 1808
fbe4112791b8fe Sara Sharon 2016-04-04 1809 rx_status->flag |= RX_FLAG_AMPDU_DETAILS;
5213e8a8a28d2c Johannes Berg 2018-10-25 1810 /*
5213e8a8a28d2c Johannes Berg 2018-10-25 1811 * Toggle is switched whenever new aggregation starts. Make
5213e8a8a28d2c Johannes Berg 2018-10-25 1812 * sure ampdu_reference is never 0 so we can later use it to
5213e8a8a28d2c Johannes Berg 2018-10-25 1813 * see if the frame was really part of an A-MPDU or not.
5213e8a8a28d2c Johannes Berg 2018-10-25 1814 */
fbe4112791b8fe Sara Sharon 2016-04-04 1815 if (toggle_bit != mvm->ampdu_toggle) {
fbe4112791b8fe Sara Sharon 2016-04-04 1816 mvm->ampdu_ref++;
5213e8a8a28d2c Johannes Berg 2018-10-25 1817 if (mvm->ampdu_ref == 0)
5213e8a8a28d2c Johannes Berg 2018-10-25 1818 mvm->ampdu_ref++;
fbe4112791b8fe Sara Sharon 2016-04-04 1819 mvm->ampdu_toggle = toggle_bit;
fbe4112791b8fe Sara Sharon 2016-04-04 1820 }
1f7698abedeeb3 Johannes Berg 2018-11-08 1821 rx_status->ampdu_reference = mvm->ampdu_ref;
fbe4112791b8fe Sara Sharon 2016-04-04 1822 }
780e87c29e7768 Johannes Berg 2015-09-03 1823
3864be551405b5 Luca Coelho 2019-01-30 1824 if (unlikely(mvm->monitor_on))
3864be551405b5 Luca Coelho 2019-01-30 1825 iwl_mvm_add_rtap_sniffer_config(mvm, skb);
3864be551405b5 Luca Coelho 2019-01-30 1826
780e87c29e7768 Johannes Berg 2015-09-03 1827 rcu_read_lock();
780e87c29e7768 Johannes Berg 2015-09-03 1828
e365e7de63e5b6 Johannes Berg 2020-09-30 1829 if (desc->status & cpu_to_le32(IWL_RX_MPDU_STATUS_SRC_STA_FOUND)) {
e365e7de63e5b6 Johannes Berg 2020-09-30 1830 u8 id = le32_get_bits(desc->status, IWL_RX_MPDU_STATUS_STA_ID);
780e87c29e7768 Johannes Berg 2015-09-03 1831
be9ae34ead42f8 Nathan Errera 2020-10-08 1832 if (!WARN_ON_ONCE(id >= mvm->fw->ucode_capa.num_stations)) {
780e87c29e7768 Johannes Berg 2015-09-03 1833 sta = rcu_dereference(mvm->fw_id_to_mac_id[id]);
780e87c29e7768 Johannes Berg 2015-09-03 1834 if (IS_ERR(sta))
780e87c29e7768 Johannes Berg 2015-09-03 1835 sta = NULL;
780e87c29e7768 Johannes Berg 2015-09-03 1836 }
780e87c29e7768 Johannes Berg 2015-09-03 1837 } else if (!is_multicast_ether_addr(hdr->addr2)) {
780e87c29e7768 Johannes Berg 2015-09-03 1838 /*
780e87c29e7768 Johannes Berg 2015-09-03 1839 * This is fine since we prevent two stations with the same
780e87c29e7768 Johannes Berg 2015-09-03 1840 * address from being added.
780e87c29e7768 Johannes Berg 2015-09-03 1841 */
780e87c29e7768 Johannes Berg 2015-09-03 1842 sta = ieee80211_find_sta_by_ifaddr(mvm->hw, hdr->addr2, NULL);
780e87c29e7768 Johannes Berg 2015-09-03 1843 }
780e87c29e7768 Johannes Berg 2015-09-03 1844
b1fdc2505abcb7 Johannes Berg 2021-02-05 1845 if (iwl_mvm_rx_crypto(mvm, sta, hdr, rx_status, phy_info, desc,
b1fdc2505abcb7 Johannes Berg 2021-02-05 1846 le32_to_cpu(pkt->len_n_flags), queue,
b1fdc2505abcb7 Johannes Berg 2021-02-05 1847 &crypt_len)) {
b1fdc2505abcb7 Johannes Berg 2021-02-05 1848 kfree_skb(skb);
b1fdc2505abcb7 Johannes Berg 2021-02-05 1849 goto out;
b1fdc2505abcb7 Johannes Berg 2021-02-05 1850 }
b1fdc2505abcb7 Johannes Berg 2021-02-05 1851
780e87c29e7768 Johannes Berg 2015-09-03 1852 if (sta) {
780e87c29e7768 Johannes Berg 2015-09-03 1853 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
d3a108a48dc670 Andrei Otcheretianski 2016-02-28 1854 struct ieee80211_vif *tx_blocked_vif =
d3a108a48dc670 Andrei Otcheretianski 2016-02-28 1855 rcu_dereference(mvm->csa_tx_blocked_vif);
10b2b2019d810f Sara Sharon 2016-03-20 1856 u8 baid = (u8)((le32_to_cpu(desc->reorder_data) &
10b2b2019d810f Sara Sharon 2016-03-20 1857 IWL_RX_MPDU_REORDER_BAID_MASK) >>
10b2b2019d810f Sara Sharon 2016-03-20 1858 IWL_RX_MPDU_REORDER_BAID_SHIFT);
6c042d7505d082 Sara Sharon 2018-06-12 1859 struct iwl_fw_dbg_trigger_tlv *trig;
6c042d7505d082 Sara Sharon 2018-06-12 1860 struct ieee80211_vif *vif = mvmsta->vif;
780e87c29e7768 Johannes Berg 2015-09-03 1861
7d9d0d562b54d2 Luca Coelho 2018-04-12 1862 if (!mvm->tcm.paused && len >= sizeof(*hdr) &&
7d9d0d562b54d2 Luca Coelho 2018-04-12 1863 !is_multicast_ether_addr(hdr->addr1) &&
7d9d0d562b54d2 Luca Coelho 2018-04-12 1864 ieee80211_is_data(hdr->frame_control) &&
7d9d0d562b54d2 Luca Coelho 2018-04-12 1865 time_after(jiffies, mvm->tcm.ts + MVM_TCM_PERIOD))
7d9d0d562b54d2 Luca Coelho 2018-04-12 1866 schedule_delayed_work(&mvm->tcm.work, 0);
7d9d0d562b54d2 Luca Coelho 2018-04-12 1867
780e87c29e7768 Johannes Berg 2015-09-03 1868 /*
780e87c29e7768 Johannes Berg 2015-09-03 1869 * We have tx blocked stations (with CS bit). If we heard
780e87c29e7768 Johannes Berg 2015-09-03 1870 * frames from a blocked station on a new channel we can
780e87c29e7768 Johannes Berg 2015-09-03 1871 * TX to it again.
780e87c29e7768 Johannes Berg 2015-09-03 1872 */
6c042d7505d082 Sara Sharon 2018-06-12 1873 if (unlikely(tx_blocked_vif) && tx_blocked_vif == vif) {
d3a108a48dc670 Andrei Otcheretianski 2016-02-28 1874 struct iwl_mvm_vif *mvmvif =
d3a108a48dc670 Andrei Otcheretianski 2016-02-28 1875 iwl_mvm_vif_from_mac80211(tx_blocked_vif);
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1876 struct iwl_rx_sta_csa rx_sta_csa = {
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1877 .all_sta_unblocked = true,
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1878 .vif = tx_blocked_vif,
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1879 };
d3a108a48dc670 Andrei Otcheretianski 2016-02-28 1880
d3a108a48dc670 Andrei Otcheretianski 2016-02-28 1881 if (mvmvif->csa_target_freq == rx_status->freq)
d3a108a48dc670 Andrei Otcheretianski 2016-02-28 1882 iwl_mvm_sta_modify_disable_tx_ap(mvm, sta,
d3a108a48dc670 Andrei Otcheretianski 2016-02-28 1883 false);
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1884 ieee80211_iterate_stations_atomic(mvm->hw,
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1885 iwl_mvm_rx_get_sta_block_tx,
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1886 &rx_sta_csa);
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1887
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1888 if (rx_sta_csa.all_sta_unblocked) {
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1889 RCU_INIT_POINTER(mvm->csa_tx_blocked_vif, NULL);
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1890 /* Unblock BCAST / MCAST station */
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1891 iwl_mvm_modify_all_sta_disable_tx(mvm, mvmvif, false);
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1892 cancel_delayed_work_sync(&mvm->cs_tx_unblock_dwork);
e5d153ec54f029 Emmanuel Grumbach 2021-02-05 1893 }
d3a108a48dc670 Andrei Otcheretianski 2016-02-28 1894 }
780e87c29e7768 Johannes Berg 2015-09-03 1895
ecaf71de414345 Gregory Greenman 2017-11-01 1896 rs_update_last_rssi(mvm, mvmsta, rx_status);
780e87c29e7768 Johannes Berg 2015-09-03 1897
6c042d7505d082 Sara Sharon 2018-06-12 1898 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt,
6c042d7505d082 Sara Sharon 2018-06-12 1899 ieee80211_vif_to_wdev(vif),
6c042d7505d082 Sara Sharon 2018-06-12 1900 FW_DBG_TRIGGER_RSSI);
6c042d7505d082 Sara Sharon 2018-06-12 1901
6c042d7505d082 Sara Sharon 2018-06-12 1902 if (trig && ieee80211_is_beacon(hdr->frame_control)) {
780e87c29e7768 Johannes Berg 2015-09-03 1903 struct iwl_fw_dbg_trigger_low_rssi *rssi_trig;
780e87c29e7768 Johannes Berg 2015-09-03 1904 s32 rssi;
780e87c29e7768 Johannes Berg 2015-09-03 1905
780e87c29e7768 Johannes Berg 2015-09-03 1906 rssi_trig = (void *)trig->data;
780e87c29e7768 Johannes Berg 2015-09-03 1907 rssi = le32_to_cpu(rssi_trig->rssi);
780e87c29e7768 Johannes Berg 2015-09-03 1908
6c042d7505d082 Sara Sharon 2018-06-12 1909 if (rx_status->signal < rssi)
7174beb60c5320 Johannes Berg 2017-06-01 1910 iwl_fw_dbg_collect_trig(&mvm->fwrt, trig,
7174beb60c5320 Johannes Berg 2017-06-01 1911 NULL);
780e87c29e7768 Johannes Berg 2015-09-03 1912 }
780e87c29e7768 Johannes Berg 2015-09-03 1913
780e87c29e7768 Johannes Berg 2015-09-03 1914 if (ieee80211_is_data(hdr->frame_control))
59ca9572dee98f Johannes Berg 2020-09-26 1915 iwl_mvm_rx_csum(mvm, sta, skb, pkt);
a571f5f635ef40 Sara Sharon 2015-12-07 1916
5ab2ba931255d8 Sara Sharon 2016-03-29 1917 if (iwl_mvm_is_dup(sta, queue, rx_status, hdr, desc)) {
a571f5f635ef40 Sara Sharon 2015-12-07 1918 kfree_skb(skb);
cb2de6bb4f1296 Sara Sharon 2017-02-13 1919 goto out;
a571f5f635ef40 Sara Sharon 2015-12-07 1920 }
62d23403d4a201 Sara Sharon 2016-03-06 1921
62d23403d4a201 Sara Sharon 2016-03-06 1922 /*
62d23403d4a201 Sara Sharon 2016-03-06 1923 * Our hardware de-aggregates AMSDUs but copies the mac header
62d23403d4a201 Sara Sharon 2016-03-06 1924 * as it to the de-aggregated MPDUs. We need to turn off the
62d23403d4a201 Sara Sharon 2016-03-06 1925 * AMSDU bit in the QoS control ourselves.
9dfa21517a75d6 Sara Sharon 2017-02-14 1926 * In addition, HW reverses addr3 and addr4 - reverse it back.
62d23403d4a201 Sara Sharon 2016-03-06 1927 */
62d23403d4a201 Sara Sharon 2016-03-06 1928 if ((desc->mac_flags2 & IWL_RX_MPDU_MFLG2_AMSDU) &&
62d23403d4a201 Sara Sharon 2016-03-06 1929 !WARN_ON(!ieee80211_is_data_qos(hdr->frame_control))) {
62d23403d4a201 Sara Sharon 2016-03-06 1930 u8 *qc = ieee80211_get_qos_ctl(hdr);
62d23403d4a201 Sara Sharon 2016-03-06 1931
62d23403d4a201 Sara Sharon 2016-03-06 1932 *qc &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT;
a56cb4f0d82635 Sara Sharon 2017-01-31 1933
286ca8eb4d0a97 Luca Coelho 2019-07-12 1934 if (mvm->trans->trans_cfg->device_family ==
e4d7220813e986 Sara Sharon 2017-12-19 1935 IWL_DEVICE_FAMILY_9000) {
e4d7220813e986 Sara Sharon 2017-12-19 1936 iwl_mvm_flip_address(hdr->addr3);
9dfa21517a75d6 Sara Sharon 2017-02-14 1937
e4d7220813e986 Sara Sharon 2017-12-19 1938 if (ieee80211_has_a4(hdr->frame_control))
e4d7220813e986 Sara Sharon 2017-12-19 1939 iwl_mvm_flip_address(hdr->addr4);
9dfa21517a75d6 Sara Sharon 2017-02-14 1940 }
62d23403d4a201 Sara Sharon 2016-03-06 1941 }
5d43eab6632df3 Sara Sharon 2017-02-02 1942 if (baid != IWL_RX_REORDER_DATA_INVALID_BAID) {
5d43eab6632df3 Sara Sharon 2017-02-02 1943 u32 reorder_data = le32_to_cpu(desc->reorder_data);
5d43eab6632df3 Sara Sharon 2017-02-02 1944
5d43eab6632df3 Sara Sharon 2017-02-02 1945 iwl_mvm_agg_rx_received(mvm, reorder_data, baid);
5d43eab6632df3 Sara Sharon 2017-02-02 1946 }
780e87c29e7768 Johannes Berg 2015-09-03 1947 }
780e87c29e7768 Johannes Berg 2015-09-03 1948
ce712478a458fc Luca Coelho 2021-10-17 1949 is_sgi = format == RATE_MCS_HE_MSK ?
ce712478a458fc Luca Coelho 2021-10-17 1950 iwl_he_is_sgi(rate_n_flags) :
ce712478a458fc Luca Coelho 2021-10-17 1951 rate_n_flags & RATE_MCS_SGI_MSK;
ce712478a458fc Luca Coelho 2021-10-17 1952
ce712478a458fc Luca Coelho 2021-10-17 1953 if (!(format == RATE_MCS_CCK_MSK) && is_sgi)
7fdd69c5af2160 Johannes Berg 2017-04-26 1954 rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
ce712478a458fc Luca Coelho 2021-10-17 1955 if (rate_n_flags & RATE_MCS_LDPC_MSK)
7fdd69c5af2160 Johannes Berg 2017-04-26 1956 rx_status->enc_flags |= RX_ENC_FLAG_LDPC;
ce712478a458fc Luca Coelho 2021-10-17 1957 if (format == RATE_MCS_HT_MSK) {
77e409455f4171 Sara Sharon 2017-01-11 1958 u8 stbc = (rate_n_flags & RATE_MCS_STBC_MSK) >>
780e87c29e7768 Johannes Berg 2015-09-03 1959 RATE_MCS_STBC_POS;
da6a4352e7c867 Johannes Berg 2017-04-26 1960 rx_status->encoding = RX_ENC_HT;
ce712478a458fc Luca Coelho 2021-10-17 1961 rx_status->rate_idx = RATE_HT_MCS_INDEX(rate_n_flags);
7fdd69c5af2160 Johannes Berg 2017-04-26 1962 rx_status->enc_flags |= stbc << RX_ENC_FLAG_STBC_SHIFT;
ce712478a458fc Luca Coelho 2021-10-17 1963 } else if (format == RATE_MCS_VHT_MSK) {
77e409455f4171 Sara Sharon 2017-01-11 1964 u8 stbc = (rate_n_flags & RATE_MCS_STBC_MSK) >>
780e87c29e7768 Johannes Berg 2015-09-03 1965 RATE_MCS_STBC_POS;
8613c94815fcdd Johannes Berg 2017-04-26 @1966 rx_status->nss =
ce712478a458fc Luca Coelho 2021-10-17 1967 ((rate_n_flags & RATE_MCS_NSS_MSK) >>
ce712478a458fc Luca Coelho 2021-10-17 1968 RATE_MCS_NSS_POS) + 1;
ce712478a458fc Luca Coelho 2021-10-17 1969 rx_status->rate_idx = rate_n_flags & RATE_MCS_CODE_MSK;
da6a4352e7c867 Johannes Berg 2017-04-26 1970 rx_status->encoding = RX_ENC_VHT;
7fdd69c5af2160 Johannes Berg 2017-04-26 1971 rx_status->enc_flags |= stbc << RX_ENC_FLAG_STBC_SHIFT;
780e87c29e7768 Johannes Berg 2015-09-03 1972 if (rate_n_flags & RATE_MCS_BF_MSK)
7fdd69c5af2160 Johannes Berg 2017-04-26 1973 rx_status->enc_flags |= RX_ENC_FLAG_BF;
ce712478a458fc Luca Coelho 2021-10-17 1974 } else if (!(format == RATE_MCS_HE_MSK)) {
ce712478a458fc Luca Coelho 2021-10-17 1975 int rate = iwl_mvm_legacy_hw_idx_to_mac80211_idx(rate_n_flags,
780e87c29e7768 Johannes Berg 2015-09-03 1976 rx_status->band);
cb2de6bb4f1296 Sara Sharon 2017-02-13 1977
cb2de6bb4f1296 Sara Sharon 2017-02-13 1978 if (WARN(rate < 0 || rate > 0xFF,
cb2de6bb4f1296 Sara Sharon 2017-02-13 1979 "Invalid rate flags 0x%x, band %d,\n",
cb2de6bb4f1296 Sara Sharon 2017-02-13 1980 rate_n_flags, rx_status->band)) {
cb2de6bb4f1296 Sara Sharon 2017-02-13 1981 kfree_skb(skb);
cb2de6bb4f1296 Sara Sharon 2017-02-13 1982 goto out;
cb2de6bb4f1296 Sara Sharon 2017-02-13 1983 }
cb2de6bb4f1296 Sara Sharon 2017-02-13 1984 rx_status->rate_idx = rate;
780e87c29e7768 Johannes Berg 2015-09-03 1985 }
780e87c29e7768 Johannes Berg 2015-09-03 1986
fbe4112791b8fe Sara Sharon 2016-04-04 1987 /* management stuff on default queue */
fbe4112791b8fe Sara Sharon 2016-04-04 1988 if (!queue) {
fbe4112791b8fe Sara Sharon 2016-04-04 1989 if (unlikely((ieee80211_is_beacon(hdr->frame_control) ||
fbe4112791b8fe Sara Sharon 2016-04-04 1990 ieee80211_is_probe_resp(hdr->frame_control)) &&
fbe4112791b8fe Sara Sharon 2016-04-04 1991 mvm->sched_scan_pass_all ==
fbe4112791b8fe Sara Sharon 2016-04-04 1992 SCHED_SCAN_PASS_ALL_ENABLED))
fbe4112791b8fe Sara Sharon 2016-04-04 1993 mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_FOUND;
fbe4112791b8fe Sara Sharon 2016-04-04 1994
fbe4112791b8fe Sara Sharon 2016-04-04 1995 if (unlikely(ieee80211_is_beacon(hdr->frame_control) ||
fbe4112791b8fe Sara Sharon 2016-04-04 1996 ieee80211_is_probe_resp(hdr->frame_control)))
9285ec4c8b61d4 Jason A. Donenfeld 2019-06-21 1997 rx_status->boottime_ns = ktime_get_boottime_ns();
fbe4112791b8fe Sara Sharon 2016-04-04 1998 }
780e87c29e7768 Johannes Berg 2015-09-03 1999
de1887c064b999 Luca Coelho 2019-04-16 2000 if (iwl_mvm_create_skb(mvm, skb, hdr, len, crypt_len, rxb)) {
de1887c064b999 Luca Coelho 2019-04-16 2001 kfree_skb(skb);
de1887c064b999 Luca Coelho 2019-04-16 2002 goto out;
de1887c064b999 Luca Coelho 2019-04-16 2003 }
de1887c064b999 Luca Coelho 2019-04-16 2004
b915c10174fb7d Sara Sharon 2016-03-23 2005 if (!iwl_mvm_reorder(mvm, napi, queue, sta, skb, desc))
9bf13bee2d74a3 Johannes Berg 2018-11-20 2006 iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue,
9bf13bee2d74a3 Johannes Berg 2018-11-20 2007 sta, csi);
cb2de6bb4f1296 Sara Sharon 2017-02-13 2008 out:
f5e28eac1a890e Johannes Berg 2015-12-06 2009 rcu_read_unlock();
780e87c29e7768 Johannes Berg 2015-09-03 2010 }
585a6fccf5b843 Sara Sharon 2015-12-01 2011
:::::: The code at line 1966 was first introduced by commit
:::::: 8613c94815fcdd358638a22fed50c3f172042aa2 mac80211: rename ieee80211_rx_status::vht_nss to just nss
:::::: TO: Johannes Berg <johannes.berg(a)intel.com>
:::::: CC: Johannes Berg <johannes.berg(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
kernel/time/hrtimer.c:276:20: warning: unused function 'is_migration_base'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 923dcc5eb0c111eccd51cc7ce1658537e3c38b25
commit: 81d741d3460ca422843ce0ec8351083f259c6166 hrtimer: Avoid unnecessary SMP function calls in clock_was_set()
date: 3 months ago
config: mips-randconfig-c004-20211119 (attached as .config)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-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 81d741d3460ca422843ce0ec8351083f259c6166
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash fs/ kernel/time/
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 >>):
kernel/time/hrtimer.c:120:21: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_REALTIME,
^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:121:22: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_MONOTONIC,
^~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:122:21: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_BOOTTIME,
^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:123:17: warning: initializer overrides prior initialization of this subobject
= HRTIMER_BASE_TAI,
^~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:1591:7: warning: variable 'expires_in_hardirq' set but not used
bool expires_in_hardirq;
^
>> kernel/time/hrtimer.c:276:20: warning: unused function 'is_migration_base'
static inline bool is_migration_base(struct hrtimer_clock_base
^
>> kernel/time/hrtimer.c:1816:20: warning: unused function '__hrtimer_peek_ahead_timers'
static inline void __hrtimer_peek_ahead_timers(void)
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 105, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $1
or $0, $2
sc $0, $1
beqz $0, 1b
.set pop
'
clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 14.0.0 (git://gitmirror/llvm_project fefe20b99313d6b0738806d1504652c3b7edb9e0)
Target: mipsel-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-fefe20b993/bin
clang-14: note: diagnostic msg:
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt
vim +/is_migration_base +276 kernel/time/hrtimer.c
c0a3132963db68 kernel/hrtimer.c Thomas Gleixner 2006-01-09 275
5d2295f3a93b04 kernel/time/hrtimer.c Sebastian Andrzej Siewior 2019-09-04 @276 static inline bool is_migration_base(struct hrtimer_clock_base *base)
5d2295f3a93b04 kernel/time/hrtimer.c Sebastian Andrzej Siewior 2019-09-04 277 {
5d2295f3a93b04 kernel/time/hrtimer.c Sebastian Andrzej Siewior 2019-09-04 278 return false;
5d2295f3a93b04 kernel/time/hrtimer.c Sebastian Andrzej Siewior 2019-09-04 279 }
5d2295f3a93b04 kernel/time/hrtimer.c Sebastian Andrzej Siewior 2019-09-04 280
:::::: The code at line 276 was first introduced by commit
:::::: 5d2295f3a93b04986d069ebeaf5b07725f9096c1 hrtimer: Add a missing bracket and hide `migration_base' on !SMP
:::::: TO: Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months