tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 72f842dd6699a6d746bc58f5e2ee43967f3439f3
commit: 33898ec947944c7a060f4e747b445bcc00568bca [9894/9999] CHROMIUM: drivers: media:
virtio: handle selection
config: arc-randconfig-s031-20200623 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-dirty
git checkout 33898ec947944c7a060f4e747b445bcc00568bca
# save the attached .config to linux build tree
make W=1 C=1 ARCH=arc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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/media/virtio/virtio_video_device.c:313:29: sparse: sparse: restricted __le32
degrades to integer
drivers/media/virtio/virtio_video_device.c:322:35: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] width @@ got
restricted __le32 [usertype] min @@
drivers/media/virtio/virtio_video_device.c:322:35: sparse: expected unsigned int
[usertype] width
drivers/media/virtio/virtio_video_device.c:322:35: sparse: got restricted __le32
[usertype] min
drivers/media/virtio/virtio_video_device.c:323:36: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] height @@
got restricted __le32 [usertype] min @@
drivers/media/virtio/virtio_video_device.c:323:36: sparse: expected unsigned int
[usertype] height
drivers/media/virtio/virtio_video_device.c:323:36: sparse: got restricted __le32
[usertype] min
drivers/media/virtio/virtio_video_device.c:328:31: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] min_width @@
got restricted __le32 [usertype] min @@
drivers/media/virtio/virtio_video_device.c:328:31: sparse: expected unsigned int
[usertype] min_width
drivers/media/virtio/virtio_video_device.c:328:31: sparse: got restricted __le32
[usertype] min
drivers/media/virtio/virtio_video_device.c:329:31: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] max_width @@
got restricted __le32 [usertype] max @@
drivers/media/virtio/virtio_video_device.c:329:31: sparse: expected unsigned int
[usertype] max_width
drivers/media/virtio/virtio_video_device.c:329:31: sparse: got restricted __le32
[usertype] max
drivers/media/virtio/virtio_video_device.c:330:32: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] min_height @@
got restricted __le32 [usertype] min @@
drivers/media/virtio/virtio_video_device.c:330:32: sparse: expected unsigned int
[usertype] min_height
drivers/media/virtio/virtio_video_device.c:330:32: sparse: got restricted __le32
[usertype] min
drivers/media/virtio/virtio_video_device.c:331:32: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] max_height @@
got restricted __le32 [usertype] max @@
drivers/media/virtio/virtio_video_device.c:331:32: sparse: expected unsigned int
[usertype] max_height
drivers/media/virtio/virtio_video_device.c:331:32: sparse: got restricted __le32
[usertype] max
drivers/media/virtio/virtio_video_device.c:332:32: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] step_width @@
got restricted __le32 [usertype] step @@
drivers/media/virtio/virtio_video_device.c:332:32: sparse: expected unsigned int
[usertype] step_width
drivers/media/virtio/virtio_video_device.c:332:32: sparse: got restricted __le32
[usertype] step
drivers/media/virtio/virtio_video_device.c:333:33: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] step_height @@
got restricted __le32 [usertype] step @@
drivers/media/virtio/virtio_video_device.c:333:33: sparse: expected unsigned int
[usertype] step_height
drivers/media/virtio/virtio_video_device.c:333:33: sparse: got restricted __le32
[usertype] step
drivers/media/virtio/virtio_video_device.c:370:43: sparse: sparse: restricted __le32
degrades to integer
drivers/media/virtio/virtio_video_device.c:373:53: sparse: sparse: incorrect type in
argument 1 (different base types) @@ expected unsigned int [usertype] int_start @@
got restricted __le32 [usertype] min @@
drivers/media/virtio/virtio_video_device.c:373:53: sparse: expected unsigned int
[usertype] int_start
drivers/media/virtio/virtio_video_device.c:373:53: sparse: got restricted __le32
[usertype] min
drivers/media/virtio/virtio_video_device.c:373:71: sparse: sparse: incorrect type in
argument 2 (different base types) @@ expected unsigned int [usertype] int_end @@
got restricted __le32 [usertype] max @@
drivers/media/virtio/virtio_video_device.c:373:71: sparse: expected unsigned int
[usertype] int_end
drivers/media/virtio/virtio_video_device.c:373:71: sparse: got restricted __le32
[usertype] max
drivers/media/virtio/virtio_video_device.c:374:53: sparse: sparse: incorrect type in
argument 3 (different base types) @@ expected unsigned int [usertype] step @@ got
restricted __le32 [usertype] step @@
drivers/media/virtio/virtio_video_device.c:374:53: sparse: expected unsigned int
[usertype] step
drivers/media/virtio/virtio_video_device.c:374:53: sparse: got restricted __le32
[usertype] step
drivers/media/virtio/virtio_video_device.c:375:53: sparse: sparse: incorrect type in
argument 1 (different base types) @@ expected unsigned int [usertype] int_start @@
got restricted __le32 [usertype] min @@
drivers/media/virtio/virtio_video_device.c:375:53: sparse: expected unsigned int
[usertype] int_start
drivers/media/virtio/virtio_video_device.c:375:53: sparse: got restricted __le32
[usertype] min
drivers/media/virtio/virtio_video_device.c:375:72: sparse: sparse: incorrect type in
argument 2 (different base types) @@ expected unsigned int [usertype] int_end @@
got restricted __le32 [usertype] max @@
drivers/media/virtio/virtio_video_device.c:375:72: sparse: expected unsigned int
[usertype] int_end
drivers/media/virtio/virtio_video_device.c:375:72: sparse: got restricted __le32
[usertype] max
drivers/media/virtio/virtio_video_device.c:376:54: sparse: sparse: incorrect type in
argument 3 (different base types) @@ expected unsigned int [usertype] step @@ got
restricted __le32 [usertype] step @@
drivers/media/virtio/virtio_video_device.c:376:54: sparse: expected unsigned int
[usertype] step
drivers/media/virtio/virtio_video_device.c:376:54: sparse: got restricted __le32
[usertype] step
drivers/media/virtio/virtio_video_device.c:380:47: sparse: sparse: restricted __le32
degrades to integer
drivers/media/virtio/virtio_video_device.c:387:41: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] denominator @@
got restricted __le32 [usertype] max @@
drivers/media/virtio/virtio_video_device.c:387:41: sparse: expected unsigned int
[usertype] denominator
drivers/media/virtio/virtio_video_device.c:387:41: sparse: got restricted __le32
[usertype] max
drivers/media/virtio/virtio_video_device.c:390:45: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] denominator @@
got restricted __le32 [usertype] max @@
drivers/media/virtio/virtio_video_device.c:390:45: sparse: expected unsigned int
[usertype] denominator
drivers/media/virtio/virtio_video_device.c:390:45: sparse: got restricted __le32
[usertype] max
drivers/media/virtio/virtio_video_device.c:392:45: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] denominator @@
got restricted __le32 [usertype] min @@
drivers/media/virtio/virtio_video_device.c:392:45: sparse: expected unsigned int
[usertype] denominator
drivers/media/virtio/virtio_video_device.c:392:45: sparse: got restricted __le32
[usertype] min
drivers/media/virtio/virtio_video_device.c:394:46: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] denominator @@
got restricted __le32 [usertype] step @@
drivers/media/virtio/virtio_video_device.c:394:46: sparse: expected unsigned int
[usertype] denominator
drivers/media/virtio/virtio_video_device.c:394:46: sparse: got restricted __le32
[usertype] step
drivers/media/virtio/virtio_video_device.c:395:26: sparse: sparse: restricted __le32
degrades to integer
> drivers/media/virtio/virtio_video_device.c:503:29: sparse:
sparse: incorrect type in assignment (different base types) @@ expected signed int
[usertype] left @@ got restricted __le32 [usertype] left @@
> drivers/media/virtio/virtio_video_device.c:503:29: sparse: expected signed int
[usertype] left
> drivers/media/virtio/virtio_video_device.c:503:29: sparse: got restricted __le32
[usertype] left
> drivers/media/virtio/virtio_video_device.c:504:28: sparse: sparse: incorrect type in
assignment (different base types) @@ expected signed int [usertype] top @@ got
restricted __le32 [usertype] top @@
> drivers/media/virtio/virtio_video_device.c:504:28: sparse: expected signed int
[usertype] top
> drivers/media/virtio/virtio_video_device.c:504:28: sparse: got restricted __le32
[usertype] top
> drivers/media/virtio/virtio_video_device.c:505:30: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] width @@ got
restricted __le32 [usertype] width @@
drivers/media/virtio/virtio_video_device.c:505:30: sparse: expected unsigned int
[usertype] width
> drivers/media/virtio/virtio_video_device.c:505:30: sparse:
got restricted __le32 [usertype] width
> drivers/media/virtio/virtio_video_device.c:506:31: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] height @@
got restricted __le32 [usertype] height @@
drivers/media/virtio/virtio_video_device.c:506:31: sparse: expected unsigned int
[usertype] height
> drivers/media/virtio/virtio_video_device.c:506:31: sparse:
got restricted __le32 [usertype] height
drivers/media/virtio/virtio_video_device.c:526:35: sparse: sparse: incorrect type in
assignment (different base types) @@ expected restricted __le32 [usertype] top @@
got signed int [usertype] top @@
drivers/media/virtio/virtio_video_device.c:526:35: sparse: expected restricted
__le32 [usertype] top
drivers/media/virtio/virtio_video_device.c:526:35: sparse: got signed int
[usertype] top
drivers/media/virtio/virtio_video_device.c:527:36: sparse: sparse: incorrect type in
assignment (different base types) @@ expected restricted __le32 [usertype] left @@
got signed int [usertype] left @@
drivers/media/virtio/virtio_video_device.c:527:36: sparse: expected restricted
__le32 [usertype] left
drivers/media/virtio/virtio_video_device.c:527:36: sparse: got signed int
[usertype] left
drivers/media/virtio/virtio_video_device.c:528:37: sparse: sparse: incorrect type in
assignment (different base types) @@ expected restricted __le32 [usertype] width @@
got unsigned int [usertype] width @@
drivers/media/virtio/virtio_video_device.c:528:37: sparse: expected restricted
__le32 [usertype] width
drivers/media/virtio/virtio_video_device.c:528:37: sparse: got unsigned int
[usertype] width
drivers/media/virtio/virtio_video_device.c:529:38: sparse: sparse: incorrect type in
assignment (different base types) @@ expected restricted __le32 [usertype] height @@
got unsigned int [usertype] height @@
drivers/media/virtio/virtio_video_device.c:529:38: sparse: expected restricted
__le32 [usertype] height
drivers/media/virtio/virtio_video_device.c:529:38: sparse: got unsigned int
[usertype] height
drivers/media/virtio/virtio_video_device.c:577:34: sparse: sparse: restricted __le32
degrades to integer
drivers/media/virtio/virtio_video_device.c:580:47: sparse: sparse: incorrect type in
argument 1 (different base types) @@ expected unsigned int [usertype] min @@ got
restricted __le32 [usertype] min @@
drivers/media/virtio/virtio_video_device.c:580:47: sparse: expected unsigned int
[usertype] min
drivers/media/virtio/virtio_video_device.c:580:47: sparse: got restricted __le32
[usertype] min
drivers/media/virtio/virtio_video_device.c:581:47: sparse: sparse: incorrect type in
argument 3 (different base types) @@ expected unsigned int [usertype] max @@ got
restricted __le32 [usertype] max @@
drivers/media/virtio/virtio_video_device.c:581:47: sparse: expected unsigned int
[usertype] max
drivers/media/virtio/virtio_video_device.c:581:47: sparse: got restricted __le32
[usertype] max
drivers/media/virtio/virtio_video_device.c:584:48: sparse: sparse: incorrect type in
argument 1 (different base types) @@ expected unsigned int [usertype] min @@ got
restricted __le32 [usertype] min @@
drivers/media/virtio/virtio_video_device.c:584:48: sparse: expected unsigned int
[usertype] min
drivers/media/virtio/virtio_video_device.c:584:48: sparse: got restricted __le32
[usertype] min
drivers/media/virtio/virtio_video_device.c:585:48: sparse: sparse: incorrect type in
argument 3 (different base types) @@ expected unsigned int [usertype] max @@ got
restricted __le32 [usertype] max @@
drivers/media/virtio/virtio_video_device.c:585:48: sparse: expected unsigned int
[usertype] max
drivers/media/virtio/virtio_video_device.c:585:48: sparse: got restricted __le32
[usertype] max
drivers/media/virtio/virtio_video_device.c:592:64: sparse: sparse: incorrect type in
argument 2 (different base types) @@ expected unsigned int [usertype] a @@ got
restricted __le32 [usertype] step @@
drivers/media/virtio/virtio_video_device.c:592:64: sparse: expected unsigned int
[usertype] a
drivers/media/virtio/virtio_video_device.c:592:64: sparse: got restricted __le32
[usertype] step
drivers/media/virtio/virtio_video_device.c:595:66: sparse: sparse: incorrect type in
argument 2 (different base types) @@ expected unsigned int [usertype] a @@ got
restricted __le32 [usertype] step @@
drivers/media/virtio/virtio_video_device.c:595:66: sparse: expected unsigned int
[usertype] a
drivers/media/virtio/virtio_video_device.c:595:66: sparse: got restricted __le32
[usertype] step
drivers/media/virtio/virtio_video_device.c:605:33: sparse: sparse: incompatible types
in comparison expression (different base types):
drivers/media/virtio/virtio_video_device.c:605:33: sparse: unsigned int *
drivers/media/virtio/virtio_video_device.c:605:33: sparse: restricted __le32 *
drivers/media/virtio/virtio_video_device.c:605:33: sparse: sparse: cast from unknown
type
drivers/media/virtio/virtio_video_device.c:605:33: sparse: sparse: incompatible types
in comparison expression (different base types):
drivers/media/virtio/virtio_video_device.c:605:33: sparse: unsigned int *
drivers/media/virtio/virtio_video_device.c:605:33: sparse: restricted __le32 *
drivers/media/virtio/virtio_video_device.c:605:33: sparse: sparse: incompatible types
in comparison expression (different base types):
drivers/media/virtio/virtio_video_device.c:605:33: sparse: unsigned int *
drivers/media/virtio/virtio_video_device.c:605:33: sparse: restricted __le32 *
drivers/media/virtio/virtio_video_device.c:605:33: sparse: sparse: cast from unknown
type
drivers/media/virtio/virtio_video_device.c:605:33: sparse: sparse: incompatible types
in comparison expression (different base types):
drivers/media/virtio/virtio_video_device.c:605:33: sparse: unsigned int *
drivers/media/virtio/virtio_video_device.c:605:33: sparse: restricted __le32 *
drivers/media/virtio/virtio_video_device.c:605:33: sparse: sparse: cast from unknown
type
drivers/media/virtio/virtio_video_device.c:605:33: sparse: sparse: incompatible types
in comparison expression (different base types):
drivers/media/virtio/virtio_video_device.c:605:33: sparse: unsigned int *
drivers/media/virtio/virtio_video_device.c:605:33: sparse: restricted __le32 *
drivers/media/virtio/virtio_video_device.c:605:33: sparse: sparse: cast from unknown
type
drivers/media/virtio/virtio_video_device.c:610:34: sparse: sparse: incompatible types
in comparison expression (different base types):
drivers/media/virtio/virtio_video_device.c:610:34: sparse: unsigned int *
drivers/media/virtio/virtio_video_device.c:610:34: sparse: restricted __le32 *
drivers/media/virtio/virtio_video_device.c:610:34: sparse: sparse: cast from unknown
type
drivers/media/virtio/virtio_video_device.c:610:34: sparse: sparse: incompatible types
in comparison expression (different base types):
drivers/media/virtio/virtio_video_device.c:610:34: sparse: unsigned int *
drivers/media/virtio/virtio_video_device.c:610:34: sparse: restricted __le32 *
drivers/media/virtio/virtio_video_device.c:610:34: sparse: sparse: incompatible types
in comparison expression (different base types):
drivers/media/virtio/virtio_video_device.c:610:34: sparse: unsigned int *
drivers/media/virtio/virtio_video_device.c:610:34: sparse: restricted __le32 *
drivers/media/virtio/virtio_video_device.c:610:34: sparse: sparse: cast from unknown
type
drivers/media/virtio/virtio_video_device.c:610:34: sparse: sparse: incompatible types
in comparison expression (different base types):
drivers/media/virtio/virtio_video_device.c:610:34: sparse: unsigned int *
drivers/media/virtio/virtio_video_device.c:610:34: sparse: restricted __le32 *
drivers/media/virtio/virtio_video_device.c:610:34: sparse: sparse: cast from unknown
type
drivers/media/virtio/virtio_video_device.c:610:34: sparse: sparse: incompatible types
in comparison expression (different base types):
drivers/media/virtio/virtio_video_device.c:610:34: sparse: unsigned int *
drivers/media/virtio/virtio_video_device.c:610:34: sparse: restricted __le32 *
drivers/media/virtio/virtio_video_device.c:610:34: sparse: sparse: cast from unknown
type
drivers/media/virtio/virtio_video_device.c:897:70: sparse: sparse: incorrect type in
argument 1 (different base types) @@ expected unsigned int [usertype] v4l2_format @@
got restricted __le32 [usertype] format @@
vim +503 drivers/media/virtio/virtio_video_device.c
468
469 int virtio_video_g_selection(struct file *file, void *fh,
470 struct v4l2_selection *sel)
471 {
472 struct video_format_info *info = NULL;
473 struct virtio_video_stream *stream = file2stream(file);
474 struct virtio_video_device *vvd = video_drvdata(file);
475
476 switch (vvd->type) {
477 case VIRTIO_VIDEO_DEVICE_ENCODER:
478 if (!V4L2_TYPE_IS_OUTPUT(sel->type))
479 return -EINVAL;
480 info = &stream->in_info;
481 break;
482 case VIRTIO_VIDEO_DEVICE_DECODER:
483 if (V4L2_TYPE_IS_OUTPUT(sel->type))
484 return -EINVAL;
485 info = &stream->out_info;
486 break;
487 default:
488 v4l2_err(&vvd->vv->v4l2_dev, "unsupported device type\n");
489 return -EINVAL;
490 }
491
492 switch (sel->target) {
493 case V4L2_SEL_TGT_CROP_BOUNDS:
494 sel->r.width = info->frame_width;
495 sel->r.height = info->frame_height;
496 break;
497 case V4L2_SEL_TGT_CROP_DEFAULT:
498 case V4L2_SEL_TGT_CROP:
499 case V4L2_SEL_TGT_COMPOSE_BOUNDS:
500 case V4L2_SEL_TGT_COMPOSE_DEFAULT:
501 case V4L2_SEL_TGT_COMPOSE:
502 case V4L2_SEL_TGT_COMPOSE_PADDED:
503 sel->r.left = info->crop.left;
504 sel->r.top = info->crop.top;
505 sel->r.width = info->crop.width;
506 sel->r.height = info->crop.height;
507 break;
508 default:
509 v4l2_dbg(1, vvd->vv->debug, &vvd->vv->v4l2_dev,
510 "unsupported/invalid selection target: %d\n",
511 sel->target);
512 return -EINVAL;
513 }
514
515 return 0;
516 }
517
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org