[linux-next:master 10807/13035] drivers/md/bcache/bcache.h:769 meta_bucket_pages() warn: subtract is higher precedence than shift
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Coly Li <colyli(a)suse.de>
CC: Jens Axboe <axboe(a)kernel.dk>
CC: Hannes Reinecke <hare(a)suse.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7b287a5c6ac518c415a258f2aa7b1ebb25c263d2
commit: bf6af17065079d29b9bd4e59de27cc2965e6fabf [10807/13035] bcache: handle cache set verify_ondisk properly for bucket size > 8MB
:::::: branch date: 3 hours ago
:::::: commit date: 5 days ago
config: i386-randconfig-m021-20200730 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 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>
New smatch warnings:
drivers/md/bcache/bcache.h:769 meta_bucket_pages() warn: subtract is higher precedence than shift
drivers/md/bcache/bcache.h:769 meta_bucket_pages() warn: subtract is higher precedence than shift
drivers/md/bcache/bcache.h:769 meta_bucket_pages() warn: subtract is higher precedence than shift
Old smatch warnings:
drivers/md/bcache/btree.c:641 mca_reap() warn: inconsistent returns 'b->lock'.
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout bf6af17065079d29b9bd4e59de27cc2965e6fabf
vim +769 drivers/md/bcache/bcache.h
cafe563591446c Kent Overstreet 2013-03-23 764
de1fafab649f94 Coly Li 2020-07-25 765 static inline unsigned int meta_bucket_pages(struct cache_sb *sb)
de1fafab649f94 Coly Li 2020-07-25 766 {
de1fafab649f94 Coly Li 2020-07-25 767 unsigned int n, max_pages;
de1fafab649f94 Coly Li 2020-07-25 768
de1fafab649f94 Coly Li 2020-07-25 @769 max_pages = min_t(unsigned int,
de1fafab649f94 Coly Li 2020-07-25 770 __rounddown_pow_of_two(USHRT_MAX) / PAGE_SECTORS,
de1fafab649f94 Coly Li 2020-07-25 771 MAX_ORDER_NR_PAGES);
de1fafab649f94 Coly Li 2020-07-25 772
de1fafab649f94 Coly Li 2020-07-25 773 n = sb->bucket_size / PAGE_SECTORS;
de1fafab649f94 Coly Li 2020-07-25 774 if (n > max_pages)
de1fafab649f94 Coly Li 2020-07-25 775 n = max_pages;
de1fafab649f94 Coly Li 2020-07-25 776
de1fafab649f94 Coly Li 2020-07-25 777 return n;
de1fafab649f94 Coly Li 2020-07-25 778 }
de1fafab649f94 Coly Li 2020-07-25 779
:::::: The code at line 769 was first introduced by commit
:::::: de1fafab649f944d97e45fc043b55a3a5a371744 bcache: introduce meta_bucket_pages() related helper routines
:::::: TO: Coly Li <colyli(a)suse.de>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[linux-next:master 11710/12711] fs/notify/fsnotify.c:412 fsnotify() warn: variable dereferenced before check 'inode' (see line 401)
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Amir Goldstein <amir73il(a)gmail.com>
CC: Jan Kara <jack(a)suse.cz>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 04b4571786305a76ad81757bbec78eb16a5de582
commit: 9b93f33105f5f9bd3d016ff870eb6000c9d89eff [11710/12711] fsnotify: send event with parent/name info to sb/mount/non-dir marks
:::::: branch date: 24 hours ago
:::::: commit date: 3 days ago
config: i386-randconfig-m021-20200730 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 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:
fs/notify/fsnotify.c:412 fsnotify() warn: variable dereferenced before check 'inode' (see line 401)
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout 9b93f33105f5f9bd3d016ff870eb6000c9d89eff
vim +/inode +412 fs/notify/fsnotify.c
d9a6f30bb89309 Amir Goldstein 2018-04-20 355
90586523eb4b34 Eric Paris 2009-05-21 356 /*
40a100d3adc1ad Amir Goldstein 2020-07-22 357 * fsnotify - This is the main call to fsnotify.
40a100d3adc1ad Amir Goldstein 2020-07-22 358 *
40a100d3adc1ad Amir Goldstein 2020-07-22 359 * The VFS calls into hook specific functions in linux/fsnotify.h.
40a100d3adc1ad Amir Goldstein 2020-07-22 360 * Those functions then in turn call here. Here will call out to all of the
40a100d3adc1ad Amir Goldstein 2020-07-22 361 * registered fsnotify_group. Those groups can then use the notification event
40a100d3adc1ad Amir Goldstein 2020-07-22 362 * in whatever means they feel necessary.
40a100d3adc1ad Amir Goldstein 2020-07-22 363 *
40a100d3adc1ad Amir Goldstein 2020-07-22 364 * @mask: event type and flags
40a100d3adc1ad Amir Goldstein 2020-07-22 365 * @data: object that event happened on
40a100d3adc1ad Amir Goldstein 2020-07-22 366 * @data_type: type of object for fanotify_data_XXX() accessors
40a100d3adc1ad Amir Goldstein 2020-07-22 367 * @dir: optional directory associated with event -
40a100d3adc1ad Amir Goldstein 2020-07-22 368 * if @file_name is not NULL, this is the directory that
40a100d3adc1ad Amir Goldstein 2020-07-22 369 * @file_name is relative to
40a100d3adc1ad Amir Goldstein 2020-07-22 370 * @file_name: optional file name associated with event
40a100d3adc1ad Amir Goldstein 2020-07-22 371 * @inode: optional inode associated with event -
40a100d3adc1ad Amir Goldstein 2020-07-22 372 * either @dir or @inode must be non-NULL.
40a100d3adc1ad Amir Goldstein 2020-07-22 373 * if both are non-NULL event may be reported to both.
40a100d3adc1ad Amir Goldstein 2020-07-22 374 * @cookie: inotify rename cookie
90586523eb4b34 Eric Paris 2009-05-21 375 */
40a100d3adc1ad Amir Goldstein 2020-07-22 376 int fsnotify(__u32 mask, const void *data, int data_type, struct inode *dir,
40a100d3adc1ad Amir Goldstein 2020-07-22 377 const struct qstr *file_name, struct inode *inode, u32 cookie)
90586523eb4b34 Eric Paris 2009-05-21 378 {
b54cecf5e2293d Amir Goldstein 2020-06-07 379 const struct path *path = fsnotify_data_path(data, data_type);
3427ce71554123 Miklos Szeredi 2017-10-30 380 struct fsnotify_iter_info iter_info = {};
40a100d3adc1ad Amir Goldstein 2020-07-22 381 struct super_block *sb;
60f7ed8c7c4d06 Amir Goldstein 2018-09-01 382 struct mount *mnt = NULL;
497b0c5a7c0688 Amir Goldstein 2020-07-16 383 struct inode *child = NULL;
9385a84d7e1f65 Jan Kara 2016-11-10 384 int ret = 0;
71d734103edfa2 Mel Gorman 2020-07-08 385 __u32 test_mask, marks_mask;
90586523eb4b34 Eric Paris 2009-05-21 386
71d734103edfa2 Mel Gorman 2020-07-08 387 if (path)
aa93bdc5500cc9 Amir Goldstein 2020-03-19 388 mnt = real_mount(path->mnt);
3a9fb89f4cd04c Eric Paris 2009-12-17 389
40a100d3adc1ad Amir Goldstein 2020-07-22 390 if (!inode) {
40a100d3adc1ad Amir Goldstein 2020-07-22 391 /* Dirent event - report on TYPE_INODE to dir */
40a100d3adc1ad Amir Goldstein 2020-07-22 392 inode = dir;
40a100d3adc1ad Amir Goldstein 2020-07-22 393 } else if (mask & FS_EVENT_ON_CHILD) {
40a100d3adc1ad Amir Goldstein 2020-07-22 394 /*
9b93f33105f5f9 Amir Goldstein 2020-07-16 395 * Event on child - report on TYPE_INODE to dir if it is
9b93f33105f5f9 Amir Goldstein 2020-07-16 396 * watching children and on TYPE_CHILD to child.
40a100d3adc1ad Amir Goldstein 2020-07-22 397 */
40a100d3adc1ad Amir Goldstein 2020-07-22 398 child = inode;
40a100d3adc1ad Amir Goldstein 2020-07-22 399 inode = dir;
40a100d3adc1ad Amir Goldstein 2020-07-22 400 }
40a100d3adc1ad Amir Goldstein 2020-07-22 @401 sb = inode->i_sb;
497b0c5a7c0688 Amir Goldstein 2020-07-16 402
7c49b8616460eb Dave Hansen 2015-09-04 403 /*
7c49b8616460eb Dave Hansen 2015-09-04 404 * Optimization: srcu_read_lock() has a memory barrier which can
7c49b8616460eb Dave Hansen 2015-09-04 405 * be expensive. It protects walking the *_fsnotify_marks lists.
7c49b8616460eb Dave Hansen 2015-09-04 406 * However, if we do not walk the lists, we do not have to do
7c49b8616460eb Dave Hansen 2015-09-04 407 * SRCU because we have no references to any objects and do not
7c49b8616460eb Dave Hansen 2015-09-04 408 * need SRCU to keep them "alive".
7c49b8616460eb Dave Hansen 2015-09-04 409 */
9b93f33105f5f9 Amir Goldstein 2020-07-16 410 if (!sb->s_fsnotify_marks &&
497b0c5a7c0688 Amir Goldstein 2020-07-16 411 (!mnt || !mnt->mnt_fsnotify_marks) &&
9b93f33105f5f9 Amir Goldstein 2020-07-16 @412 (!inode || !inode->i_fsnotify_marks) &&
497b0c5a7c0688 Amir Goldstein 2020-07-16 413 (!child || !child->i_fsnotify_marks))
7c49b8616460eb Dave Hansen 2015-09-04 414 return 0;
71d734103edfa2 Mel Gorman 2020-07-08 415
9b93f33105f5f9 Amir Goldstein 2020-07-16 416 marks_mask = sb->s_fsnotify_mask;
71d734103edfa2 Mel Gorman 2020-07-08 417 if (mnt)
71d734103edfa2 Mel Gorman 2020-07-08 418 marks_mask |= mnt->mnt_fsnotify_mask;
9b93f33105f5f9 Amir Goldstein 2020-07-16 419 if (inode)
9b93f33105f5f9 Amir Goldstein 2020-07-16 420 marks_mask |= inode->i_fsnotify_mask;
497b0c5a7c0688 Amir Goldstein 2020-07-16 421 if (child)
497b0c5a7c0688 Amir Goldstein 2020-07-16 422 marks_mask |= child->i_fsnotify_mask;
497b0c5a7c0688 Amir Goldstein 2020-07-16 423
71d734103edfa2 Mel Gorman 2020-07-08 424
613a807fe7c793 Eric Paris 2010-07-28 425 /*
613a807fe7c793 Eric Paris 2010-07-28 426 * if this is a modify event we may need to clear the ignored masks
497b0c5a7c0688 Amir Goldstein 2020-07-16 427 * otherwise return if none of the marks care about this type of event.
613a807fe7c793 Eric Paris 2010-07-28 428 */
71d734103edfa2 Mel Gorman 2020-07-08 429 test_mask = (mask & ALL_FSNOTIFY_EVENTS);
71d734103edfa2 Mel Gorman 2020-07-08 430 if (!(mask & FS_MODIFY) && !(test_mask & marks_mask))
613a807fe7c793 Eric Paris 2010-07-28 431 return 0;
75c1be487a690d Eric Paris 2010-07-28 432
9385a84d7e1f65 Jan Kara 2016-11-10 433 iter_info.srcu_idx = srcu_read_lock(&fsnotify_mark_srcu);
75c1be487a690d Eric Paris 2010-07-28 434
45a9fb3725d886 Amir Goldstein 2019-01-10 435 iter_info.marks[FSNOTIFY_OBJ_TYPE_SB] =
45a9fb3725d886 Amir Goldstein 2019-01-10 436 fsnotify_first_mark(&sb->s_fsnotify_marks);
9bdda4e9cf2dce Amir Goldstein 2018-09-01 437 if (mnt) {
47d9c7cc457adc Amir Goldstein 2018-04-20 438 iter_info.marks[FSNOTIFY_OBJ_TYPE_VFSMOUNT] =
3427ce71554123 Miklos Szeredi 2017-10-30 439 fsnotify_first_mark(&mnt->mnt_fsnotify_marks);
7131485a93679f Eric Paris 2009-12-17 440 }
9b93f33105f5f9 Amir Goldstein 2020-07-16 441 if (inode) {
9b93f33105f5f9 Amir Goldstein 2020-07-16 442 iter_info.marks[FSNOTIFY_OBJ_TYPE_INODE] =
9b93f33105f5f9 Amir Goldstein 2020-07-16 443 fsnotify_first_mark(&inode->i_fsnotify_marks);
9b93f33105f5f9 Amir Goldstein 2020-07-16 444 }
497b0c5a7c0688 Amir Goldstein 2020-07-16 445 if (child) {
497b0c5a7c0688 Amir Goldstein 2020-07-16 446 iter_info.marks[FSNOTIFY_OBJ_TYPE_CHILD] =
497b0c5a7c0688 Amir Goldstein 2020-07-16 447 fsnotify_first_mark(&child->i_fsnotify_marks);
497b0c5a7c0688 Amir Goldstein 2020-07-16 448 }
75c1be487a690d Eric Paris 2010-07-28 449
8edc6e1688fc8f Jan Kara 2014-11-13 450 /*
60f7ed8c7c4d06 Amir Goldstein 2018-09-01 451 * We need to merge inode/vfsmount/sb mark lists so that e.g. inode mark
60f7ed8c7c4d06 Amir Goldstein 2018-09-01 452 * ignore masks are properly reflected for mount/sb mark notifications.
8edc6e1688fc8f Jan Kara 2014-11-13 453 * That's why this traversal is so complicated...
8edc6e1688fc8f Jan Kara 2014-11-13 454 */
d9a6f30bb89309 Amir Goldstein 2018-04-20 455 while (fsnotify_iter_select_report_types(&iter_info)) {
b54cecf5e2293d Amir Goldstein 2020-06-07 456 ret = send_to_group(mask, data, data_type, dir, file_name,
b54cecf5e2293d Amir Goldstein 2020-06-07 457 cookie, &iter_info);
613a807fe7c793 Eric Paris 2010-07-28 458
ff8bcbd03da881 Eric Paris 2010-10-28 459 if (ret && (mask & ALL_FSNOTIFY_PERM_EVENTS))
ff8bcbd03da881 Eric Paris 2010-10-28 460 goto out;
ff8bcbd03da881 Eric Paris 2010-10-28 461
d9a6f30bb89309 Amir Goldstein 2018-04-20 462 fsnotify_iter_next(&iter_info);
90586523eb4b34 Eric Paris 2009-05-21 463 }
ff8bcbd03da881 Eric Paris 2010-10-28 464 ret = 0;
ff8bcbd03da881 Eric Paris 2010-10-28 465 out:
9385a84d7e1f65 Jan Kara 2016-11-10 466 srcu_read_unlock(&fsnotify_mark_srcu, iter_info.srcu_idx);
c4ec54b40d33f8 Eric Paris 2009-12-17 467
98b5c10d320adf Jean-Christophe Dubois 2010-03-23 468 return ret;
90586523eb4b34 Eric Paris 2009-05-21 469 }
90586523eb4b34 Eric Paris 2009-05-21 470 EXPORT_SYMBOL_GPL(fsnotify);
90586523eb4b34 Eric Paris 2009-05-21 471
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
drivers/media/i2c/tvp5150.c:1114 tvp5150_set_selection() warn: passing a valid pointer to 'PTR_ERR'
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Marco Felsch <m.felsch(a)pengutronix.de>
CC: Mauro Carvalho Chehab <mchehab(a)kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Hans Verkuil <hverkuil(a)xs4all.nl>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 83bdc7275e6206f560d247be856bceba3e1ed8f2
commit: 46fe6e7dcededcf4aba88163fee80f4f7df23deb media: tvp5150: add FORMAT_TRY support for get/set selection handlers
date: 5 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 5 months ago
config: i386-randconfig-m021-20200730 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 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/media/i2c/tvp5150.c:1114 tvp5150_set_selection() warn: passing a valid pointer to 'PTR_ERR'
drivers/media/i2c/tvp5150.c:1157 tvp5150_get_selection() warn: passing a valid pointer to 'PTR_ERR'
# 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 remote update linus
git checkout 46fe6e7dcededcf4aba88163fee80f4f7df23deb
vim +/PTR_ERR +1114 drivers/media/i2c/tvp5150.c
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1076
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1077 static int tvp5150_set_selection(struct v4l2_subdev *sd,
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1078 struct v4l2_subdev_pad_config *cfg,
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1079 struct v4l2_subdev_selection *sel)
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1080 {
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1081 struct tvp5150 *decoder = to_tvp5150(sd);
b4125e5b1bd70d drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1082 struct v4l2_rect *rect = &sel->r;
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1083 struct v4l2_rect *crop;
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1084 unsigned int hmax;
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1085
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1086 if (sel->target != V4L2_SEL_TGT_CROP)
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1087 return -EINVAL;
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1088
257e29f84e377d drivers/media/i2c/tvp5150.c Mauro Carvalho Chehab 2016-11-16 1089 dev_dbg_lvl(sd->dev, 1, debug, "%s left=%d, top=%d, width=%d, height=%d\n",
b4125e5b1bd70d drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1090 __func__, rect->left, rect->top, rect->width, rect->height);
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1091
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1092 /* tvp5150 has some special limits */
b4125e5b1bd70d drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1093 rect->left = clamp(rect->left, 0, TVP5150_MAX_CROP_LEFT);
b4125e5b1bd70d drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1094 rect->top = clamp(rect->top, 0, TVP5150_MAX_CROP_TOP);
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1095 hmax = tvp5150_get_hmax(sd);
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1096
bd24db04101f45 drivers/media/i2c/tvp5150.c Marco Felsch 2018-06-28 1097 /*
bd24db04101f45 drivers/media/i2c/tvp5150.c Marco Felsch 2018-06-28 1098 * alignments:
bd24db04101f45 drivers/media/i2c/tvp5150.c Marco Felsch 2018-06-28 1099 * - width = 2 due to UYVY colorspace
bd24db04101f45 drivers/media/i2c/tvp5150.c Marco Felsch 2018-06-28 1100 * - height, image = no special alignment
bd24db04101f45 drivers/media/i2c/tvp5150.c Marco Felsch 2018-06-28 1101 */
b4125e5b1bd70d drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1102 v4l_bound_align_image(&rect->width,
b4125e5b1bd70d drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1103 TVP5150_H_MAX - TVP5150_MAX_CROP_LEFT - rect->left,
b4125e5b1bd70d drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1104 TVP5150_H_MAX - rect->left, 1, &rect->height,
b4125e5b1bd70d drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1105 hmax - TVP5150_MAX_CROP_TOP - rect->top,
b4125e5b1bd70d drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1106 hmax - rect->top, 0, 0);
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1107
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1108 if (!IS_ENABLED(CONFIG_VIDEO_V4L2_SUBDEV_API) &&
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1109 sel->which == V4L2_SUBDEV_FORMAT_TRY)
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1110 return 0;
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1111
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1112 crop = tvp5150_get_pad_crop(decoder, cfg, sel->pad, sel->which);
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1113 if (IS_ERR(crop))
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 @1114 return PTR_ERR(crop);
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1115
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1116 /*
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1117 * Update output image size if the selection (crop) rectangle size or
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1118 * position has been modified.
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1119 */
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1120 if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE &&
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1121 !v4l2_rect_equal(rect, crop))
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1122 tvp5150_set_hw_selection(sd, rect);
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1123
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1124 *crop = *rect;
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1125
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1126 return 0;
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1127 }
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1128
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1129 static int tvp5150_get_selection(struct v4l2_subdev *sd,
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1130 struct v4l2_subdev_pad_config *cfg,
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1131 struct v4l2_subdev_selection *sel)
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1132 {
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1133 struct tvp5150 *decoder = container_of(sd, struct tvp5150, sd);
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1134 struct v4l2_rect *crop;
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1135 v4l2_std_id std;
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1136
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1137 switch (sel->target) {
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1138 case V4L2_SEL_TGT_CROP_BOUNDS:
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1139 sel->r.left = 0;
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1140 sel->r.top = 0;
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1141 sel->r.width = TVP5150_H_MAX;
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1142
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1143 /* Calculate height based on current standard */
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1144 if (decoder->norm == V4L2_STD_ALL)
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1145 std = tvp5150_read_std(sd);
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1146 else
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1147 std = decoder->norm;
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1148 if (std & V4L2_STD_525_60)
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1149 sel->r.height = TVP5150_V_MAX_525_60;
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1150 else
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1151 sel->r.height = TVP5150_V_MAX_OTHERS;
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1152 return 0;
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1153 case V4L2_SEL_TGT_CROP:
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1154 crop = tvp5150_get_pad_crop(decoder, cfg, sel->pad,
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1155 sel->which);
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1156 if (IS_ERR(crop))
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 @1157 return PTR_ERR(crop);
46fe6e7dcededc drivers/media/i2c/tvp5150.c Marco Felsch 2020-03-12 1158 sel->r = *crop;
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1159 return 0;
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1160 default:
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1161 return -EINVAL;
10d5509c8d50a2 drivers/media/i2c/tvp5150.c Hans Verkuil 2015-12-14 1162 }
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1163 }
963ddc63e20d5e drivers/media/video/tvp5150.c Javier Martin 2012-01-31 1164
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[pm:testing 3/8] drivers/staging/axis-fifo/axis-fifo.c:864 axis_fifo_probe() warn: could not determine type of argument 5
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-acpi(a)vger.kernel.org
CC: devel(a)acpica.org
CC: linux-pm(a)vger.kernel.org
TO: "Rafael J. Wysocki" <rjw(a)rjwysocki.net>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git testing
head: 78b38a56af0ffa05ba414ce6be1123f7c799aafd
commit: 819b477e22f8600b25abcdd15ed5b8e8b148caee [3/8] Merge branches 'pm-em', 'pm-sleep' and 'pm-domains' into linux-next
:::::: branch date: 6 hours ago
:::::: commit date: 3 days ago
config: x86_64-randconfig-m001-20200729 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 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>
New smatch warnings:
drivers/staging/axis-fifo/axis-fifo.c:864 axis_fifo_probe() warn: could not determine type of argument 5
Old smatch warnings:
drivers/staging/axis-fifo/axis-fifo.c:941 axis_fifo_probe() warn: could not determine type of argument 3
drivers/staging/axis-fifo/axis-fifo.c:941 axis_fifo_probe() error: '%pa' expects argument of type 'phys_addr_t*', argument 4 has type 'void**'
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commi...
git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git remote update pm
git checkout 819b477e22f8600b25abcdd15ed5b8e8b148caee
vim +864 drivers/staging/axis-fifo/axis-fifo.c
ed6daf2b2832d9 Quentin Deslandes 2019-11-01 808
4a965c5f89decd Jacob Feder 2018-07-22 809 static int axis_fifo_probe(struct platform_device *pdev)
4a965c5f89decd Jacob Feder 2018-07-22 810 {
4a965c5f89decd Jacob Feder 2018-07-22 811 struct resource *r_irq; /* interrupt resources */
4a965c5f89decd Jacob Feder 2018-07-22 812 struct resource *r_mem; /* IO mem resources */
4a965c5f89decd Jacob Feder 2018-07-22 813 struct device *dev = &pdev->dev; /* OS device (from device tree) */
4a965c5f89decd Jacob Feder 2018-07-22 814 struct axis_fifo *fifo = NULL;
4a965c5f89decd Jacob Feder 2018-07-22 815
4a965c5f89decd Jacob Feder 2018-07-22 816 char device_name[32];
4a965c5f89decd Jacob Feder 2018-07-22 817
4a965c5f89decd Jacob Feder 2018-07-22 818 int rc = 0; /* error return value */
4a965c5f89decd Jacob Feder 2018-07-22 819
4a965c5f89decd Jacob Feder 2018-07-22 820 /* ----------------------------
4a965c5f89decd Jacob Feder 2018-07-22 821 * init wrapper device
4a965c5f89decd Jacob Feder 2018-07-22 822 * ----------------------------
4a965c5f89decd Jacob Feder 2018-07-22 823 */
4a965c5f89decd Jacob Feder 2018-07-22 824
4a965c5f89decd Jacob Feder 2018-07-22 825 /* allocate device wrapper memory */
4a965c5f89decd Jacob Feder 2018-07-22 826 fifo = devm_kmalloc(dev, sizeof(*fifo), GFP_KERNEL);
4a965c5f89decd Jacob Feder 2018-07-22 827 if (!fifo)
4a965c5f89decd Jacob Feder 2018-07-22 828 return -ENOMEM;
4a965c5f89decd Jacob Feder 2018-07-22 829
4a965c5f89decd Jacob Feder 2018-07-22 830 dev_set_drvdata(dev, fifo);
4a965c5f89decd Jacob Feder 2018-07-22 831 fifo->dt_device = dev;
4a965c5f89decd Jacob Feder 2018-07-22 832
4a965c5f89decd Jacob Feder 2018-07-22 833 init_waitqueue_head(&fifo->read_queue);
4a965c5f89decd Jacob Feder 2018-07-22 834 init_waitqueue_head(&fifo->write_queue);
4a965c5f89decd Jacob Feder 2018-07-22 835
0443b3f4436321 Quentin Deslandes 2020-01-21 836 mutex_init(&fifo->read_lock);
0443b3f4436321 Quentin Deslandes 2020-01-21 837 mutex_init(&fifo->write_lock);
4a965c5f89decd Jacob Feder 2018-07-22 838
4a965c5f89decd Jacob Feder 2018-07-22 839 /* ----------------------------
4a965c5f89decd Jacob Feder 2018-07-22 840 * init device memory space
4a965c5f89decd Jacob Feder 2018-07-22 841 * ----------------------------
4a965c5f89decd Jacob Feder 2018-07-22 842 */
4a965c5f89decd Jacob Feder 2018-07-22 843
4a965c5f89decd Jacob Feder 2018-07-22 844 /* get iospace for the device */
4a965c5f89decd Jacob Feder 2018-07-22 845 r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
4a965c5f89decd Jacob Feder 2018-07-22 846 if (!r_mem) {
4a965c5f89decd Jacob Feder 2018-07-22 847 dev_err(fifo->dt_device, "invalid address\n");
4a965c5f89decd Jacob Feder 2018-07-22 848 rc = -ENODEV;
4a965c5f89decd Jacob Feder 2018-07-22 849 goto err_initial;
4a965c5f89decd Jacob Feder 2018-07-22 850 }
4a965c5f89decd Jacob Feder 2018-07-22 851
4a965c5f89decd Jacob Feder 2018-07-22 852 /* request physical memory */
354e27a86b4c64 Quentin Deslandes 2019-11-01 853 fifo->base_addr = devm_ioremap_resource(fifo->dt_device, r_mem);
6a20d283ed6867 Quentin Deslandes 2019-11-01 854 if (IS_ERR(fifo->base_addr)) {
6a20d283ed6867 Quentin Deslandes 2019-11-01 855 rc = PTR_ERR(fifo->base_addr);
6a20d283ed6867 Quentin Deslandes 2019-11-01 856 dev_err(fifo->dt_device, "can't remap IO resource (%d)\n", rc);
4a965c5f89decd Jacob Feder 2018-07-22 857 goto err_initial;
4a965c5f89decd Jacob Feder 2018-07-22 858 }
4a965c5f89decd Jacob Feder 2018-07-22 859
4a965c5f89decd Jacob Feder 2018-07-22 860 dev_dbg(fifo->dt_device, "remapped memory to 0x%p\n", fifo->base_addr);
4a965c5f89decd Jacob Feder 2018-07-22 861
4a965c5f89decd Jacob Feder 2018-07-22 862 /* create unique device name */
4a965c5f89decd Jacob Feder 2018-07-22 863 snprintf(device_name, sizeof(device_name), "%s_%pa",
354e27a86b4c64 Quentin Deslandes 2019-11-01 @864 DRIVER_NAME, &r_mem->start);
4a965c5f89decd Jacob Feder 2018-07-22 865
4a965c5f89decd Jacob Feder 2018-07-22 866 dev_dbg(fifo->dt_device, "device name [%s]\n", device_name);
4a965c5f89decd Jacob Feder 2018-07-22 867
4a965c5f89decd Jacob Feder 2018-07-22 868 /* ----------------------------
4a965c5f89decd Jacob Feder 2018-07-22 869 * init IP
4a965c5f89decd Jacob Feder 2018-07-22 870 * ----------------------------
4a965c5f89decd Jacob Feder 2018-07-22 871 */
4a965c5f89decd Jacob Feder 2018-07-22 872
ed6daf2b2832d9 Quentin Deslandes 2019-11-01 873 rc = axis_fifo_parse_dt(fifo);
4a965c5f89decd Jacob Feder 2018-07-22 874 if (rc)
6a20d283ed6867 Quentin Deslandes 2019-11-01 875 goto err_initial;
4a965c5f89decd Jacob Feder 2018-07-22 876
4a965c5f89decd Jacob Feder 2018-07-22 877 reset_ip_core(fifo);
4a965c5f89decd Jacob Feder 2018-07-22 878
4a965c5f89decd Jacob Feder 2018-07-22 879 /* ----------------------------
4a965c5f89decd Jacob Feder 2018-07-22 880 * init device interrupts
4a965c5f89decd Jacob Feder 2018-07-22 881 * ----------------------------
4a965c5f89decd Jacob Feder 2018-07-22 882 */
4a965c5f89decd Jacob Feder 2018-07-22 883
4a965c5f89decd Jacob Feder 2018-07-22 884 /* get IRQ resource */
4a965c5f89decd Jacob Feder 2018-07-22 885 r_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
4a965c5f89decd Jacob Feder 2018-07-22 886 if (!r_irq) {
4a965c5f89decd Jacob Feder 2018-07-22 887 dev_err(fifo->dt_device, "no IRQ found for 0x%pa\n",
354e27a86b4c64 Quentin Deslandes 2019-11-01 888 &r_mem->start);
4a965c5f89decd Jacob Feder 2018-07-22 889 rc = -EIO;
6a20d283ed6867 Quentin Deslandes 2019-11-01 890 goto err_initial;
4a965c5f89decd Jacob Feder 2018-07-22 891 }
4a965c5f89decd Jacob Feder 2018-07-22 892
4a965c5f89decd Jacob Feder 2018-07-22 893 /* request IRQ */
4a965c5f89decd Jacob Feder 2018-07-22 894 fifo->irq = r_irq->start;
6a20d283ed6867 Quentin Deslandes 2019-11-01 895 rc = devm_request_irq(fifo->dt_device, fifo->irq, &axis_fifo_irq, 0,
6a20d283ed6867 Quentin Deslandes 2019-11-01 896 DRIVER_NAME, fifo);
4a965c5f89decd Jacob Feder 2018-07-22 897 if (rc) {
4a965c5f89decd Jacob Feder 2018-07-22 898 dev_err(fifo->dt_device, "couldn't allocate interrupt %i\n",
4a965c5f89decd Jacob Feder 2018-07-22 899 fifo->irq);
6a20d283ed6867 Quentin Deslandes 2019-11-01 900 goto err_initial;
4a965c5f89decd Jacob Feder 2018-07-22 901 }
4a965c5f89decd Jacob Feder 2018-07-22 902
4a965c5f89decd Jacob Feder 2018-07-22 903 /* ----------------------------
4a965c5f89decd Jacob Feder 2018-07-22 904 * init char device
4a965c5f89decd Jacob Feder 2018-07-22 905 * ----------------------------
4a965c5f89decd Jacob Feder 2018-07-22 906 */
4a965c5f89decd Jacob Feder 2018-07-22 907
4a965c5f89decd Jacob Feder 2018-07-22 908 /* allocate device number */
4a965c5f89decd Jacob Feder 2018-07-22 909 rc = alloc_chrdev_region(&fifo->devt, 0, 1, DRIVER_NAME);
4a965c5f89decd Jacob Feder 2018-07-22 910 if (rc < 0)
6a20d283ed6867 Quentin Deslandes 2019-11-01 911 goto err_initial;
4a965c5f89decd Jacob Feder 2018-07-22 912 dev_dbg(fifo->dt_device, "allocated device number major %i minor %i\n",
4a965c5f89decd Jacob Feder 2018-07-22 913 MAJOR(fifo->devt), MINOR(fifo->devt));
4a965c5f89decd Jacob Feder 2018-07-22 914
4a965c5f89decd Jacob Feder 2018-07-22 915 /* create driver file */
4a965c5f89decd Jacob Feder 2018-07-22 916 fifo->device = device_create(axis_fifo_driver_class, NULL, fifo->devt,
4a965c5f89decd Jacob Feder 2018-07-22 917 NULL, device_name);
6d4abf1c0e265d Wei Yongjun 2018-07-27 918 if (IS_ERR(fifo->device)) {
4a965c5f89decd Jacob Feder 2018-07-22 919 dev_err(fifo->dt_device,
4a965c5f89decd Jacob Feder 2018-07-22 920 "couldn't create driver file\n");
6d4abf1c0e265d Wei Yongjun 2018-07-27 921 rc = PTR_ERR(fifo->device);
4a965c5f89decd Jacob Feder 2018-07-22 922 goto err_chrdev_region;
4a965c5f89decd Jacob Feder 2018-07-22 923 }
4a965c5f89decd Jacob Feder 2018-07-22 924 dev_set_drvdata(fifo->device, fifo);
4a965c5f89decd Jacob Feder 2018-07-22 925
4a965c5f89decd Jacob Feder 2018-07-22 926 /* create character device */
4a965c5f89decd Jacob Feder 2018-07-22 927 cdev_init(&fifo->char_device, &fops);
4a965c5f89decd Jacob Feder 2018-07-22 928 rc = cdev_add(&fifo->char_device, fifo->devt, 1);
4a965c5f89decd Jacob Feder 2018-07-22 929 if (rc < 0) {
4a965c5f89decd Jacob Feder 2018-07-22 930 dev_err(fifo->dt_device, "couldn't create character device\n");
4a965c5f89decd Jacob Feder 2018-07-22 931 goto err_dev;
4a965c5f89decd Jacob Feder 2018-07-22 932 }
4a965c5f89decd Jacob Feder 2018-07-22 933
4a965c5f89decd Jacob Feder 2018-07-22 934 /* create sysfs entries */
6a20d283ed6867 Quentin Deslandes 2019-11-01 935 rc = devm_device_add_group(fifo->device, &axis_fifo_attrs_group);
4a965c5f89decd Jacob Feder 2018-07-22 936 if (rc < 0) {
4a965c5f89decd Jacob Feder 2018-07-22 937 dev_err(fifo->dt_device, "couldn't register sysfs group\n");
4a965c5f89decd Jacob Feder 2018-07-22 938 goto err_cdev;
4a965c5f89decd Jacob Feder 2018-07-22 939 }
4a965c5f89decd Jacob Feder 2018-07-22 940
4a965c5f89decd Jacob Feder 2018-07-22 941 dev_info(fifo->dt_device, "axis-fifo created at %pa mapped to 0x%pa, irq=%i, major=%i, minor=%i\n",
354e27a86b4c64 Quentin Deslandes 2019-11-01 942 &r_mem->start, &fifo->base_addr, fifo->irq,
4a965c5f89decd Jacob Feder 2018-07-22 943 MAJOR(fifo->devt), MINOR(fifo->devt));
4a965c5f89decd Jacob Feder 2018-07-22 944
4a965c5f89decd Jacob Feder 2018-07-22 945 return 0;
4a965c5f89decd Jacob Feder 2018-07-22 946
4a965c5f89decd Jacob Feder 2018-07-22 947 err_cdev:
4a965c5f89decd Jacob Feder 2018-07-22 948 cdev_del(&fifo->char_device);
4a965c5f89decd Jacob Feder 2018-07-22 949 err_dev:
4a965c5f89decd Jacob Feder 2018-07-22 950 device_destroy(axis_fifo_driver_class, fifo->devt);
4a965c5f89decd Jacob Feder 2018-07-22 951 err_chrdev_region:
4a965c5f89decd Jacob Feder 2018-07-22 952 unregister_chrdev_region(fifo->devt, 1);
4a965c5f89decd Jacob Feder 2018-07-22 953 err_initial:
4a965c5f89decd Jacob Feder 2018-07-22 954 dev_set_drvdata(dev, NULL);
4a965c5f89decd Jacob Feder 2018-07-22 955 return rc;
4a965c5f89decd Jacob Feder 2018-07-22 956 }
4a965c5f89decd Jacob Feder 2018-07-22 957
:::::: The code at line 864 was first introduced by commit
:::::: 354e27a86b4c6479cbc51a8e9e347665a73e8d12 staging: axis-fifo: remove unused pointer to memory resource
:::::: TO: Quentin Deslandes <quentin.deslandes(a)itdev.co.uk>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
drivers/net/ethernet/pensando/ionic/ionic_lif.c:2004:3-9: preceding lock on line 1998
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Shannon Nelson <snelson(a)pensando.io>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6ba1b005ffc388c2aeaddae20da29e4810dea298
commit: 0925e9db4dc86daf666d9a3d53c7db14ac6d5d00 ionic: use mutex to protect queue operations
date: 9 days ago
:::::: branch date: 21 hours ago
:::::: commit date: 9 days ago
config: powerpc-randconfig-c004-20200728 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 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: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/pensando/ionic/ionic_lif.c:2004:3-9: preceding lock on line 1998
# 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 remote update linus
git checkout 0925e9db4dc86daf666d9a3d53c7db14ac6d5d00
vim +2004 drivers/net/ethernet/pensando/ionic/ionic_lif.c
beead698b1736df Shannon Nelson 2019-09-03 1992
086c18f2452d002 Shannon Nelson 2020-07-07 1993 int ionic_reset_queues(struct ionic_lif *lif, ionic_reset_cb cb, void *arg)
beead698b1736df Shannon Nelson 2019-09-03 1994 {
beead698b1736df Shannon Nelson 2019-09-03 1995 bool running;
beead698b1736df Shannon Nelson 2019-09-03 1996 int err = 0;
beead698b1736df Shannon Nelson 2019-09-03 1997
0925e9db4dc86da Shannon Nelson 2020-07-20 @1998 mutex_lock(&lif->queue_lock);
beead698b1736df Shannon Nelson 2019-09-03 1999 running = netif_running(lif->netdev);
b59eabd23ee53e8 Shannon Nelson 2020-06-18 2000 if (running) {
b59eabd23ee53e8 Shannon Nelson 2020-06-18 2001 netif_device_detach(lif->netdev);
beead698b1736df Shannon Nelson 2019-09-03 2002 err = ionic_stop(lif->netdev);
086c18f2452d002 Shannon Nelson 2020-07-07 2003 if (err)
0925e9db4dc86da Shannon Nelson 2020-07-20 @2004 return err;
b59eabd23ee53e8 Shannon Nelson 2020-06-18 2005 }
086c18f2452d002 Shannon Nelson 2020-07-07 2006
086c18f2452d002 Shannon Nelson 2020-07-07 2007 if (cb)
086c18f2452d002 Shannon Nelson 2020-07-07 2008 cb(lif, arg);
086c18f2452d002 Shannon Nelson 2020-07-07 2009
086c18f2452d002 Shannon Nelson 2020-07-07 2010 if (running) {
086c18f2452d002 Shannon Nelson 2020-07-07 2011 err = ionic_open(lif->netdev);
b59eabd23ee53e8 Shannon Nelson 2020-06-18 2012 netif_device_attach(lif->netdev);
b59eabd23ee53e8 Shannon Nelson 2020-06-18 2013 }
0925e9db4dc86da Shannon Nelson 2020-07-20 2014 mutex_unlock(&lif->queue_lock);
beead698b1736df Shannon Nelson 2019-09-03 2015
beead698b1736df Shannon Nelson 2019-09-03 2016 return err;
beead698b1736df Shannon Nelson 2019-09-03 2017 }
beead698b1736df Shannon Nelson 2019-09-03 2018
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
sound/soc/soc-pcm.c:2047:7: warning: Local variable i shadows outer variable
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Shreyas NC <shreyas.nc(a)intel.com>
CC: Mark Brown <broonie(a)kernel.org>
CC: "Pierre-Louis Bossart" <pierre-louis.bossart(a)linux.intel.com>
CC: Bard Liao <yung-chuan.liao(a)linux.intel.com>
CC: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
CC: Vinod Koul <vkoul(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6ba1b005ffc388c2aeaddae20da29e4810dea298
commit: 19bdcc7aeed4169820be6a683c422fc06d030136 ASoC: Add multiple CPU DAI support for PCM ops
date: 5 months ago
:::::: branch date: 15 hours ago
:::::: commit date: 5 months ago
compiler: nds32le-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> sound/soc/soc-pcm.c:2047:7: warning: Local variable i shadows outer variable [shadowVar]
int i;
^
sound/soc/soc-pcm.c:2024:6: note: Shadowed declaration
int i;
^
sound/soc/soc-pcm.c:2047:7: note: Shadow variable
int i;
^
# 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 remote update linus
git checkout 19bdcc7aeed4169820be6a683c422fc06d030136
vim +2047 sound/soc/soc-pcm.c
ea9d0d771fcd32 Takashi Iwai 2014-11-04 2016
906c7d690c3b80 PC Liao 2015-12-11 2017 static int dpcm_apply_symmetry(struct snd_pcm_substream *fe_substream,
906c7d690c3b80 PC Liao 2015-12-11 2018 int stream)
906c7d690c3b80 PC Liao 2015-12-11 2019 {
906c7d690c3b80 PC Liao 2015-12-11 2020 struct snd_soc_dpcm *dpcm;
906c7d690c3b80 PC Liao 2015-12-11 2021 struct snd_soc_pcm_runtime *fe = fe_substream->private_data;
19bdcc7aeed416 Shreyas NC 2020-02-25 2022 struct snd_soc_dai *fe_cpu_dai;
906c7d690c3b80 PC Liao 2015-12-11 2023 int err;
19bdcc7aeed416 Shreyas NC 2020-02-25 2024 int i;
906c7d690c3b80 PC Liao 2015-12-11 2025
906c7d690c3b80 PC Liao 2015-12-11 2026 /* apply symmetry for FE */
906c7d690c3b80 PC Liao 2015-12-11 2027 if (soc_pcm_has_symmetry(fe_substream))
906c7d690c3b80 PC Liao 2015-12-11 2028 fe_substream->runtime->hw.info |= SNDRV_PCM_INFO_JOINT_DUPLEX;
906c7d690c3b80 PC Liao 2015-12-11 2029
19bdcc7aeed416 Shreyas NC 2020-02-25 2030 for_each_rtd_cpu_dai (fe, i, fe_cpu_dai) {
906c7d690c3b80 PC Liao 2015-12-11 2031 /* Symmetry only applies if we've got an active stream. */
906c7d690c3b80 PC Liao 2015-12-11 2032 if (fe_cpu_dai->active) {
906c7d690c3b80 PC Liao 2015-12-11 2033 err = soc_pcm_apply_symmetry(fe_substream, fe_cpu_dai);
906c7d690c3b80 PC Liao 2015-12-11 2034 if (err < 0)
906c7d690c3b80 PC Liao 2015-12-11 2035 return err;
906c7d690c3b80 PC Liao 2015-12-11 2036 }
19bdcc7aeed416 Shreyas NC 2020-02-25 2037 }
906c7d690c3b80 PC Liao 2015-12-11 2038
906c7d690c3b80 PC Liao 2015-12-11 2039 /* apply symmetry for BE */
8d6258a4dd2678 Kuninori Morimoto 2018-09-18 2040 for_each_dpcm_be(fe, stream, dpcm) {
906c7d690c3b80 PC Liao 2015-12-11 2041 struct snd_soc_pcm_runtime *be = dpcm->be;
906c7d690c3b80 PC Liao 2015-12-11 2042 struct snd_pcm_substream *be_substream =
906c7d690c3b80 PC Liao 2015-12-11 2043 snd_soc_dpcm_get_substream(be, stream);
6246f283d5e02a Jerome Brunet 2019-04-01 2044 struct snd_soc_pcm_runtime *rtd;
0b7990e38971da Kuninori Morimoto 2018-09-03 2045 struct snd_soc_dai *codec_dai;
19bdcc7aeed416 Shreyas NC 2020-02-25 2046 struct snd_soc_dai *cpu_dai;
906c7d690c3b80 PC Liao 2015-12-11 @2047 int i;
906c7d690c3b80 PC Liao 2015-12-11 2048
6246f283d5e02a Jerome Brunet 2019-04-01 2049 /* A backend may not have the requested substream */
6246f283d5e02a Jerome Brunet 2019-04-01 2050 if (!be_substream)
6246f283d5e02a Jerome Brunet 2019-04-01 2051 continue;
6246f283d5e02a Jerome Brunet 2019-04-01 2052
6246f283d5e02a Jerome Brunet 2019-04-01 2053 rtd = be_substream->private_data;
f11766143caa06 Jeeja KP 2016-09-06 2054 if (rtd->dai_link->be_hw_params_fixup)
f11766143caa06 Jeeja KP 2016-09-06 2055 continue;
f11766143caa06 Jeeja KP 2016-09-06 2056
906c7d690c3b80 PC Liao 2015-12-11 2057 if (soc_pcm_has_symmetry(be_substream))
906c7d690c3b80 PC Liao 2015-12-11 2058 be_substream->runtime->hw.info |= SNDRV_PCM_INFO_JOINT_DUPLEX;
906c7d690c3b80 PC Liao 2015-12-11 2059
906c7d690c3b80 PC Liao 2015-12-11 2060 /* Symmetry only applies if we've got an active stream. */
19bdcc7aeed416 Shreyas NC 2020-02-25 2061 for_each_rtd_cpu_dai(rtd, i, cpu_dai) {
19bdcc7aeed416 Shreyas NC 2020-02-25 2062 if (cpu_dai->active) {
99bcedbdebc57f Kai Chieh Chuang 2018-05-28 2063 err = soc_pcm_apply_symmetry(fe_substream,
19bdcc7aeed416 Shreyas NC 2020-02-25 2064 cpu_dai);
906c7d690c3b80 PC Liao 2015-12-11 2065 if (err < 0)
906c7d690c3b80 PC Liao 2015-12-11 2066 return err;
906c7d690c3b80 PC Liao 2015-12-11 2067 }
19bdcc7aeed416 Shreyas NC 2020-02-25 2068 }
906c7d690c3b80 PC Liao 2015-12-11 2069
0b7990e38971da Kuninori Morimoto 2018-09-03 2070 for_each_rtd_codec_dai(rtd, i, codec_dai) {
0b7990e38971da Kuninori Morimoto 2018-09-03 2071 if (codec_dai->active) {
99bcedbdebc57f Kai Chieh Chuang 2018-05-28 2072 err = soc_pcm_apply_symmetry(fe_substream,
0b7990e38971da Kuninori Morimoto 2018-09-03 2073 codec_dai);
906c7d690c3b80 PC Liao 2015-12-11 2074 if (err < 0)
906c7d690c3b80 PC Liao 2015-12-11 2075 return err;
906c7d690c3b80 PC Liao 2015-12-11 2076 }
906c7d690c3b80 PC Liao 2015-12-11 2077 }
906c7d690c3b80 PC Liao 2015-12-11 2078 }
906c7d690c3b80 PC Liao 2015-12-11 2079
906c7d690c3b80 PC Liao 2015-12-11 2080 return 0;
906c7d690c3b80 PC Liao 2015-12-11 2081 }
906c7d690c3b80 PC Liao 2015-12-11 2082
:::::: The code at line 2047 was first introduced by commit
:::::: 906c7d690c3b80e4321178c083db8c14afb56bf8 ASoC: dpcm: Apply symmetry for DPCM
:::::: TO: PC Liao <pc.liao(a)mediatek.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[linux-next:master 2712/12265] drivers/net/wireless/microchip/wilc1000/cfg80211.c:1096:9: warning: Identical condition 'ret', second condition is always false
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Ajay Singh <ajay.kathat(a)microchip.com>
CC: Kalle Valo <kvalo(a)codeaurora.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e8926783181347365c9f2a9f5b7c4220be6e3b45
commit: 5625f965d7644b4dc6a71d74021cfe093ad34eea [2712/12265] wilc1000: move wilc driver out of staging
:::::: branch date: 19 hours ago
:::::: commit date: 5 weeks ago
compiler: nds32le-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/net/wireless/microchip/wilc1000/cfg80211.c:1096:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]
return ret;
^
drivers/net/wireless/microchip/wilc1000/cfg80211.c:1081:6: note: first condition
if (ret)
^
drivers/net/wireless/microchip/wilc1000/cfg80211.c:1096:9: note: second condition
return ret;
^
>> drivers/net/wireless/microchip/wilc1000/cfg80211.c:844:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = wilc_hif_set_cfg(vif, &cfg_param_val);
^
drivers/net/wireless/microchip/wilc1000/cfg80211.c:787:0: note: Variable 'ret' is reassigned a value before the old one has been used.
int ret = -EINVAL;
^
drivers/net/wireless/microchip/wilc1000/cfg80211.c:844:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = wilc_hif_set_cfg(vif, &cfg_param_val);
^
drivers/net/wireless/microchip/wilc1000/cfg80211.c:1427:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = wilc_del_station(vif, mac);
^
drivers/net/wireless/microchip/wilc1000/cfg80211.c:1425:7: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = wilc_del_allstation(vif, info->sta_associated_bss);
^
drivers/net/wireless/microchip/wilc1000/cfg80211.c:1427:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = wilc_del_station(vif, mac);
^
>> drivers/net/wireless/microchip/wilc1000/cfg80211.c:953:29: warning: Local variable e shadows outer variable [shadowVar]
struct wilc_ch_list_elem *e;
^
drivers/net/wireless/microchip/wilc1000/cfg80211.c:930:26: note: Shadowed declaration
struct wilc_attr_entry *e;
^
drivers/net/wireless/microchip/wilc1000/cfg80211.c:953:29: note: Shadow variable
struct wilc_ch_list_elem *e;
^
--
>> drivers/net/wireless/microchip/wilc1000/netdev.c:703:20: warning: Local variable vif shadows outer variable [shadowVar]
struct wilc_vif *vif;
^
drivers/net/wireless/microchip/wilc1000/netdev.c:674:19: note: Shadowed declaration
struct wilc_vif *vif = netdev_priv(ndev);
^
drivers/net/wireless/microchip/wilc1000/netdev.c:703:20: note: Shadow variable
struct wilc_vif *vif;
^
--
>> drivers/net/wireless/microchip/wilc1000/sdio.c:901:7: warning: Local variable reg shadows outer variable [shadowVar]
u32 reg;
^
drivers/net/wireless/microchip/wilc1000/sdio.c:879:6: note: Shadowed declaration
u32 reg;
^
drivers/net/wireless/microchip/wilc1000/sdio.c:901:7: note: Shadow variable
u32 reg;
^
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout 5625f965d7644b4dc6a71d74021cfe093ad34eea
vim +/ret +1096 drivers/net/wireless/microchip/wilc1000/cfg80211.c
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 927
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 928 static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch)
0a0dac38d4060d drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-03-07 929 {
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 930 struct wilc_attr_entry *e;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 931 struct wilc_attr_ch_list *ch_list;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 932 struct wilc_attr_oper_ch *op_ch;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 933 u32 index = 0;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 934 u8 ch_list_idx = 0;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 935 u8 op_ch_idx = 0;
0a0dac38d4060d drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-03-07 936
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 937 if (sta_ch == WILC_INVALID_CHANNEL)
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 938 return;
0a0dac38d4060d drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-03-07 939
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 940 while (index + sizeof(*e) <= len) {
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 941 e = (struct wilc_attr_entry *)&buf[index];
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 942 if (e->attr_type == IEEE80211_P2P_ATTR_CHANNEL_LIST)
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 943 ch_list_idx = index;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 944 else if (e->attr_type == IEEE80211_P2P_ATTR_OPER_CHANNEL)
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 945 op_ch_idx = index;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 946 if (ch_list_idx && op_ch_idx)
0a0dac38d4060d drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-03-07 947 break;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 948 index += le16_to_cpu(e->attr_len) + sizeof(*e);
0a0dac38d4060d drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-03-07 949 }
0a0dac38d4060d drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-03-07 950
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 951 if (ch_list_idx) {
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 952 u16 attr_size;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 @953 struct wilc_ch_list_elem *e;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 954 int i;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 955
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 956 ch_list = (struct wilc_attr_ch_list *)&buf[ch_list_idx];
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 957 attr_size = le16_to_cpu(ch_list->attr_len);
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 958 for (i = 0; i < attr_size;) {
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 959 e = (struct wilc_ch_list_elem *)(ch_list->elem + i);
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 960 if (e->op_class == WILC_WLAN_OPERATING_CLASS_2_4GHZ) {
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 961 memset(e->ch_list, sta_ch, e->no_of_channels);
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 962 break;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 963 }
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 964 i += e->no_of_channels;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 965 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 966 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 967
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 968 if (op_ch_idx) {
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 969 op_ch = (struct wilc_attr_oper_ch *)&buf[op_ch_idx];
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 970 op_ch->op_class = WILC_WLAN_OPERATING_CLASS_2_4GHZ;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 971 op_ch->op_channel = sta_ch;
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 972 }
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 973 }
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 974
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 975 void wilc_wfi_p2p_rx(struct wilc_vif *vif, u8 *buff, u32 size)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 976 {
0d0f0b06a13e44 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 977 struct wilc *wl = vif->wilc;
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 978 struct wilc_priv *priv = &vif->priv;
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 979 struct host_if_drv *wfi_drv = priv->hif_drv;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 980 struct ieee80211_mgmt *mgmt;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 981 struct wilc_vendor_specific_ie *p;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 982 struct wilc_p2p_pub_act_frame *d;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 983 int ie_offset = offsetof(struct ieee80211_mgmt, u) + sizeof(*d);
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 984 const u8 *vendor_ie;
4e4467fdd6e89f drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Chaehyun Lim 2015-06-11 985 u32 header, pkt_offset;
34db1aac17ff8f drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 986 s32 freq;
8dfaafd6398ec4 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Chaehyun Lim 2015-08-18 987
7a047abbb6ef8a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Chuhong Yuan 2019-07-25 988 header = get_unaligned_le32(buff - HOST_HDR_OFFSET);
38f193dff5cc8e drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-14 989 pkt_offset = FIELD_GET(WILC_PKT_HDR_OFFSET_FIELD, header);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 990
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 991 if (pkt_offset & IS_MANAGMEMENT_CALLBACK) {
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 992 bool ack = false;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 993 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)buff;
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 994
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 995 if (ieee80211_is_probe_resp(hdr->frame_control) ||
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 996 pkt_offset & IS_MGMT_STATUS_SUCCES)
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 997 ack = true;
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 998
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 999 cfg80211_mgmt_tx_status(&priv->wdev, priv->tx_cookie, buff,
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 1000 size, ack, GFP_KERNEL);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1001 return;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1002 }
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 1003
0d0f0b06a13e44 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1004 freq = ieee80211_channel_to_frequency(wl->op_ch, NL80211_BAND_2GHZ);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1005
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1006 mgmt = (struct ieee80211_mgmt *)buff;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1007 if (!ieee80211_is_action(mgmt->frame_control))
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1008 goto out_rx_mgmt;
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 1009
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 1010 if (priv->cfg_scanning &&
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 1011 time_after_eq(jiffies, (unsigned long)wfi_drv->p2p_timeout)) {
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 1012 netdev_dbg(vif->ndev, "Receiving action wrong ch\n");
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1013 return;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1014 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1015
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1016 if (!ieee80211_is_public_action((struct ieee80211_hdr *)buff, size))
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1017 goto out_rx_mgmt;
7868ee3b73e773 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-04-23 1018
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1019 d = (struct wilc_p2p_pub_act_frame *)(&mgmt->u.action);
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1020 if (d->oui_subtype != GO_NEG_REQ && d->oui_subtype != GO_NEG_RSP &&
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1021 d->oui_subtype != P2P_INV_REQ && d->oui_subtype != P2P_INV_RSP)
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1022 goto out_rx_mgmt;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1023
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1024 vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_WFA, WLAN_OUI_TYPE_WFA_P2P,
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1025 buff + ie_offset, size - ie_offset);
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1026 if (!vendor_ie)
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1027 goto out_rx_mgmt;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1028
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1029 p = (struct wilc_vendor_specific_ie *)vendor_ie;
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1030 wilc_wfi_cfg_parse_ch_attr(p->attr, p->tag_len - 4, vif->wilc->sta_ch);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1031
4fb8b5aa2a1126 drivers/staging/wilc1000/cfg80211.c Ajay Singh 2020-02-12 1032 out_rx_mgmt:
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 1033 cfg80211_rx_mgmt(&priv->wdev, freq, 0, buff, size, 0);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1034 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1035
8c9fee22470452 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-01-16 1036 static void wilc_wfi_mgmt_tx_complete(void *priv, int status)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1037 {
f5436edeedfbd1 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-07 1038 struct wilc_p2p_mgmt_data *pv_data = priv;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1039
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1040 kfree(pv_data->buff);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1041 kfree(pv_data);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1042 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1043
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1044 static void wilc_wfi_remain_on_channel_expired(void *data, u64 cookie)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1045 {
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 1046 struct wilc_vif *vif = data;
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 1047 struct wilc_priv *priv = &vif->priv;
4d03c3d51bbfe2 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-05-11 1048 struct wilc_wfi_p2p_listen_params *params = &priv->remain_on_ch_params;
8dfaafd6398ec4 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Chaehyun Lim 2015-08-18 1049
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1050 if (cookie != params->listen_cookie)
4d03c3d51bbfe2 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-05-11 1051 return;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1052
3b127bd9b7a3d9 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-01-16 1053 priv->p2p_listen_state = false;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1054
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 1055 cfg80211_remain_on_channel_expired(&priv->wdev, params->listen_cookie,
4d03c3d51bbfe2 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-05-11 1056 params->listen_ch, GFP_KERNEL);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1057 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1058
6d19d695e091c2 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Chaehyun Lim 2015-09-14 1059 static int remain_on_channel(struct wiphy *wiphy,
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1060 struct wireless_dev *wdev,
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1061 struct ieee80211_channel *chan,
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1062 unsigned int duration, u64 *cookie)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1063 {
82120ec7afc3d6 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-07-19 1064 int ret = 0;
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 1065 struct wilc_vif *vif = netdev_priv(wdev->netdev);
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 1066 struct wilc_priv *priv = &vif->priv;
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1067 u64 id;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1068
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1069 if (wdev->iftype == NL80211_IFTYPE_AP) {
e3f16965c9d473 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Chris Park 2016-02-04 1070 netdev_dbg(vif->ndev, "Required while in AP mode\n");
ffde26700840c7 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-01-16 1071 return ret;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1072 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1073
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1074 id = ++priv->inc_roc_cookie;
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1075 if (id == 0)
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1076 id = ++priv->inc_roc_cookie;
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1077
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1078 ret = wilc_remain_on_channel(vif, id, duration, chan->hw_value,
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1079 wilc_wfi_remain_on_channel_expired,
9bc061e8805487 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-06-26 1080 (void *)vif);
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1081 if (ret)
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1082 return ret;
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1083
0d0f0b06a13e44 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1084 vif->wilc->op_ch = chan->hw_value;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1085
3378860c12a0f0 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-01-16 1086 priv->remain_on_ch_params.listen_ch = chan;
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1087 priv->remain_on_ch_params.listen_cookie = id;
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1088 *cookie = id;
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1089 priv->p2p_listen_state = true;
3378860c12a0f0 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2018-01-16 1090 priv->remain_on_ch_params.listen_duration = duration;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1091
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1092 cfg80211_ready_on_channel(wdev, *cookie, chan, duration, GFP_KERNEL);
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1093 mod_timer(&vif->hif_drv->remain_on_ch_timer,
3a4cffe67f2fae drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-10-18 1094 jiffies + msecs_to_jiffies(duration + 1000));
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 1095
b6c6cd11c7a633 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Ajay Singh 2019-02-05 @1096 return ret;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1097 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wfi_cfgoperations.c Johnny Kim 2015-05-11 1098
:::::: The code at line 1096 was first introduced by commit
:::::: b6c6cd11c7a633a1194fd23f07322579da79d4ee staging: wilc1000: refactor code to use cookie information
:::::: TO: Ajay Singh <ajay.kathat(a)microchip.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5467 rtl8xxxu_c2hcmd_callback() warn: potential spectre issue 'rtl8xxxu_legacy_ratetable' (local cap)
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Chris Chiu <chiu(a)endlessm.com>
CC: Kalle Valo <kvalo(a)codeaurora.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6ba1b005ffc388c2aeaddae20da29e4810dea298
commit: 0985d3a410ace005ce62666b67c9372dfc14bd7f rtl8xxxu: Feed current txrate information for mac80211
date: 4 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 4 months ago
config: ia64-randconfig-m031-20200728 (attached as .config)
compiler: ia64-linux-gcc (GCC) 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/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5467 rtl8xxxu_c2hcmd_callback() warn: potential spectre issue 'rtl8xxxu_legacy_ratetable' [r] (local cap)
# 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 remote update linus
git checkout 0985d3a410ace005ce62666b67c9372dfc14bd7f
vim +/rtl8xxxu_legacy_ratetable +5467 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
0985d3a410ace0 Chris Chiu 2020-03-20 5420
e542e66b7c2ee2 Chris Chiu 2019-10-05 5421 static void rtl8xxxu_c2hcmd_callback(struct work_struct *work)
e542e66b7c2ee2 Chris Chiu 2019-10-05 5422 {
e542e66b7c2ee2 Chris Chiu 2019-10-05 5423 struct rtl8xxxu_priv *priv;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5424 struct rtl8723bu_c2h *c2h;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5425 struct sk_buff *skb = NULL;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5426 unsigned long flags;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5427 u8 bt_info = 0;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5428 struct rtl8xxxu_btcoex *btcoex;
0985d3a410ace0 Chris Chiu 2020-03-20 5429 struct rtl8xxxu_ra_report *rarpt;
0985d3a410ace0 Chris Chiu 2020-03-20 5430 u8 rate, sgi, bw;
0985d3a410ace0 Chris Chiu 2020-03-20 5431 u32 bit_rate;
0985d3a410ace0 Chris Chiu 2020-03-20 5432 u8 mcs = 0, nss = 0;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5433
e542e66b7c2ee2 Chris Chiu 2019-10-05 5434 priv = container_of(work, struct rtl8xxxu_priv, c2hcmd_work);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5435 btcoex = &priv->bt_coex;
0985d3a410ace0 Chris Chiu 2020-03-20 5436 rarpt = &priv->ra_report;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5437
e542e66b7c2ee2 Chris Chiu 2019-10-05 5438 if (priv->rf_paths > 1)
e542e66b7c2ee2 Chris Chiu 2019-10-05 5439 goto out;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5440
e542e66b7c2ee2 Chris Chiu 2019-10-05 5441 while (!skb_queue_empty(&priv->c2hcmd_queue)) {
e542e66b7c2ee2 Chris Chiu 2019-10-05 5442 spin_lock_irqsave(&priv->c2hcmd_lock, flags);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5443 skb = __skb_dequeue(&priv->c2hcmd_queue);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5444 spin_unlock_irqrestore(&priv->c2hcmd_lock, flags);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5445
e542e66b7c2ee2 Chris Chiu 2019-10-05 5446 c2h = (struct rtl8723bu_c2h *)skb->data;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5447
e542e66b7c2ee2 Chris Chiu 2019-10-05 5448 switch (c2h->id) {
e542e66b7c2ee2 Chris Chiu 2019-10-05 5449 case C2H_8723B_BT_INFO:
e542e66b7c2ee2 Chris Chiu 2019-10-05 5450 bt_info = c2h->bt_info.bt_info;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5451
e542e66b7c2ee2 Chris Chiu 2019-10-05 5452 rtl8723bu_update_bt_link_info(priv, bt_info);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5453 if (btcoex->c2h_bt_inquiry) {
e542e66b7c2ee2 Chris Chiu 2019-10-05 5454 rtl8723bu_handle_bt_inquiry(priv);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5455 break;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5456 }
e542e66b7c2ee2 Chris Chiu 2019-10-05 5457 rtl8723bu_handle_bt_info(priv);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5458 break;
0985d3a410ace0 Chris Chiu 2020-03-20 5459 case C2H_8723B_RA_REPORT:
0985d3a410ace0 Chris Chiu 2020-03-20 5460 rarpt->txrate.flags = 0;
0985d3a410ace0 Chris Chiu 2020-03-20 5461 rate = c2h->ra_report.rate;
0985d3a410ace0 Chris Chiu 2020-03-20 5462 sgi = c2h->ra_report.sgi;
0985d3a410ace0 Chris Chiu 2020-03-20 5463 bw = c2h->ra_report.bw;
0985d3a410ace0 Chris Chiu 2020-03-20 5464
0985d3a410ace0 Chris Chiu 2020-03-20 5465 if (rate < DESC_RATE_MCS0) {
0985d3a410ace0 Chris Chiu 2020-03-20 5466 rarpt->txrate.legacy =
0985d3a410ace0 Chris Chiu 2020-03-20 @5467 rtl8xxxu_legacy_ratetable[rate].bitrate;
0985d3a410ace0 Chris Chiu 2020-03-20 5468 } else {
0985d3a410ace0 Chris Chiu 2020-03-20 5469 rtl8xxxu_desc_to_mcsrate(rate, &mcs, &nss);
0985d3a410ace0 Chris Chiu 2020-03-20 5470 rarpt->txrate.flags |= RATE_INFO_FLAGS_MCS;
0985d3a410ace0 Chris Chiu 2020-03-20 5471
0985d3a410ace0 Chris Chiu 2020-03-20 5472 rarpt->txrate.mcs = mcs;
0985d3a410ace0 Chris Chiu 2020-03-20 5473 rarpt->txrate.nss = nss;
0985d3a410ace0 Chris Chiu 2020-03-20 5474
0985d3a410ace0 Chris Chiu 2020-03-20 5475 if (sgi) {
0985d3a410ace0 Chris Chiu 2020-03-20 5476 rarpt->txrate.flags |=
0985d3a410ace0 Chris Chiu 2020-03-20 5477 RATE_INFO_FLAGS_SHORT_GI;
0985d3a410ace0 Chris Chiu 2020-03-20 5478 }
0985d3a410ace0 Chris Chiu 2020-03-20 5479
0985d3a410ace0 Chris Chiu 2020-03-20 5480 if (bw == RATE_INFO_BW_20)
0985d3a410ace0 Chris Chiu 2020-03-20 5481 rarpt->txrate.bw |= RATE_INFO_BW_20;
0985d3a410ace0 Chris Chiu 2020-03-20 5482 }
0985d3a410ace0 Chris Chiu 2020-03-20 5483 bit_rate = cfg80211_calculate_bitrate(&rarpt->txrate);
0985d3a410ace0 Chris Chiu 2020-03-20 5484 rarpt->bit_rate = bit_rate;
0985d3a410ace0 Chris Chiu 2020-03-20 5485 rarpt->desc_rate = rate;
0985d3a410ace0 Chris Chiu 2020-03-20 5486 break;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5487 default:
e542e66b7c2ee2 Chris Chiu 2019-10-05 5488 break;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5489 }
e542e66b7c2ee2 Chris Chiu 2019-10-05 5490 }
e542e66b7c2ee2 Chris Chiu 2019-10-05 5491
e542e66b7c2ee2 Chris Chiu 2019-10-05 5492 out:
e542e66b7c2ee2 Chris Chiu 2019-10-05 5493 dev_kfree_skb(skb);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5494 }
e542e66b7c2ee2 Chris Chiu 2019-10-05 5495
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[vhost:vhost 38/45] include/linux/vdpa.h:43:28: sparse: sparse: expected ; at end of declaration
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: kvm(a)vger.kernel.org
CC: virtualization(a)lists.linux-foundation.org
CC: netdev(a)vger.kernel.org
TO: "Michael S. Tsirkin" <mst(a)redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head: 84d40e4b4bc64456abf5ef5663871053b40e84ac
commit: fee8fe6bd8ccacd27e963b71b4f943be3721779e [38/45] vdpa: make sure set_features in invoked for legacy
:::::: branch date: 5 hours ago
:::::: commit date: 6 hours ago
config: x86_64-randconfig-s021-20200727 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-94-geb6779f6-dirty
git checkout fee8fe6bd8ccacd27e963b71b4f943be3721779e
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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/vdpa/vdpa.c: note: in included file:
>> include/linux/vdpa.h:43:28: sparse: sparse: expected ; at end of declaration
include/linux/vdpa.h:43:28: sparse: sparse: Expected } at end of struct-union-enum-specifier
include/linux/vdpa.h:43:28: sparse: sparse: got .
--
drivers/vdpa/ifcvf/ifcvf_main.c: note: in included file (through drivers/vdpa/ifcvf/ifcvf_base.h):
>> include/linux/vdpa.h:43:28: sparse: sparse: expected ; at end of declaration
include/linux/vdpa.h:43:28: sparse: sparse: Expected } at end of struct-union-enum-specifier
include/linux/vdpa.h:43:28: sparse: sparse: got .
--
drivers/vdpa/ifcvf/ifcvf_base.c: note: in included file (through drivers/vdpa/ifcvf/ifcvf_base.h):
>> include/linux/vdpa.h:43:28: sparse: sparse: expected ; at end of declaration
include/linux/vdpa.h:43:28: sparse: sparse: Expected } at end of struct-union-enum-specifier
include/linux/vdpa.h:43:28: sparse: sparse: got .
# https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git/commit/?id=...
git remote add vhost https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
git remote update vhost
git checkout fee8fe6bd8ccacd27e963b71b4f943be3721779e
vim +43 include/linux/vdpa.h
c25a26e653a61b Jason Wang 2020-05-29 29
961e9c84077f6c Jason Wang 2020-03-26 30 /**
961e9c84077f6c Jason Wang 2020-03-26 31 * vDPA device - representation of a vDPA device
961e9c84077f6c Jason Wang 2020-03-26 32 * @dev: underlying device
961e9c84077f6c Jason Wang 2020-03-26 33 * @dma_dev: the actual device that is performing DMA
961e9c84077f6c Jason Wang 2020-03-26 34 * @config: the configuration ops for this device.
961e9c84077f6c Jason Wang 2020-03-26 35 * @index: device index
fee8fe6bd8ccac Michael S. Tsirkin 2020-07-27 36 * @features_valid: were features initialized? for legacy guests
961e9c84077f6c Jason Wang 2020-03-26 37 */
961e9c84077f6c Jason Wang 2020-03-26 38 struct vdpa_device {
961e9c84077f6c Jason Wang 2020-03-26 39 struct device dev;
961e9c84077f6c Jason Wang 2020-03-26 40 struct device *dma_dev;
961e9c84077f6c Jason Wang 2020-03-26 41 const struct vdpa_config_ops *config;
961e9c84077f6c Jason Wang 2020-03-26 42 unsigned int index;
fee8fe6bd8ccac Michael S. Tsirkin 2020-07-27 @43 bool features_valid.
961e9c84077f6c Jason Wang 2020-03-26 44 };
961e9c84077f6c Jason Wang 2020-03-26 45
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years