Re: [PATCH v2 12/15] leds: trigger: blkdev: Enable unlinking block devices from LEDs
by Dan Carpenter
Hi Ian,
url: https://github.com/0day-ci/linux/commits/Ian-Pilcher/Introduce-block-devi...
base: a3fa7a101dcff93791d1b1bdb3affcad1410c8c1
config: i386-randconfig-m021-20210912 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/leds/trigger/ledtrig-blkdev.c:410 blkdev_disk_unlink_locked() error: dereferencing freed memory 'disk'
vim +/disk +410 drivers/leds/trigger/ledtrig-blkdev.c
66cb682de7e8bd Ian Pilcher 2021-09-09 388 static void blkdev_disk_unlink_locked(struct ledtrig_blkdev_led *const led,
66cb682de7e8bd Ian Pilcher 2021-09-09 389 struct ledtrig_blkdev_link *const link,
66cb682de7e8bd Ian Pilcher 2021-09-09 390 struct ledtrig_blkdev_disk *const disk)
66cb682de7e8bd Ian Pilcher 2021-09-09 391 {
66cb682de7e8bd Ian Pilcher 2021-09-09 392 --ledtrig_blkdev_count;
66cb682de7e8bd Ian Pilcher 2021-09-09 393
66cb682de7e8bd Ian Pilcher 2021-09-09 394 if (ledtrig_blkdev_count == 0)
66cb682de7e8bd Ian Pilcher 2021-09-09 395 WARN_ON(!cancel_delayed_work_sync(&ledtrig_blkdev_work));
66cb682de7e8bd Ian Pilcher 2021-09-09 396
66cb682de7e8bd Ian Pilcher 2021-09-09 397 sysfs_remove_link(led->dir, disk->gd->disk_name);
66cb682de7e8bd Ian Pilcher 2021-09-09 398 sysfs_remove_link(disk->dir, led->led_dev->name);
66cb682de7e8bd Ian Pilcher 2021-09-09 399 kobject_put(disk->dir);
66cb682de7e8bd Ian Pilcher 2021-09-09 400
66cb682de7e8bd Ian Pilcher 2021-09-09 401 hlist_del(&link->led_disks_node);
66cb682de7e8bd Ian Pilcher 2021-09-09 402 hlist_del(&link->disk_leds_node);
66cb682de7e8bd Ian Pilcher 2021-09-09 403 kfree(link);
66cb682de7e8bd Ian Pilcher 2021-09-09 404
66cb682de7e8bd Ian Pilcher 2021-09-09 405 if (hlist_empty(&disk->leds)) {
66cb682de7e8bd Ian Pilcher 2021-09-09 406 disk->gd->ledtrig = NULL;
66cb682de7e8bd Ian Pilcher 2021-09-09 407 kfree(disk);
^^^^
Freed.
66cb682de7e8bd Ian Pilcher 2021-09-09 408 }
66cb682de7e8bd Ian Pilcher 2021-09-09 409
66cb682de7e8bd Ian Pilcher 2021-09-09 @410 put_disk(disk->gd);
^^^^^^^^
Dereference after free.
66cb682de7e8bd Ian Pilcher 2021-09-09 411 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 78e709522d2c012cb0daad2e668506637bffb7c2
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support BCM4908 fixed partitions
config: parisc-randconfig-m031-20210912 (attached as .config)
compiler: hppa-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>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?
vim +41 drivers/mtd/parsers/ofpart_bcm4908.c
bb17230c61a6424b Rafał Miłecki 2021-03-01 17 static long long bcm4908_partitions_fw_offset(void)
bb17230c61a6424b Rafał Miłecki 2021-03-01 18 {
bb17230c61a6424b Rafał Miłecki 2021-03-01 19 struct device_node *root;
bb17230c61a6424b Rafał Miłecki 2021-03-01 20 struct property *prop;
bb17230c61a6424b Rafał Miłecki 2021-03-01 21 const char *s;
bb17230c61a6424b Rafał Miłecki 2021-03-01 22
bb17230c61a6424b Rafał Miłecki 2021-03-01 23 root = of_find_node_by_path("/");
bb17230c61a6424b Rafał Miłecki 2021-03-01 24 if (!root)
bb17230c61a6424b Rafał Miłecki 2021-03-01 25 return -ENOENT;
bb17230c61a6424b Rafał Miłecki 2021-03-01 26
bb17230c61a6424b Rafał Miłecki 2021-03-01 27 of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a6424b Rafał Miłecki 2021-03-01 28 size_t len = strlen(BLPARAMS_FW_OFFSET);
bb17230c61a6424b Rafał Miłecki 2021-03-01 29 unsigned long offset;
bb17230c61a6424b Rafał Miłecki 2021-03-01 30 int err;
bb17230c61a6424b Rafał Miłecki 2021-03-01 31
bb17230c61a6424b Rafał Miłecki 2021-03-01 32 if (strncmp(s, BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a6424b Rafał Miłecki 2021-03-01 33 continue;
bb17230c61a6424b Rafał Miłecki 2021-03-01 34
bb17230c61a6424b Rafał Miłecki 2021-03-01 35 err = kstrtoul(s + len + 1, 0, &offset);
bb17230c61a6424b Rafał Miłecki 2021-03-01 36 if (err) {
bb17230c61a6424b Rafał Miłecki 2021-03-01 37 pr_err("failed to parse %s\n", s + len + 1);
bb17230c61a6424b Rafał Miłecki 2021-03-01 38 return err;
bb17230c61a6424b Rafał Miłecki 2021-03-01 39 }
bb17230c61a6424b Rafał Miłecki 2021-03-01 40
bb17230c61a6424b Rafał Miłecki 2021-03-01 @41 return offset << 10;
There is a kind of mismatch between offset which is unsigned long and
bcm4908_partitions_fw_offset() which returns u64.
bb17230c61a6424b Rafał Miłecki 2021-03-01 42 }
bb17230c61a6424b Rafał Miłecki 2021-03-01 43
bb17230c61a6424b Rafał Miłecki 2021-03-01 44 return -ENOENT;
bb17230c61a6424b Rafał Miłecki 2021-03-01 45 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
drivers/gpu/drm/rockchip/rockchip_drm_vop.c:1046 vop_plane_atomic_async_check() warn: variable dereferenced before check 'state' (see line 1027)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 78e709522d2c012cb0daad2e668506637bffb7c2
commit: 5ddb0bd4ddc35d9c9376d109398f84277bb8d25e drm/atomic: Pass the full state to planes async atomic check and update
config: riscv-randconfig-m031-20210912 (attached as .config)
compiler: riscv32-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>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/gpu/drm/rockchip/rockchip_drm_vop.c:1046 vop_plane_atomic_async_check() warn: variable dereferenced before check 'state' (see line 1027)
vim +/state +1046 drivers/gpu/drm/rockchip/rockchip_drm_vop.c
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1024 static int vop_plane_atomic_async_check(struct drm_plane *plane,
5ddb0bd4ddc35d Maxime Ripard 2021-02-19 1025 struct drm_atomic_state *state)
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1026 {
5ddb0bd4ddc35d Maxime Ripard 2021-02-19 @1027 struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state,
^^^^^
Dereferenced inside the function.
5ddb0bd4ddc35d Maxime Ripard 2021-02-19 1028 plane);
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1029 struct vop_win *vop_win = to_vop_win(plane);
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1030 const struct vop_win_data *win = vop_win->data;
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1031 int min_scale = win->phy->scl ? FRAC_16_16(1, 8) :
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1032 DRM_PLANE_HELPER_NO_SCALING;
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1033 int max_scale = win->phy->scl ? FRAC_16_16(8, 1) :
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1034 DRM_PLANE_HELPER_NO_SCALING;
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1035 struct drm_crtc_state *crtc_state;
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1036
5ddb0bd4ddc35d Maxime Ripard 2021-02-19 1037 if (plane != new_plane_state->crtc->cursor)
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1038 return -EINVAL;
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1039
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1040 if (!plane->state)
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1041 return -EINVAL;
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1042
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1043 if (!plane->state->fb)
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1044 return -EINVAL;
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1045
5ddb0bd4ddc35d Maxime Ripard 2021-02-19 @1046 if (state)
^^^^^
Checked for NULL. Too late!
5ddb0bd4ddc35d Maxime Ripard 2021-02-19 1047 crtc_state = drm_atomic_get_existing_crtc_state(state,
5ddb0bd4ddc35d Maxime Ripard 2021-02-19 1048 new_plane_state->crtc);
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1049 else /* Special case for asynchronous cursor updates. */
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1050 crtc_state = plane->crtc->state;
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1051
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1052 return drm_atomic_helper_check_plane_state(plane->state, crtc_state,
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1053 min_scale, max_scale,
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1054 true, true);
15609559a834a5 Enric Balletbo i Serra 2018-12-05 1055 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[zen-kernel-zen-kernel:5.14/prjc 1/209] kernel/sched/alt_core.c:652:6: warning: no previous prototype for 'resched_curr'
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.14/prjc
head: d549588e3d79002f0c4b567b49644318af78a3db
commit: f746b5817d3274fa4f458f87f6b452e7304b1d64 [1/209] Project C v5.7.5-r2
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/zen-kernel/zen-kernel/commit/f746b5817d3274fa4f458f87f...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.14/prjc
git checkout f746b5817d3274fa4f458f87f6b452e7304b1d64
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=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 >>):
In file included from kernel/sched/alt_core.c:191:
kernel/sched/alt_core.c: In function 'dequeue_task':
kernel/sched/bmq_imp.h:52:2: error: implicit declaration of function 'sched_info_dequeued'; did you mean 'sched_info_dequeue'? [-Werror=implicit-function-declaration]
52 | sched_info_dequeued(rq, p); \
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:444:2: note: in expansion of macro '__SCHED_DEQUEUE_TASK'
444 | __SCHED_DEQUEUE_TASK(p, rq, flags, update_sched_rq_watermark(rq));
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: In function 'enqueue_task':
kernel/sched/bmq_imp.h:61:2: error: implicit declaration of function 'sched_info_queued'; did you mean 'sched_info_enqueue'? [-Werror=implicit-function-declaration]
61 | sched_info_queued(rq, p); \
| ^~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:461:2: note: in expansion of macro '__SCHED_ENQUEUE_TASK'
461 | __SCHED_ENQUEUE_TASK(p, rq, flags);
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: At top level:
>> kernel/sched/alt_core.c:652:6: warning: no previous prototype for 'resched_curr' [-Wmissing-prototypes]
652 | void resched_curr(struct rq *rq)
| ^~~~~~~~~~~~
>> kernel/sched/alt_core.c:675:6: warning: no previous prototype for 'resched_cpu' [-Wmissing-prototypes]
675 | void resched_cpu(int cpu)
| ^~~~~~~~~~~
kernel/sched/alt_core.c: In function 'activate_task':
kernel/sched/alt_core.c:955:6: error: implicit declaration of function 'task_contributes_to_load' [-Werror=implicit-function-declaration]
955 | if (task_contributes_to_load(p))
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: In function 'ttwu_stat':
>> kernel/sched/alt_core.c:1552:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
1552 | struct rq *rq;
| ^~
kernel/sched/alt_core.c: In function 'ttwu_do_wakeup':
kernel/sched/alt_core.c:1578:5: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
1578 | p->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'try_to_wake_up':
kernel/sched/alt_core.c:1793:12: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
1793 | if (!(p->state & state))
| ^~~~~
| __state
kernel/sched/alt_core.c:1799:6: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
1799 | p->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c:1812:11: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
1812 | if (!(p->state & state))
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'sched_fork':
kernel/sched/alt_core.c:1973:5: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
1973 | p->state = TASK_NEW;
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'wake_up_new_task':
kernel/sched/alt_core.c:2136:5: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
2136 | p->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'finish_task_switch':
kernel/sched/alt_core.c:2384:21: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
2384 | prev_state = prev->state;
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'schedule_tail':
kernel/sched/alt_core.c:2433:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
2433 | struct rq *rq;
| ^~
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:2518:15: error: conflicting types for 'nr_running'
2518 | unsigned long nr_running(void)
| ^~~~~~~~~~
In file included from kernel/sched/alt_sched.h:16,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:14:
include/linux/sched/stat.h:20:21: note: previous declaration of 'nr_running' was here
20 | extern unsigned int nr_running(void);
| ^~~~~~~~~~
kernel/sched/alt_core.c:2565:15: error: conflicting types for 'nr_iowait_cpu'
2565 | unsigned long nr_iowait_cpu(int cpu)
| ^~~~~~~~~~~~~
In file included from kernel/sched/alt_sched.h:16,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:14:
include/linux/sched/stat.h:23:21: note: previous declaration of 'nr_iowait_cpu' was here
23 | extern unsigned int nr_iowait_cpu(int cpu);
| ^~~~~~~~~~~~~
kernel/sched/alt_core.c:2600:15: error: conflicting types for 'nr_iowait'
2600 | unsigned long nr_iowait(void)
| ^~~~~~~~~
In file included from kernel/sched/alt_sched.h:16,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:14:
include/linux/sched/stat.h:22:21: note: previous declaration of 'nr_iowait' was here
22 | extern unsigned int nr_iowait(void);
| ^~~~~~~~~
kernel/sched/alt_core.c:2706:6: error: conflicting types for 'arch_set_thermal_pressure'
2706 | void arch_set_thermal_pressure(struct cpumask *cpus,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from kernel/sched/alt_sched.h:19,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:14:
include/linux/sched/topology.h:264:6: note: previous definition of 'arch_set_thermal_pressure' was here
264 | void arch_set_thermal_pressure(const struct cpumask *cpus,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: In function 'scheduler_tick':
kernel/sched/alt_core.c:2753:2: error: implicit declaration of function 'psi_task_tick'; did you mean 'put_task_stack'? [-Werror=implicit-function-declaration]
2753 | psi_task_tick(rq);
| ^~~~~~~~~~~~~
| put_task_stack
kernel/sched/alt_core.c: In function '__schedule_bug':
kernel/sched/alt_core.c:3097:16: warning: passing argument 1 of 'print_ip_sym' makes pointer from integer without a cast [-Wint-conversion]
3097 | print_ip_sym(preempt_disable_ip);
| ^~~~~~~~~~~~~~~~~~
| |
| long unsigned int
In file included from include/linux/bpf.h:20,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from kernel/sched/alt_sched.h:24,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:14:
include/linux/kallsyms.h:177:45: note: expected 'const char *' but argument is of type 'long unsigned int'
177 | static inline void print_ip_sym(const char *loglvl, unsigned long ip)
| ~~~~~~~~~~~~^~~~~~
kernel/sched/alt_core.c:3097:3: error: too few arguments to function 'print_ip_sym'
3097 | print_ip_sym(preempt_disable_ip);
| ^~~~~~~~~~~~
--
| ^~~~~~~~~~~~
| hrtimer_start
kernel/sched/alt_core.c: In function '__schedule':
kernel/sched/alt_core.c:3357:24: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
3357 | if (!preempt && prev->state) {
| ^~~~~
| __state
kernel/sched/alt_core.c:3358:34: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
3358 | if (signal_pending_state(prev->state, prev)) {
| ^~~~~
| __state
kernel/sched/alt_core.c:3359:10: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
3359 | prev->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'sched_submit_work':
kernel/sched/alt_core.c:3438:12: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
3438 | if (!tsk->state)
| ^~~~~
| __state
In file included from include/asm-generic/bug.h:7,
from ./arch/um/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/um/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from kernel/sched/alt_sched.h:4,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:14:
kernel/sched/alt_core.c: In function 'schedule_idle':
kernel/sched/alt_core.c:3512:24: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
3512 | WARN_ON_ONCE(current->state);
| ^~~~~
include/linux/once_lite.h:15:27: note: in definition of macro 'DO_ONCE_LITE_IF'
15 | bool __ret_do_once = !!(condition); \
| ^~~~~~~~~
kernel/sched/alt_core.c:3512:2: note: in expansion of macro 'WARN_ON_ONCE'
3512 | WARN_ON_ONCE(current->state);
| ^~~~~~~~~~~~
kernel/sched/alt_core.c: In function '__sched_setscheduler':
kernel/sched/alt_core.c:4031:39: error: 'MAX_USER_RT_PRIO' undeclared (first use in this function); did you mean 'MAX_RT_PRIO'?
4031 | (p->mm && attr->sched_priority > MAX_USER_RT_PRIO - 1) ||
| ^~~~~~~~~~~~~~~~
| MAX_RT_PRIO
kernel/sched/alt_core.c:4031:39: note: each undeclared identifier is reported only once for each function it appears in
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:4749:13: error: redefinition of '_cond_resched'
4749 | int __sched _cond_resched(void)
| ^~~~~~~~~~~~~
In file included from kernel/sched/alt_sched.h:4,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:14:
include/linux/sched.h:1948:19: note: previous definition of '_cond_resched' was here
1948 | static inline int _cond_resched(void)
| ^~~~~~~~~~~~~
kernel/sched/alt_core.c: In function '__do_sys_sched_get_priority_max':
kernel/sched/alt_core.c:4902:9: error: 'MAX_USER_RT_PRIO' undeclared (first use in this function); did you mean 'MAX_RT_PRIO'?
4902 | ret = MAX_USER_RT_PRIO-1;
| ^~~~~~~~~~~~~~~~
| MAX_RT_PRIO
kernel/sched/alt_core.c: In function 'sched_show_task':
kernel/sched/alt_core.c:5010:9: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5010 | if (p->state == TASK_RUNNING)
| ^~~~~
| __state
kernel/sched/alt_core.c:5025:2: error: too few arguments to function 'show_stack'
5025 | show_stack(p, NULL);
| ^~~~~~~~~~
In file included from kernel/sched/alt_sched.h:9,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:14:
include/linux/sched/debug.h:33:13: note: declared here
33 | extern void show_stack(struct task_struct *task, unsigned long *sp,
| ^~~~~~~~~~
kernel/sched/alt_core.c: In function 'state_filter_match':
kernel/sched/alt_core.c:5038:11: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5038 | if (!(p->state & state_filter))
| ^~~~~
| __state
kernel/sched/alt_core.c:5045:49: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5045 | if (state_filter == TASK_UNINTERRUPTIBLE && p->state == TASK_IDLE)
| ^~~~~
| __state
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5052:6: error: conflicting types for 'show_state_filter'
5052 | void show_state_filter(unsigned long state_filter)
| ^~~~~~~~~~~~~~~~~
In file included from kernel/sched/alt_sched.h:9,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:14:
include/linux/sched/debug.h:17:13: note: previous declaration of 'show_state_filter' was here
17 | extern void show_state_filter(unsigned int state_filter);
| ^~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: In function 'init_idle':
kernel/sched/alt_core.c:5118:8: error: 'struct task_struct' has no member named 'state'; did you mean '__state'?
5118 | idle->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c: At top level:
>> kernel/sched/alt_core.c:5813:20: warning: no previous prototype for 'sched_create_group' [-Wmissing-prototypes]
5813 | struct task_group *sched_create_group(struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/alt_core.c:5824:6: warning: no previous prototype for 'sched_online_group' [-Wmissing-prototypes]
5824 | void sched_online_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/alt_core.c:5835:6: warning: no previous prototype for 'sched_destroy_group' [-Wmissing-prototypes]
5835 | void sched_destroy_group(struct task_group *tg)
| ^~~~~~~~~~~~~~~~~~~
>> kernel/sched/alt_core.c:5841:6: warning: no previous prototype for 'sched_offline_group' [-Wmissing-prototypes]
5841 | void sched_offline_group(struct task_group *tg)
| ^~~~~~~~~~~~~~~~~~~
>> kernel/sched/alt_core.c:5933:20: warning: initialized field overwritten [-Woverride-init]
5933 | .legacy_cftypes = cpu_legacy_files,
| ^~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5933:20: note: (near initialization for 'cpu_cgrp_subsys.legacy_cftypes')
kernel/sched/alt_core.c:142:18: warning: 'sched_sg_idle_mask' defined but not used [-Wunused-variable]
142 | static cpumask_t sched_sg_idle_mask ____cacheline_aligned_in_smp;
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/resched_curr +652 kernel/sched/alt_core.c
453
454 static inline void enqueue_task(struct task_struct *p, struct rq *rq, int flags)
455 {
456 lockdep_assert_held(&rq->lock);
457
458 WARN_ONCE(task_rq(p) != rq, "sched: enqueue task reside on cpu%d to cpu%d\n",
459 task_cpu(p), cpu_of(rq));
460
> 461 __SCHED_ENQUEUE_TASK(p, rq, flags);
462 update_sched_rq_watermark(rq);
463 ++rq->nr_running;
464 #ifdef CONFIG_SMP
465 if (2 == rq->nr_running)
466 cpumask_set_cpu(cpu_of(rq), &sched_rq_pending_mask);
467 #endif
468
469 sched_update_tick_dependency(rq);
470
471 /*
472 * If in_iowait is set, the code below may not trigger any cpufreq
473 * utilization updates, so do it here explicitly with the IOWAIT flag
474 * passed.
475 */
476 if (p->in_iowait)
477 cpufreq_update_util(rq, SCHED_CPUFREQ_IOWAIT);
478 }
479
480 static inline void requeue_task(struct task_struct *p, struct rq *rq)
481 {
482 lockdep_assert_held(&rq->lock);
483 WARN_ONCE(task_rq(p) != rq, "sched: cpu[%d] requeue task reside on cpu%d\n",
484 cpu_of(rq), task_cpu(p));
485
486 __requeue_task(p, rq);
487 }
488
489 /*
490 * cmpxchg based fetch_or, macro so it works for different integer types
491 */
492 #define fetch_or(ptr, mask) \
493 ({ \
494 typeof(ptr) _ptr = (ptr); \
495 typeof(mask) _mask = (mask); \
496 typeof(*_ptr) _old, _val = *_ptr; \
497 \
498 for (;;) { \
499 _old = cmpxchg(_ptr, _val, _val | _mask); \
500 if (_old == _val) \
501 break; \
502 _val = _old; \
503 } \
504 _old; \
505 })
506
507 #if defined(CONFIG_SMP) && defined(TIF_POLLING_NRFLAG)
508 /*
509 * Atomically set TIF_NEED_RESCHED and test for TIF_POLLING_NRFLAG,
510 * this avoids any races wrt polling state changes and thereby avoids
511 * spurious IPIs.
512 */
513 static bool set_nr_and_not_polling(struct task_struct *p)
514 {
515 struct thread_info *ti = task_thread_info(p);
516 return !(fetch_or(&ti->flags, _TIF_NEED_RESCHED) & _TIF_POLLING_NRFLAG);
517 }
518
519 /*
520 * Atomically set TIF_NEED_RESCHED if TIF_POLLING_NRFLAG is set.
521 *
522 * If this returns true, then the idle task promises to call
523 * sched_ttwu_pending() and reschedule soon.
524 */
525 static bool set_nr_if_polling(struct task_struct *p)
526 {
527 struct thread_info *ti = task_thread_info(p);
528 typeof(ti->flags) old, val = READ_ONCE(ti->flags);
529
530 for (;;) {
531 if (!(val & _TIF_POLLING_NRFLAG))
532 return false;
533 if (val & _TIF_NEED_RESCHED)
534 return true;
535 old = cmpxchg(&ti->flags, val, val | _TIF_NEED_RESCHED);
536 if (old == val)
537 break;
538 val = old;
539 }
540 return true;
541 }
542
543 #else
544 static bool set_nr_and_not_polling(struct task_struct *p)
545 {
546 set_tsk_need_resched(p);
547 return true;
548 }
549
550 #ifdef CONFIG_SMP
551 static bool set_nr_if_polling(struct task_struct *p)
552 {
553 return false;
554 }
555 #endif
556 #endif
557
558 static bool __wake_q_add(struct wake_q_head *head, struct task_struct *task)
559 {
560 struct wake_q_node *node = &task->wake_q;
561
562 /*
563 * Atomically grab the task, if ->wake_q is !nil already it means
564 * its already queued (either by us or someone else) and will get the
565 * wakeup due to that.
566 *
567 * In order to ensure that a pending wakeup will observe our pending
568 * state, even in the failed case, an explicit smp_mb() must be used.
569 */
570 smp_mb__before_atomic();
571 if (unlikely(cmpxchg_relaxed(&node->next, NULL, WAKE_Q_TAIL)))
572 return false;
573
574 /*
575 * The head is context local, there can be no concurrency.
576 */
577 *head->lastp = node;
578 head->lastp = &node->next;
579 return true;
580 }
581
582 /**
583 * wake_q_add() - queue a wakeup for 'later' waking.
584 * @head: the wake_q_head to add @task to
585 * @task: the task to queue for 'later' wakeup
586 *
587 * Queue a task for later wakeup, most likely by the wake_up_q() call in the
588 * same context, _HOWEVER_ this is not guaranteed, the wakeup can come
589 * instantly.
590 *
591 * This function must be used as-if it were wake_up_process(); IOW the task
592 * must be ready to be woken at this location.
593 */
594 void wake_q_add(struct wake_q_head *head, struct task_struct *task)
595 {
596 if (__wake_q_add(head, task))
597 get_task_struct(task);
598 }
599
600 /**
601 * wake_q_add_safe() - safely queue a wakeup for 'later' waking.
602 * @head: the wake_q_head to add @task to
603 * @task: the task to queue for 'later' wakeup
604 *
605 * Queue a task for later wakeup, most likely by the wake_up_q() call in the
606 * same context, _HOWEVER_ this is not guaranteed, the wakeup can come
607 * instantly.
608 *
609 * This function must be used as-if it were wake_up_process(); IOW the task
610 * must be ready to be woken at this location.
611 *
612 * This function is essentially a task-safe equivalent to wake_q_add(). Callers
613 * that already hold reference to @task can call the 'safe' version and trust
614 * wake_q to do the right thing depending whether or not the @task is already
615 * queued for wakeup.
616 */
617 void wake_q_add_safe(struct wake_q_head *head, struct task_struct *task)
618 {
619 if (!__wake_q_add(head, task))
620 put_task_struct(task);
621 }
622
623 void wake_up_q(struct wake_q_head *head)
624 {
625 struct wake_q_node *node = head->first;
626
627 while (node != WAKE_Q_TAIL) {
628 struct task_struct *task;
629
630 task = container_of(node, struct task_struct, wake_q);
631 BUG_ON(!task);
632 /* task can safely be re-inserted now: */
633 node = node->next;
634 task->wake_q.next = NULL;
635
636 /*
637 * wake_up_process() executes a full barrier, which pairs with
638 * the queueing in wake_q_add() so as not to miss wakeups.
639 */
640 wake_up_process(task);
641 put_task_struct(task);
642 }
643 }
644
645 /*
646 * resched_curr - mark rq's current task 'to be rescheduled now'.
647 *
648 * On UP this means the setting of the need_resched flag, on SMP it
649 * might also involve a cross-CPU call to trigger the scheduler on
650 * the target CPU.
651 */
> 652 void resched_curr(struct rq *rq)
653 {
654 struct task_struct *curr = rq->curr;
655 int cpu;
656
657 lockdep_assert_held(&rq->lock);
658
659 if (test_tsk_need_resched(curr))
660 return;
661
662 cpu = cpu_of(rq);
663 if (cpu == smp_processor_id()) {
664 set_tsk_need_resched(curr);
665 set_preempt_need_resched();
666 return;
667 }
668
669 if (set_nr_and_not_polling(curr))
670 smp_send_reschedule(cpu);
671 else
672 trace_sched_wake_idle_without_ipi(cpu);
673 }
674
> 675 void resched_cpu(int cpu)
676 {
677 struct rq *rq = cpu_rq(cpu);
678 unsigned long flags;
679
680 raw_spin_lock_irqsave(&rq->lock, flags);
681 if (cpu_online(cpu) || cpu == smp_processor_id())
682 resched_curr(cpu_rq(cpu));
683 raw_spin_unlock_irqrestore(&rq->lock, flags);
684 }
685
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[cifs:for-next 3/4] fs/smbfs_client/ioctl.c:324:17: warning: variable 'caps' set but not used
by kernel test robot
Hi Steve,
First bad commit (maybe != root cause):
tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: c1abf13059571edd59d42d676ffe593fb987c019
commit: b4a8c8f8fa8b7b86bb62257fbb27e7bde58ac97e [3/4] cifs: rename fs/cifs directory to fs/smbfs_client
config: ia64-defconfig (attached as .config)
compiler: ia64-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
git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git
git fetch --no-tags cifs for-next
git checkout b4a8c8f8fa8b7b86bb62257fbb27e7bde58ac97e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=ia64
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/smbfs_client/ioctl.c: In function 'cifs_ioctl':
>> fs/smbfs_client/ioctl.c:324:17: warning: variable 'caps' set but not used [-Wunused-but-set-variable]
324 | __u64 caps;
| ^~~~
vim +/caps +324 fs/smbfs_client/ioctl.c
7ba3d1cdb7988ccf fs/cifs/ioctl.c Steve French 2021-05-02 312
f9ddcca4cf7d9523 fs/cifs/ioctl.c Steve French 2008-05-15 313 long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
^1da177e4c3f4152 fs/cifs/ioctl.c Linus Torvalds 2005-04-16 314 {
496ad9aa8ef44805 fs/cifs/ioctl.c Al Viro 2013-01-23 315 struct inode *inode = file_inode(filep);
7e7db86c7e1088e7 fs/cifs/ioctl.c Steve French 2019-09-19 316 struct smb3_key_debug_info pkey_inf;
^1da177e4c3f4152 fs/cifs/ioctl.c Linus Torvalds 2005-04-16 317 int rc = -ENOTTY; /* strange error - but the precedent */
6d5786a34d98bffb fs/cifs/ioctl.c Pavel Shilovsky 2012-06-20 318 unsigned int xid;
ba00ba64cf0895e4 fs/cifs/ioctl.c Jeff Layton 2010-09-20 319 struct cifsFileInfo *pSMBFile = filep->private_data;
96daf2b09178d8eb fs/cifs/ioctl.c Steve French 2011-05-27 320 struct cifs_tcon *tcon;
a77592a70081edb5 fs/cifs/ioctl.c Ronnie Sahlberg 2020-07-09 321 struct tcon_link *tlink;
d26c2ddd33569667 fs/cifs/ioctl.c Steve French 2020-02-06 322 struct cifs_sb_info *cifs_sb;
f654bac2227adc5c fs/cifs/ioctl.c Steve French 2005-04-28 323 __u64 ExtAttrBits = 0;
618763958b2291a0 fs/cifs/ioctl.c Jeff Layton 2010-11-08 @324 __u64 caps;
:::::: The code at line 324 was first introduced by commit
:::::: 618763958b2291a09057dbfa553da6ded93dcfad cifs: make cifs_ioctl handle NULL filp->private_data correctly
:::::: TO: Jeff Layton <jlayton(a)redhat.com>
:::::: CC: Steve French <sfrench(a)us.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [Intel-gfx] [PATCH 04/14] drm/hdcp: Expand HDCP helper library for enable/disable/check
by kernel test robot
Hi Sean,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.15-rc1 next-20210914]
[cannot apply to drm-intel/for-linux-next drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sean-Paul/drm-hdcp-Pull-HDCP-aut...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: riscv-randconfig-r042-20210913 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/ceee3075ca23d7911b80eb6a71a0b352d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sean-Paul/drm-hdcp-Pull-HDCP-auth-exchange-check-into/20210914-020004
git checkout ceee3075ca23d7911b80eb6a71a0b352d7c6b52c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/drm_hdcp.c:13:
In file included from include/linux/i2c.h:18:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/gpu/drm/drm_hdcp.c:13:
In file included from include/linux/i2c.h:18:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/gpu/drm/drm_hdcp.c:13:
In file included from include/linux/i2c.h:18:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/gpu/drm/drm_hdcp.c:1280:21: warning: variable 'needs_enable' set but not used [-Wunused-but-set-variable]
bool type_changed, needs_enable;
^
8 warnings generated.
vim +/needs_enable +1280 drivers/gpu/drm/drm_hdcp.c
1251
1252 /**
1253 * drm_hdcp_helper_atomic_commit - Helper for drivers to call during commit to
1254 * enable/disable HDCP
1255 *
1256 * @data: pointer to the @drm_hdcp_helper_data for the connector
1257 * @state: pointer to the atomic state being committed
1258 * @driver_mutex: driver-provided lock to be used while interacting with the driver
1259 *
1260 * This function can be used by display drivers to determine when HDCP should be
1261 * enabled or disabled based on the connector state. It should be called during
1262 * steady-state commits as well as connector enable/disable. The function will
1263 * handle the HDCP authentication/encryption logic, calling back into the driver
1264 * when source operations are necessary.
1265 *
1266 * @driver_mutex will be retained and used for the duration of the HDCP session
1267 * since it will be needed for link checks and retries. This mutex is useful if
1268 * the driver has shared resources across connectors which must be serialized.
1269 * For example, driver_mutex can be used for MST connectors sharing a common
1270 * encoder which should not be accessed/changed concurrently. When the
1271 * connector's session is torn down, the mutex will be forgotten by the helper
1272 * for this connector until the next session.
1273 */
1274 void drm_hdcp_helper_atomic_commit(struct drm_hdcp_helper_data *data,
1275 struct drm_atomic_state *state,
1276 struct mutex *driver_mutex)
1277 {
1278 struct drm_connector *connector = data->connector;
1279 struct drm_connector_state *conn_state;
> 1280 bool type_changed, needs_enable;
1281
1282 conn_state = drm_atomic_get_new_connector_state(state, connector);
1283
1284 type_changed = conn_state->hdcp_content_type != data->enabled_type;
1285 needs_enable = type_changed;
1286
1287 if (conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_UNDESIRED) {
1288 drm_hdcp_helper_disable_hdcp(data);
1289 return;
1290 }
1291
1292 if (!conn_state->crtc) {
1293 drm_hdcp_helper_disable_hdcp(data);
1294
1295 /* Restore property to DESIRED so it's retried later */
1296 if (conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED) {
1297 mutex_lock(&data->mutex);
1298 drm_hdcp_update_value(data, DRM_MODE_CONTENT_PROTECTION_DESIRED,
1299 true);
1300 mutex_unlock(&data->mutex);
1301 }
1302 return;
1303 }
1304
1305 /* Already enabled */
1306 if (conn_state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED)
1307 return;
1308
1309 /* Disable and re-enable HDCP on content type change */
1310 if (type_changed)
1311 drm_hdcp_helper_disable_hdcp(data);
1312
1313 drm_hdcp_helper_enable_hdcp(data, state, driver_mutex);
1314 }
1315 EXPORT_SYMBOL(drm_hdcp_helper_atomic_commit);
1316
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
sound/usb/mixer_scarlett_gen2.c:2429:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f
commit: d5bda7e03982f67ce2f6c0d79b750fb27077331a ALSA: usb-audio: scarlett2: Add support for the talkback feature
date: 3 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 3 months ago
config: i386-randconfig-c001-20210910 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d5bda7e03982f67ce2f6c0d79b750fb27077331a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> sound/usb/mixer_scarlett_gen2.c:2429:3: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = scarlett2_usb_get_config(mixer,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/err +2429 sound/usb/mixer_scarlett_gen2.c
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2369
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2370 static int scarlett2_update_monitor_other(struct usb_mixer_interface *mixer)
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2371 {
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2372 struct scarlett2_data *private = mixer->private_data;
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2373 const struct scarlett2_device_info *info = private->info;
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2374 int err;
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2375
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2376 /* monitor_other_enable[0] enables speaker switching
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2377 * monitor_other_enable[1] enables talkback
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2378 */
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2379 u8 monitor_other_enable[2];
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2380
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2381 /* monitor_other_switch[0] activates the alternate speakers
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2382 * monitor_other_switch[1] activates talkback
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2383 */
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2384 u8 monitor_other_switch[2];
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2385
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2386 private->monitor_other_updated = 0;
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2387
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2388 if (info->direct_monitor)
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2389 return scarlett2_usb_get_config(
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2390 mixer, SCARLETT2_CONFIG_DIRECT_MONITOR,
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2391 1, &private->direct_monitor_switch);
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2392
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2393 /* if it doesn't do speaker switching then it also doesn't do
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2394 * talkback
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2395 */
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2396 if (!info->has_speaker_switching)
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2397 return 0;
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2398
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2399 err = scarlett2_usb_get_config(
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2400 mixer, SCARLETT2_CONFIG_MONITOR_OTHER_ENABLE,
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2401 2, monitor_other_enable);
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2402 if (err < 0)
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2403 return err;
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2404
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2405 err = scarlett2_usb_get_config(
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2406 mixer, SCARLETT2_CONFIG_MONITOR_OTHER_SWITCH,
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2407 2, monitor_other_switch);
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2408 if (err < 0)
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2409 return err;
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2410
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2411 if (!monitor_other_enable[0])
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2412 private->speaker_switching_switch = 0;
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2413 else
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2414 private->speaker_switching_switch = monitor_other_switch[0] + 1;
e914d8432cb4b9 Geoffrey D. Bennett 2021-06-23 2415
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2416 if (info->has_talkback) {
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2417 const int (*port_count)[SCARLETT2_PORT_DIRNS] =
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2418 info->port_count;
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2419 int num_mixes =
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2420 port_count[SCARLETT2_PORT_TYPE_MIX][SCARLETT2_PORT_IN];
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2421 u16 bitmap;
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2422 int i;
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2423
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2424 if (!monitor_other_enable[1])
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2425 private->talkback_switch = 0;
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2426 else
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2427 private->talkback_switch = monitor_other_switch[1] + 1;
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2428
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 @2429 err = scarlett2_usb_get_config(mixer,
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2430 SCARLETT2_CONFIG_TALKBACK_MAP,
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2431 1, &bitmap);
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2432 for (i = 0; i < num_mixes; i++, bitmap >>= 1)
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2433 private->talkback_map[i] = bitmap & 1;
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2434 }
d5bda7e03982f6 Geoffrey D. Bennett 2021-06-23 2435
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2436 return 0;
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2437 }
6ef9fa4a0eb4cd Geoffrey D. Bennett 2021-06-23 2438
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [RFC Patch net-next v2] net_sched: introduce eBPF based Qdisc
by kernel test robot
Hi Cong,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Cong-Wang/net_sched-introduce-eB...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 13bb8429ca985497bfba3a4afa6cd470d15fed10
config: riscv-buildonly-randconfig-r003-20210913 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/11b7d639a3edc1182a3027ae62cc35dcf...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cong-Wang/net_sched-introduce-eBPF-based-Qdisc/20210914-072015
git checkout 11b7d639a3edc1182a3027ae62cc35dcf0924178
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
>> kernel/bpf/btf.c:4422:2: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides]
0, /* avoid empty array */
^
include/linux/bpf_types.h:11:1: note: previous initialization is here
BPF_PROG_TYPE(BPF_PROG_TYPE_SCHED_QDISC, tc_cls_act,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/btf.c:4419:10: note: expanded from macro 'BPF_PROG_TYPE'
[_id] = __ctx_convert##_id,
^~~~~~~~~~~~~~~~~~
<scratch space>:151:1: note: expanded from here
__ctx_convertBPF_PROG_TYPE_SCHED_QDISC
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
vim +4422 kernel/bpf/btf.c
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4396
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4397 #define BPF_MAP_TYPE(_id, _ops)
f2e10bff16a0fd Andrii Nakryiko 2020-04-28 4398 #define BPF_LINK_TYPE(_id, _name)
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4399 static union {
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4400 struct bpf_ctx_convert {
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4401 #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4402 prog_ctx_type _id##_prog; \
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4403 kern_ctx_type _id##_kern;
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4404 #include <linux/bpf_types.h>
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4405 #undef BPF_PROG_TYPE
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4406 } *__t;
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4407 /* 't' is written once under lock. Read many times. */
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4408 const struct btf_type *t;
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4409 } bpf_ctx_convert;
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4410 enum {
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4411 #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4412 __ctx_convert##_id,
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4413 #include <linux/bpf_types.h>
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4414 #undef BPF_PROG_TYPE
ce27709b8162e5 Alexei Starovoitov 2019-11-27 4415 __ctx_convert_unused, /* to avoid empty enum in extreme .config */
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4416 };
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4417 static u8 bpf_ctx_convert_map[] = {
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4418 #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4419 [_id] = __ctx_convert##_id,
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4420 #include <linux/bpf_types.h>
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4421 #undef BPF_PROG_TYPE
4c80c7bc583a87 Arnd Bergmann 2019-12-10 @4422 0, /* avoid empty array */
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4423 };
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4424 #undef BPF_MAP_TYPE
f2e10bff16a0fd Andrii Nakryiko 2020-04-28 4425 #undef BPF_LINK_TYPE
91cc1a99740e2e Alexei Starovoitov 2019-11-14 4426
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[stffrdhrn:or1k-5.15-litex-sdcard 1/1] drivers/mmc/host/litex_mmc.c:96:6: error: no previous prototype for 'sdclk_set_clk'
by kernel test robot
tree: https://github.com/stffrdhrn/linux.git or1k-5.15-litex-sdcard
head: 9802d0ed2e47ab8b2c6c3e82c4f41591ec11f958
commit: 9802d0ed2e47ab8b2c6c3e82c4f41591ec11f958 [1/1] LiteX: driver for LiteSDCard (litex_mmc)
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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/stffrdhrn/linux/commit/9802d0ed2e47ab8b2c6c3e82c4f4159...
git remote add stffrdhrn https://github.com/stffrdhrn/linux.git
git fetch --no-tags stffrdhrn or1k-5.15-litex-sdcard
git checkout 9802d0ed2e47ab8b2c6c3e82c4f41591ec11f958
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/mmc/host/litex_mmc.c:96:6: error: no previous prototype for 'sdclk_set_clk' [-Werror=missing-prototypes]
96 | void sdclk_set_clk(struct litex_mmc_host *host, unsigned int clk_freq) {
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/sdclk_set_clk +96 drivers/mmc/host/litex_mmc.c
94
95
> 96 void sdclk_set_clk(struct litex_mmc_host *host, unsigned int clk_freq) {
97 u32 div = clk_freq ? host->freq / clk_freq : 256;
98 div = roundup_pow_of_two(div);
99 div = min(max(div, (u32)2), (u32)256);
100 dev_info(&host->dev->dev,
101 "Requested clk_freq=%d: set to %d via div=%d\n",
102 clk_freq, host->freq / div, div);
103 litex_write16(host->sdphy + LITEX_MMC_SDPHY_CLOCKERDIV_OFF, div);
104 }
105
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year