Re: [Intel-gfx] [PATCH v1] drm/i915: Fix wrong CDCLK adjustment changes
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200526094852.6967-1-stanislav.lisovskiy(a)intel.com>
References: <20200526094852.6967-1-stanislav.lisovskiy(a)intel.com>
TO: Stanislav Lisovskiy <stanislav.lisovskiy(a)intel.com>
TO: intel-gfx(a)lists.freedesktop.org
CC: chris(a)chris-wilson.co.uk
Hi Stanislav,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on drm-intel/drm-intel-next-queued]
[cannot apply to drm-intel/for-linux-next v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Stanislav-Lisovskiy/drm-i915-Fix...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: i386-randconfig-m021-20200531 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/gpu/drm/i915/display/intel_bw.c:453 skl_bw_calc_min_cdclk() error: uninitialized symbol 'pipe'.
# https://github.com/0day-ci/linux/commit/21b0324886122a396687d977d67eb6ce3...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 21b0324886122a396687d977d67eb6ce3caf2b17
vim +/pipe +453 drivers/gpu/drm/i915/display/intel_bw.c
366b6200f76e0f Jani Nikula 2019-08-06 430
cd19154608610a Stanislav Lisovskiy 2020-05-20 431 int skl_bw_calc_min_cdclk(struct intel_atomic_state *state)
cd19154608610a Stanislav Lisovskiy 2020-05-20 432 {
cd19154608610a Stanislav Lisovskiy 2020-05-20 433 struct drm_i915_private *dev_priv = to_i915(state->base.dev);
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 434 struct intel_bw_state *new_bw_state = NULL;
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 435 struct intel_bw_state *old_bw_state = NULL;
cd19154608610a Stanislav Lisovskiy 2020-05-20 436 const struct intel_crtc_state *crtc_state;
cd19154608610a Stanislav Lisovskiy 2020-05-20 437 struct intel_crtc *crtc;
cd19154608610a Stanislav Lisovskiy 2020-05-20 438 int max_bw = 0;
cd19154608610a Stanislav Lisovskiy 2020-05-20 439 int slice_id;
21b0324886122a Stanislav Lisovskiy 2020-05-26 440 enum pipe pipe;
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 441 int i;
cd19154608610a Stanislav Lisovskiy 2020-05-20 442
cd19154608610a Stanislav Lisovskiy 2020-05-20 443 for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
cd19154608610a Stanislav Lisovskiy 2020-05-20 444 enum plane_id plane_id;
cd19154608610a Stanislav Lisovskiy 2020-05-20 445 struct intel_dbuf_bw *crtc_bw;
cd19154608610a Stanislav Lisovskiy 2020-05-20 446
cd19154608610a Stanislav Lisovskiy 2020-05-20 447 new_bw_state = intel_atomic_get_bw_state(state);
cd19154608610a Stanislav Lisovskiy 2020-05-20 448 if (IS_ERR(new_bw_state))
cd19154608610a Stanislav Lisovskiy 2020-05-20 449 return PTR_ERR(new_bw_state);
cd19154608610a Stanislav Lisovskiy 2020-05-20 450
21b0324886122a Stanislav Lisovskiy 2020-05-26 451 old_bw_state = intel_atomic_get_old_bw_state(state);
21b0324886122a Stanislav Lisovskiy 2020-05-26 452
21b0324886122a Stanislav Lisovskiy 2020-05-26 @453 crtc_bw = &new_bw_state->dbuf_bw[pipe];
cd19154608610a Stanislav Lisovskiy 2020-05-20 454
cd19154608610a Stanislav Lisovskiy 2020-05-20 455 memset(&crtc_bw->used_bw, 0, sizeof(crtc_bw->used_bw));
cd19154608610a Stanislav Lisovskiy 2020-05-20 456
cd19154608610a Stanislav Lisovskiy 2020-05-20 457 for_each_plane_id_on_crtc(crtc, plane_id) {
cd19154608610a Stanislav Lisovskiy 2020-05-20 458 const struct skl_ddb_entry *plane_alloc =
cd19154608610a Stanislav Lisovskiy 2020-05-20 459 &crtc_state->wm.skl.plane_ddb_y[plane_id];
cd19154608610a Stanislav Lisovskiy 2020-05-20 460 const struct skl_ddb_entry *uv_plane_alloc =
cd19154608610a Stanislav Lisovskiy 2020-05-20 461 &crtc_state->wm.skl.plane_ddb_uv[plane_id];
cd19154608610a Stanislav Lisovskiy 2020-05-20 462 unsigned int data_rate = crtc_state->data_rate[plane_id];
cd19154608610a Stanislav Lisovskiy 2020-05-20 463 unsigned int dbuf_mask = 0;
cd19154608610a Stanislav Lisovskiy 2020-05-20 464
cd19154608610a Stanislav Lisovskiy 2020-05-20 465 dbuf_mask |= skl_ddb_dbuf_slice_mask(dev_priv, plane_alloc);
cd19154608610a Stanislav Lisovskiy 2020-05-20 466 dbuf_mask |= skl_ddb_dbuf_slice_mask(dev_priv, uv_plane_alloc);
cd19154608610a Stanislav Lisovskiy 2020-05-20 467
cd19154608610a Stanislav Lisovskiy 2020-05-20 468 /*
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 469 * FIXME: To calculate that more properly we probably
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 470 * need to to split per plane data_rate into data_rate_y
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 471 * and data_rate_uv for multiplanar formats in order not
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 472 * to get accounted those twice if they happen to reside
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 473 * on different slices.
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 474 * However for pre-icl this would work anyway because
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 475 * we have only single slice and for icl+ uv plane has
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 476 * non-zero data rate.
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 477 * So in worst case those calculation are a bit
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 478 * pessimistic, which shouldn't pose any significant
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 479 * problem anyway.
cd19154608610a Stanislav Lisovskiy 2020-05-20 480 */
cd19154608610a Stanislav Lisovskiy 2020-05-20 481 for_each_dbuf_slice_in_mask(slice_id, dbuf_mask)
cd19154608610a Stanislav Lisovskiy 2020-05-20 482 crtc_bw->used_bw[slice_id] += data_rate;
cd19154608610a Stanislav Lisovskiy 2020-05-20 483 }
21b0324886122a Stanislav Lisovskiy 2020-05-26 484 }
21b0324886122a Stanislav Lisovskiy 2020-05-26 485
21b0324886122a Stanislav Lisovskiy 2020-05-26 486 if (!old_bw_state)
21b0324886122a Stanislav Lisovskiy 2020-05-26 487 return 0;
21b0324886122a Stanislav Lisovskiy 2020-05-26 488
21b0324886122a Stanislav Lisovskiy 2020-05-26 489 for_each_pipe(dev_priv, pipe) {
21b0324886122a Stanislav Lisovskiy 2020-05-26 490 struct intel_dbuf_bw *crtc_bw;
21b0324886122a Stanislav Lisovskiy 2020-05-26 491
21b0324886122a Stanislav Lisovskiy 2020-05-26 492 crtc_bw = &new_bw_state->dbuf_bw[pipe];
cd19154608610a Stanislav Lisovskiy 2020-05-20 493
cd19154608610a Stanislav Lisovskiy 2020-05-20 494 for_each_dbuf_slice(slice_id) {
cd19154608610a Stanislav Lisovskiy 2020-05-20 495 /*
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 496 * Current experimental observations show that contrary
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 497 * to BSpec we get underruns once we exceed 64 * CDCLK
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 498 * for slices in total.
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 499 * As a temporary measure in order not to keep CDCLK
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 500 * bumped up all the time we calculate CDCLK according
cac91e671ad5dc Stanislav Lisovskiy 2020-05-22 501 * to this formula for overall bw consumed by slices.
cd19154608610a Stanislav Lisovskiy 2020-05-20 502 */
cd19154608610a Stanislav Lisovskiy 2020-05-20 503 max_bw += crtc_bw->used_bw[slice_id];
cd19154608610a Stanislav Lisovskiy 2020-05-20 504 }
cd19154608610a Stanislav Lisovskiy 2020-05-20 505 }
cd19154608610a Stanislav Lisovskiy 2020-05-20 506
21b0324886122a Stanislav Lisovskiy 2020-05-26 507 new_bw_state->min_cdclk = max_bw / 64;
cd19154608610a Stanislav Lisovskiy 2020-05-20 508
cd19154608610a Stanislav Lisovskiy 2020-05-20 509 if (new_bw_state->min_cdclk != old_bw_state->min_cdclk) {
cd19154608610a Stanislav Lisovskiy 2020-05-20 510 int ret = intel_atomic_lock_global_state(&new_bw_state->base);
cd19154608610a Stanislav Lisovskiy 2020-05-20 511
cd19154608610a Stanislav Lisovskiy 2020-05-20 512 if (ret)
cd19154608610a Stanislav Lisovskiy 2020-05-20 513 return ret;
cd19154608610a Stanislav Lisovskiy 2020-05-20 514 }
cd19154608610a Stanislav Lisovskiy 2020-05-20 515
cd19154608610a Stanislav Lisovskiy 2020-05-20 516 return 0;
cd19154608610a Stanislav Lisovskiy 2020-05-20 517 }
cd19154608610a Stanislav Lisovskiy 2020-05-20 518
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
drivers/infiniband/core/cm.c:882:19-29: ERROR: function cm_finalize_id called on line 2136 inside lock on line 2135 but uses GFP_KERNEL
by kbuild test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Jason, Gunthorpe," <jgg(a)mellanox.com>
CC: Leon Romanovsky <leonro(a)mellanox.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bdc48fa11e46f867ea4d75fa59ee87a7f48be144
commit: c206f8bad15d30f1e35821c21a2fb146e4668ebf RDMA/cm: Make it clearer how concurrency works in cm_req_handler()
date: 3 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 3 months ago
config: arc-randconfig-c021-20200531 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/infiniband/core/cm.c:882:19-29: ERROR: function cm_finalize_id called on line 2136 inside lock on line 2135 but uses GFP_KERNEL
# 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 c206f8bad15d30f1e35821c21a2fb146e4668ebf
vim +882 drivers/infiniband/core/cm.c
98f67156a80f37 Jason Gunthorpe 2020-03-10 874
98f67156a80f37 Jason Gunthorpe 2020-03-10 875 /*
98f67156a80f37 Jason Gunthorpe 2020-03-10 876 * Make the ID visible to the MAD handlers and other threads that use the
98f67156a80f37 Jason Gunthorpe 2020-03-10 877 * xarray.
98f67156a80f37 Jason Gunthorpe 2020-03-10 878 */
98f67156a80f37 Jason Gunthorpe 2020-03-10 879 static void cm_finalize_id(struct cm_id_private *cm_id_priv)
98f67156a80f37 Jason Gunthorpe 2020-03-10 880 {
98f67156a80f37 Jason Gunthorpe 2020-03-10 881 xa_store_irq(&cm.local_id_table, cm_local_id(cm_id_priv->id.local_id),
98f67156a80f37 Jason Gunthorpe 2020-03-10 @882 cm_id_priv, GFP_KERNEL);
98f67156a80f37 Jason Gunthorpe 2020-03-10 883 }
98f67156a80f37 Jason Gunthorpe 2020-03-10 884
:::::: The code at line 882 was first introduced by commit
:::::: 98f67156a80f37db70ec64787020b1f9bc8aea8c RDMA/cm: Simplify establishing a listen cm_id
:::::: TO: Jason Gunthorpe <jgg(a)mellanox.com>
:::::: CC: Jason Gunthorpe <jgg(a)mellanox.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH 1/4] scsi: convert target lookup to xarray
by Dan Carpenter
Hi Hannes,
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-use-xarray-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-m001-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/scsi/scsi_scan.c:482 scsi_alloc_target() warn: inconsistent returns '*shost->host_lock'.
drivers/scsi/scsi_scan.c:482 scsi_alloc_target() warn: inconsistent returns 'flags'.
# https://github.com/0day-ci/linux/commit/45b149b239ea9a86968ddbd8ecda1e6c4...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 45b149b239ea9a86968ddbd8ecda1e6c44937b68
vim +482 drivers/scsi/scsi_scan.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 392 static struct scsi_target *scsi_alloc_target(struct device *parent,
^1da177e4c3f41 Linus Torvalds 2005-04-16 393 int channel, uint id)
^1da177e4c3f41 Linus Torvalds 2005-04-16 394 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 395 struct Scsi_Host *shost = dev_to_shost(parent);
^1da177e4c3f41 Linus Torvalds 2005-04-16 396 struct device *dev = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 397 unsigned long flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 398 const int size = sizeof(struct scsi_target)
^1da177e4c3f41 Linus Torvalds 2005-04-16 399 + shost->transportt->target_size;
5c44cd2afad3f7 James.Smart(a)Emulex.Com 2005-06-10 400 struct scsi_target *starget;
^1da177e4c3f41 Linus Torvalds 2005-04-16 401 struct scsi_target *found_target;
e63ed0d7a98014 James Bottomley 2014-01-21 402 int error, ref_got;
45b149b239ea9a Hannes Reinecke 2020-05-27 403 unsigned long tid;
^1da177e4c3f41 Linus Torvalds 2005-04-16 404
24669f75a3231f Jes Sorensen 2006-01-16 405 starget = kzalloc(size, GFP_KERNEL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 406 if (!starget) {
cadbd4a5e36dde Harvey Harrison 2008-07-03 407 printk(KERN_ERR "%s: allocation failure\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 408 return NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 409 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 410 dev = &starget->dev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 411 device_initialize(dev);
e63ed0d7a98014 James Bottomley 2014-01-21 412 kref_init(&starget->reap_ref);
^1da177e4c3f41 Linus Torvalds 2005-04-16 413 dev->parent = get_device(parent);
71610f55fa4db6 Kay Sievers 2008-12-03 414 dev_set_name(dev, "target%d:%d:%d", shost->host_no, channel, id);
b0ed43360fdca2 Hannes Reinecke 2008-03-18 415 dev->bus = &scsi_bus_type;
b0ed43360fdca2 Hannes Reinecke 2008-03-18 416 dev->type = &scsi_target_type;
^1da177e4c3f41 Linus Torvalds 2005-04-16 417 starget->id = id;
^1da177e4c3f41 Linus Torvalds 2005-04-16 418 starget->channel = channel;
f0c0a376d0fcd4 Mike Christie 2008-08-17 419 starget->can_queue = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 420 INIT_LIST_HEAD(&starget->devices);
643eb2d932c97a James Bottomley 2008-03-22 421 starget->state = STARGET_CREATED;
7c9d6f16f50d3a Alan Stern 2007-01-08 422 starget->scsi_level = SCSI_2;
c53a284f8be237 Edward Goggin 2009-04-09 423 starget->max_target_blocked = SCSI_DEFAULT_TARGET_BLOCKED;
45b149b239ea9a Hannes Reinecke 2020-05-27 424 tid = scsi_target_index(starget);
ffedb4522571ac James Bottomley 2006-02-23 425 retry:
^1da177e4c3f41 Linus Torvalds 2005-04-16 426 spin_lock_irqsave(shost->host_lock, flags);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^1da177e4c3f41 Linus Torvalds 2005-04-16 427
45b149b239ea9a Hannes Reinecke 2020-05-27 428 found_target = xa_load(&shost->__targets, tid);
^1da177e4c3f41 Linus Torvalds 2005-04-16 429 if (found_target)
^1da177e4c3f41 Linus Torvalds 2005-04-16 430 goto found;
45b149b239ea9a Hannes Reinecke 2020-05-27 431 if (xa_insert(&shost->__targets, tid, starget, GFP_KERNEL)) {
45b149b239ea9a Hannes Reinecke 2020-05-27 432 dev_printk(KERN_ERR, dev, "target index busy\n");
45b149b239ea9a Hannes Reinecke 2020-05-27 433 kfree(starget);
45b149b239ea9a Hannes Reinecke 2020-05-27 434 return NULL;
^^^^^^^^^^^
Need to drop the lock.
45b149b239ea9a Hannes Reinecke 2020-05-27 435 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 436 spin_unlock_irqrestore(shost->host_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 437 /* allocate and add */
a283bd37d00e92 James Bottomley 2005-05-24 438 transport_setup_device(dev);
a283bd37d00e92 James Bottomley 2005-05-24 439 if (shost->hostt->target_alloc) {
32f95792500794 Brian King 2006-02-22 440 error = shost->hostt->target_alloc(starget);
a283bd37d00e92 James Bottomley 2005-05-24 441
a283bd37d00e92 James Bottomley 2005-05-24 442 if(error) {
a283bd37d00e92 James Bottomley 2005-05-24 443 dev_printk(KERN_ERR, dev, "target allocation failed, error %d\n", error);
a283bd37d00e92 James Bottomley 2005-05-24 444 /* don't want scsi_target_reap to do the final
a283bd37d00e92 James Bottomley 2005-05-24 445 * put because it will be under the host lock */
643eb2d932c97a James Bottomley 2008-03-22 446 scsi_target_destroy(starget);
a283bd37d00e92 James Bottomley 2005-05-24 447 return NULL;
a283bd37d00e92 James Bottomley 2005-05-24 448 }
a283bd37d00e92 James Bottomley 2005-05-24 449 }
884d25cc4fda20 James Bottomley 2006-09-05 450 get_device(dev);
a283bd37d00e92 James Bottomley 2005-05-24 451
^1da177e4c3f41 Linus Torvalds 2005-04-16 452 return starget;
^1da177e4c3f41 Linus Torvalds 2005-04-16 453
^1da177e4c3f41 Linus Torvalds 2005-04-16 454 found:
e63ed0d7a98014 James Bottomley 2014-01-21 455 /*
e63ed0d7a98014 James Bottomley 2014-01-21 456 * release routine already fired if kref is zero, so if we can still
e63ed0d7a98014 James Bottomley 2014-01-21 457 * take the reference, the target must be alive. If we can't, it must
e63ed0d7a98014 James Bottomley 2014-01-21 458 * be dying and we need to wait for a new target
e63ed0d7a98014 James Bottomley 2014-01-21 459 */
e63ed0d7a98014 James Bottomley 2014-01-21 460 ref_got = kref_get_unless_zero(&found_target->reap_ref);
e63ed0d7a98014 James Bottomley 2014-01-21 461
^1da177e4c3f41 Linus Torvalds 2005-04-16 462 spin_unlock_irqrestore(shost->host_lock, flags);
e63ed0d7a98014 James Bottomley 2014-01-21 463 if (ref_got) {
12fb8c1574d7d0 Alan Stern 2010-03-18 464 put_device(dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 465 return found_target;
^1da177e4c3f41 Linus Torvalds 2005-04-16 466 }
e63ed0d7a98014 James Bottomley 2014-01-21 467 /*
e63ed0d7a98014 James Bottomley 2014-01-21 468 * Unfortunately, we found a dying target; need to wait until it's
e63ed0d7a98014 James Bottomley 2014-01-21 469 * dead before we can get a new one. There is an anomaly here. We
e63ed0d7a98014 James Bottomley 2014-01-21 470 * *should* call scsi_target_reap() to balance the kref_get() of the
e63ed0d7a98014 James Bottomley 2014-01-21 471 * reap_ref above. However, since the target being released, it's
e63ed0d7a98014 James Bottomley 2014-01-21 472 * already invisible and the reap_ref is irrelevant. If we call
e63ed0d7a98014 James Bottomley 2014-01-21 473 * scsi_target_reap() we might spuriously do another device_del() on
e63ed0d7a98014 James Bottomley 2014-01-21 474 * an already invisible target.
e63ed0d7a98014 James Bottomley 2014-01-21 475 */
ffedb4522571ac James Bottomley 2006-02-23 476 put_device(&found_target->dev);
e63ed0d7a98014 James Bottomley 2014-01-21 477 /*
e63ed0d7a98014 James Bottomley 2014-01-21 478 * length of time is irrelevant here, we just want to yield the CPU
e63ed0d7a98014 James Bottomley 2014-01-21 479 * for a tick to avoid busy waiting for the target to die.
e63ed0d7a98014 James Bottomley 2014-01-21 480 */
e63ed0d7a98014 James Bottomley 2014-01-21 481 msleep(1);
ffedb4522571ac James Bottomley 2006-02-23 @482 goto retry;
ffedb4522571ac James Bottomley 2006-02-23 483 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH v6] drm/ioctl: Add a ioctl to set and get a label on GEM objects
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200528170604.22476-1-rohan.garg(a)collabora.com>
References: <20200528170604.22476-1-rohan.garg(a)collabora.com>
TO: Rohan Garg <rohan.garg(a)collabora.com>
TO: dri-devel(a)lists.freedesktop.org
CC: kernel(a)collabora.com
CC: emil.l.velikov(a)gmail.com
Hi Rohan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-exynos/exynos-drm-next]
[also build test WARNING on drm-intel/for-linux-next tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Rohan-Garg/drm-ioctl-Add-a-ioctl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next
:::::: branch date: 16 hours ago
:::::: commit date: 16 hours ago
config: i386-randconfig-m021-20200531 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/gpu/drm/drm_gem.c:1004 drm_gem_get_label() warn: maybe return -EFAULT instead of the bytes remaining?
Old smatch warnings:
drivers/gpu/drm/drm_gem.c:910 drm_gem_open_ioctl() warn: inconsistent returns 'dev->object_name_lock'.
# https://github.com/0day-ci/linux/commit/174b10d2bdba06efe773aa0d09e682a57...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 174b10d2bdba06efe773aa0d09e682a57a00ec67
vim +1004 drivers/gpu/drm/drm_gem.c
174b10d2bdba06 Rohan Garg 2020-05-28 978
174b10d2bdba06 Rohan Garg 2020-05-28 979 int drm_gem_get_label(struct drm_device *dev, struct drm_file *file_priv,
174b10d2bdba06 Rohan Garg 2020-05-28 980 struct drm_handle_label *args)
174b10d2bdba06 Rohan Garg 2020-05-28 981 {
174b10d2bdba06 Rohan Garg 2020-05-28 982 struct drm_gem_object *gem_obj;
174b10d2bdba06 Rohan Garg 2020-05-28 983 int len, ret;
174b10d2bdba06 Rohan Garg 2020-05-28 984
174b10d2bdba06 Rohan Garg 2020-05-28 985 gem_obj = drm_gem_object_lookup(file_priv, args->handle);
174b10d2bdba06 Rohan Garg 2020-05-28 986 if (!gem_obj) {
174b10d2bdba06 Rohan Garg 2020-05-28 987 DRM_DEBUG("Failed to look up GEM BO %d\n", args->handle);
174b10d2bdba06 Rohan Garg 2020-05-28 988 return -ENOENT;
174b10d2bdba06 Rohan Garg 2020-05-28 989 }
174b10d2bdba06 Rohan Garg 2020-05-28 990
174b10d2bdba06 Rohan Garg 2020-05-28 991 if (!gem_obj->label) {
174b10d2bdba06 Rohan Garg 2020-05-28 992 args->label = NULL;
174b10d2bdba06 Rohan Garg 2020-05-28 993 args->len = 0;
174b10d2bdba06 Rohan Garg 2020-05-28 994 return 0;
174b10d2bdba06 Rohan Garg 2020-05-28 995 }
174b10d2bdba06 Rohan Garg 2020-05-28 996
174b10d2bdba06 Rohan Garg 2020-05-28 997 mutex_lock(&gem_obj->bo_lock);
174b10d2bdba06 Rohan Garg 2020-05-28 998 len = strlen(gem_obj->label);
174b10d2bdba06 Rohan Garg 2020-05-28 999 ret = copy_to_user(u64_to_user_ptr(args->label), gem_obj->label,
174b10d2bdba06 Rohan Garg 2020-05-28 1000 min(args->len, len));
174b10d2bdba06 Rohan Garg 2020-05-28 1001 mutex_unlock(&gem_obj->bo_lock);
174b10d2bdba06 Rohan Garg 2020-05-28 1002 args->len = len;
174b10d2bdba06 Rohan Garg 2020-05-28 1003 drm_gem_object_put(gem_obj);
174b10d2bdba06 Rohan Garg 2020-05-28 @1004 return ret;
174b10d2bdba06 Rohan Garg 2020-05-28 1005 }
174b10d2bdba06 Rohan Garg 2020-05-28 1006 EXPORT_SYMBOL(drm_gem_get_label);
174b10d2bdba06 Rohan Garg 2020-05-28 1007
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH v4] drivers: most: add USB adapter driver
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <1590585268-25423-1-git-send-email-christian.gromm(a)microchip.com>
References: <1590585268-25423-1-git-send-email-christian.gromm(a)microchip.com>
TO: Christian Gromm <christian.gromm(a)microchip.com>
TO: gregkh(a)linuxfoundation.org
CC: Christian Gromm <christian.gromm(a)microchip.com>
CC: driverdev-devel(a)linuxdriverproject.org
CC: linux-usb(a)vger.kernel.org
Hi Christian,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
[also build test WARNING on linus/master v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Christian-Gromm/drivers-most-add...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 36cf583eaff3458abbfac144c5e4d417a23fa1a1
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: x86_64-randconfig-m001-20200531 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/most/most_usb.c:220 get_stream_frame_size() error: uninitialized symbol 'frame_size'.
# https://github.com/0day-ci/linux/commit/0ea547bd5c23af58b60f907ee741a02bb...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 0ea547bd5c23af58b60f907ee741a02bb1488a4e
vim +/frame_size +220 drivers/most/most_usb.c
0ea547bd5c23af Christian Gromm 2020-05-27 186
0ea547bd5c23af Christian Gromm 2020-05-27 187 /**
0ea547bd5c23af Christian Gromm 2020-05-27 188 * get_stream_frame_size - calculate frame size of current configuration
0ea547bd5c23af Christian Gromm 2020-05-27 189 * @dev: device structure
0ea547bd5c23af Christian Gromm 2020-05-27 190 * @cfg: channel configuration
0ea547bd5c23af Christian Gromm 2020-05-27 191 */
0ea547bd5c23af Christian Gromm 2020-05-27 192 static unsigned int get_stream_frame_size(struct device *dev,
0ea547bd5c23af Christian Gromm 2020-05-27 193 struct most_channel_config *cfg)
0ea547bd5c23af Christian Gromm 2020-05-27 194 {
0ea547bd5c23af Christian Gromm 2020-05-27 195 unsigned int frame_size;
0ea547bd5c23af Christian Gromm 2020-05-27 196 unsigned int sub_size = cfg->subbuffer_size;
0ea547bd5c23af Christian Gromm 2020-05-27 197
0ea547bd5c23af Christian Gromm 2020-05-27 198 if (!sub_size) {
0ea547bd5c23af Christian Gromm 2020-05-27 199 dev_warn(dev, "Misconfig: Subbuffer size zero.\n");
0ea547bd5c23af Christian Gromm 2020-05-27 200 return 0;
0ea547bd5c23af Christian Gromm 2020-05-27 201 }
0ea547bd5c23af Christian Gromm 2020-05-27 202 switch (cfg->data_type) {
0ea547bd5c23af Christian Gromm 2020-05-27 203 case MOST_CH_ISOC:
0ea547bd5c23af Christian Gromm 2020-05-27 204 frame_size = AV_PACKETS_PER_XACT * sub_size;
0ea547bd5c23af Christian Gromm 2020-05-27 205 break;
0ea547bd5c23af Christian Gromm 2020-05-27 206 case MOST_CH_SYNC:
0ea547bd5c23af Christian Gromm 2020-05-27 207 if (cfg->packets_per_xact == 0) {
0ea547bd5c23af Christian Gromm 2020-05-27 208 dev_warn(dev, "Misconfig: Packets per XACT zero\n");
0ea547bd5c23af Christian Gromm 2020-05-27 209 frame_size = 0;
0ea547bd5c23af Christian Gromm 2020-05-27 210 } else if (cfg->packets_per_xact == 0xFF) {
0ea547bd5c23af Christian Gromm 2020-05-27 211 frame_size = (USB_MTU / sub_size) * sub_size;
0ea547bd5c23af Christian Gromm 2020-05-27 212 } else {
0ea547bd5c23af Christian Gromm 2020-05-27 213 frame_size = cfg->packets_per_xact * sub_size;
0ea547bd5c23af Christian Gromm 2020-05-27 214 }
0ea547bd5c23af Christian Gromm 2020-05-27 215 break;
0ea547bd5c23af Christian Gromm 2020-05-27 216 default:
0ea547bd5c23af Christian Gromm 2020-05-27 217 dev_warn(dev, "Query frame size of non-streaming channel\n");
0ea547bd5c23af Christian Gromm 2020-05-27 218 break;
0ea547bd5c23af Christian Gromm 2020-05-27 219 }
0ea547bd5c23af Christian Gromm 2020-05-27 @220 return frame_size;
0ea547bd5c23af Christian Gromm 2020-05-27 221 }
0ea547bd5c23af Christian Gromm 2020-05-27 222
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[linux-next:master 11624/14131] drivers/leds/leds-aw2013.c:402 aw2013_probe() warn: inconsistent returns 'chip->mutex'.
by kbuild test robot
CC: kbuild-all(a)lists.01.org
TO: "Nikita, Travkin," <nikitos.tr(a)gmail.com>
CC: Pavel Machek <pavel(a)ucw.cz>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e7b08814b16b80a0bf76eeca16317f8c2ed23b8c
commit: 59ea3c9faf3235b66bc31ca883d59ce58b8b2b27 [11624/14131] leds: add aw2013 driver
:::::: branch date: 2 days ago
:::::: commit date: 6 days ago
config: arc-randconfig-m031-20200531 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/leds/leds-aw2013.c:402 aw2013_probe() warn: inconsistent returns 'chip->mutex'.
# 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 59ea3c9faf3235b66bc31ca883d59ce58b8b2b27
vim +402 drivers/leds/leds-aw2013.c
59ea3c9faf3235 Nikita Travkin 2020-05-11 327
59ea3c9faf3235 Nikita Travkin 2020-05-11 328 static int aw2013_probe(struct i2c_client *client)
59ea3c9faf3235 Nikita Travkin 2020-05-11 329 {
59ea3c9faf3235 Nikita Travkin 2020-05-11 330 struct aw2013 *chip;
59ea3c9faf3235 Nikita Travkin 2020-05-11 331 int ret;
59ea3c9faf3235 Nikita Travkin 2020-05-11 332 unsigned int chipid;
59ea3c9faf3235 Nikita Travkin 2020-05-11 333
59ea3c9faf3235 Nikita Travkin 2020-05-11 334 chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
59ea3c9faf3235 Nikita Travkin 2020-05-11 335 if (!chip)
59ea3c9faf3235 Nikita Travkin 2020-05-11 336 return -ENOMEM;
59ea3c9faf3235 Nikita Travkin 2020-05-11 337
59ea3c9faf3235 Nikita Travkin 2020-05-11 338 mutex_init(&chip->mutex);
59ea3c9faf3235 Nikita Travkin 2020-05-11 339 mutex_lock(&chip->mutex);
59ea3c9faf3235 Nikita Travkin 2020-05-11 340
59ea3c9faf3235 Nikita Travkin 2020-05-11 341 chip->client = client;
59ea3c9faf3235 Nikita Travkin 2020-05-11 342 i2c_set_clientdata(client, chip);
59ea3c9faf3235 Nikita Travkin 2020-05-11 343
59ea3c9faf3235 Nikita Travkin 2020-05-11 344 chip->regmap = devm_regmap_init_i2c(client, &aw2013_regmap_config);
59ea3c9faf3235 Nikita Travkin 2020-05-11 345 if (IS_ERR(chip->regmap)) {
59ea3c9faf3235 Nikita Travkin 2020-05-11 346 ret = PTR_ERR(chip->regmap);
59ea3c9faf3235 Nikita Travkin 2020-05-11 347 dev_err(&client->dev, "Failed to allocate register map: %d\n",
59ea3c9faf3235 Nikita Travkin 2020-05-11 348 ret);
59ea3c9faf3235 Nikita Travkin 2020-05-11 349 goto error;
59ea3c9faf3235 Nikita Travkin 2020-05-11 350 }
59ea3c9faf3235 Nikita Travkin 2020-05-11 351
59ea3c9faf3235 Nikita Travkin 2020-05-11 352 chip->vcc_regulator = devm_regulator_get(&client->dev, "vcc");
59ea3c9faf3235 Nikita Travkin 2020-05-11 353 ret = PTR_ERR_OR_ZERO(chip->vcc_regulator);
59ea3c9faf3235 Nikita Travkin 2020-05-11 354 if (ret) {
59ea3c9faf3235 Nikita Travkin 2020-05-11 355 if (ret != -EPROBE_DEFER)
59ea3c9faf3235 Nikita Travkin 2020-05-11 356 dev_err(&client->dev,
59ea3c9faf3235 Nikita Travkin 2020-05-11 357 "Failed to request regulator: %d\n", ret);
59ea3c9faf3235 Nikita Travkin 2020-05-11 358 goto error;
59ea3c9faf3235 Nikita Travkin 2020-05-11 359 }
59ea3c9faf3235 Nikita Travkin 2020-05-11 360
59ea3c9faf3235 Nikita Travkin 2020-05-11 361 ret = regulator_enable(chip->vcc_regulator);
59ea3c9faf3235 Nikita Travkin 2020-05-11 362 if (ret) {
59ea3c9faf3235 Nikita Travkin 2020-05-11 363 dev_err(&client->dev,
59ea3c9faf3235 Nikita Travkin 2020-05-11 364 "Failed to enable regulator: %d\n", ret);
59ea3c9faf3235 Nikita Travkin 2020-05-11 365 goto error;
59ea3c9faf3235 Nikita Travkin 2020-05-11 366 }
59ea3c9faf3235 Nikita Travkin 2020-05-11 367
59ea3c9faf3235 Nikita Travkin 2020-05-11 368 ret = regmap_read(chip->regmap, AW2013_RSTR, &chipid);
59ea3c9faf3235 Nikita Travkin 2020-05-11 369 if (ret) {
59ea3c9faf3235 Nikita Travkin 2020-05-11 370 dev_err(&client->dev, "Failed to read chip ID: %d\n",
59ea3c9faf3235 Nikita Travkin 2020-05-11 371 ret);
59ea3c9faf3235 Nikita Travkin 2020-05-11 372 goto error_reg;
59ea3c9faf3235 Nikita Travkin 2020-05-11 373 }
59ea3c9faf3235 Nikita Travkin 2020-05-11 374
59ea3c9faf3235 Nikita Travkin 2020-05-11 375 if (chipid != AW2013_RSTR_CHIP_ID) {
59ea3c9faf3235 Nikita Travkin 2020-05-11 376 dev_err(&client->dev, "Chip reported wrong ID: %x\n",
59ea3c9faf3235 Nikita Travkin 2020-05-11 377 chipid);
59ea3c9faf3235 Nikita Travkin 2020-05-11 378 ret = -ENODEV;
59ea3c9faf3235 Nikita Travkin 2020-05-11 379 goto error_reg;
59ea3c9faf3235 Nikita Travkin 2020-05-11 380 }
59ea3c9faf3235 Nikita Travkin 2020-05-11 381
59ea3c9faf3235 Nikita Travkin 2020-05-11 382 ret = aw2013_probe_dt(chip);
59ea3c9faf3235 Nikita Travkin 2020-05-11 383 if (ret < 0)
59ea3c9faf3235 Nikita Travkin 2020-05-11 384 goto error_reg;
59ea3c9faf3235 Nikita Travkin 2020-05-11 385
59ea3c9faf3235 Nikita Travkin 2020-05-11 386 ret = regulator_disable(chip->vcc_regulator);
59ea3c9faf3235 Nikita Travkin 2020-05-11 387 if (ret) {
59ea3c9faf3235 Nikita Travkin 2020-05-11 388 dev_err(&client->dev,
59ea3c9faf3235 Nikita Travkin 2020-05-11 389 "Failed to disable regulator: %d\n", ret);
59ea3c9faf3235 Nikita Travkin 2020-05-11 390 goto error;
59ea3c9faf3235 Nikita Travkin 2020-05-11 391 }
59ea3c9faf3235 Nikita Travkin 2020-05-11 392
59ea3c9faf3235 Nikita Travkin 2020-05-11 393 mutex_unlock(&chip->mutex);
59ea3c9faf3235 Nikita Travkin 2020-05-11 394
59ea3c9faf3235 Nikita Travkin 2020-05-11 395 return 0;
59ea3c9faf3235 Nikita Travkin 2020-05-11 396
59ea3c9faf3235 Nikita Travkin 2020-05-11 397 error_reg:
59ea3c9faf3235 Nikita Travkin 2020-05-11 398 regulator_disable(chip->vcc_regulator);
59ea3c9faf3235 Nikita Travkin 2020-05-11 399
59ea3c9faf3235 Nikita Travkin 2020-05-11 400 error:
59ea3c9faf3235 Nikita Travkin 2020-05-11 401 mutex_destroy(&chip->mutex);
59ea3c9faf3235 Nikita Travkin 2020-05-11 @402 return ret;
59ea3c9faf3235 Nikita Travkin 2020-05-11 403 }
59ea3c9faf3235 Nikita Travkin 2020-05-11 404
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[linux-next:master 12331/14131] drivers/staging/most/usb/usb.c:220 get_stream_frame_size() error: uninitialized symbol 'frame_size'.
by kbuild test robot
CC: kbuild-all(a)lists.01.org
TO: "Christian, Gromm," <christian.gromm(a)microchip.com>
CC: "Greg Kroah-Hartman" <gregkh(a)linuxfoundation.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e7b08814b16b80a0bf76eeca16317f8c2ed23b8c
commit: 2c069b61a843dc9c3d2296b54c4baa9730286530 [12331/14131] staging: most: usb: return 0 instead of variable
:::::: branch date: 2 days ago
:::::: commit date: 4 days ago
config: x86_64-randconfig-m001-20200531 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/staging/most/usb/usb.c:220 get_stream_frame_size() error: uninitialized symbol 'frame_size'.
# 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 2c069b61a843dc9c3d2296b54c4baa9730286530
vim +/frame_size +220 drivers/staging/most/usb/usb.c
e33269f60ae114 drivers/staging/most/hdm-usb/hdm_usb.c Andrey Shvetsov 2016-10-25 186
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 187 /**
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 188 * get_stream_frame_size - calculate frame size of current configuration
1c538a417977ec drivers/staging/most/usb/usb.c Christian Gromm 2020-05-27 189 * @dev: device structure
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 190 * @cfg: channel configuration
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 191 */
1c538a417977ec drivers/staging/most/usb/usb.c Christian Gromm 2020-05-27 192 static unsigned int get_stream_frame_size(struct device *dev,
1c538a417977ec drivers/staging/most/usb/usb.c Christian Gromm 2020-05-27 193 struct most_channel_config *cfg)
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 194 {
2c069b61a843dc drivers/staging/most/usb/usb.c Christian Gromm 2020-05-27 195 unsigned int frame_size;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 196 unsigned int sub_size = cfg->subbuffer_size;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 197
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 198 if (!sub_size) {
62573221240fdf drivers/staging/most/usb/usb.c Christian Gromm 2020-05-15 199 dev_warn(dev, "Misconfig: Subbuffer size zero.\n");
2c069b61a843dc drivers/staging/most/usb/usb.c Christian Gromm 2020-05-27 200 return 0;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 201 }
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 202 switch (cfg->data_type) {
0540609fe217c3 drivers/staging/most/hdm-usb/hdm_usb.c Andrey Shvetsov 2016-09-21 203 case MOST_CH_ISOC:
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 204 frame_size = AV_PACKETS_PER_XACT * sub_size;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 205 break;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 206 case MOST_CH_SYNC:
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 207 if (cfg->packets_per_xact == 0) {
62573221240fdf drivers/staging/most/usb/usb.c Christian Gromm 2020-05-15 208 dev_warn(dev, "Misconfig: Packets per XACT zero\n");
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 209 frame_size = 0;
9deba73de56ce5 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-10-21 210 } else if (cfg->packets_per_xact == 0xFF) {
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 211 frame_size = (USB_MTU / sub_size) * sub_size;
9deba73de56ce5 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-10-21 212 } else {
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 213 frame_size = cfg->packets_per_xact * sub_size;
9deba73de56ce5 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-10-21 214 }
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 215 break;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 216 default:
62573221240fdf drivers/staging/most/usb/usb.c Christian Gromm 2020-05-15 217 dev_warn(dev, "Query frame size of non-streaming channel\n");
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 218 break;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 219 }
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 @220 return frame_size;
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 221 }
a4198cdf0c3460 drivers/staging/most/hdm-usb/hdm_usb.c Christian Gromm 2015-07-24 222
:::::: The code at line 220 was first introduced by commit
:::::: a4198cdf0c3460d767d0d36979cd633021c127a2 Staging: most: add MOST driver's hdm-usb module
:::::: TO: Christian Gromm <christian.gromm(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
1 year, 11 months
Re: [Intel-gfx] [PATCH] drm/i915: Track i915_vma with its own reference counter
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200528211547.29392-1-chris(a)chris-wilson.co.uk>
References: <20200528211547.29392-1-chris(a)chris-wilson.co.uk>
TO: Chris Wilson <chris(a)chris-wilson.co.uk>
TO: intel-gfx(a)lists.freedesktop.org
CC: Chris Wilson <chris(a)chris-wilson.co.uk>
Hi Chris,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next v5.7-rc7 next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-Track-i915...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: i386-randconfig-c001-20200531 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/i915/i915_vma.c:1063:5-24: atomic_dec_and_test variation before object free at line 1072.
drivers/gpu/drm/i915/i915_vma.c:843:47-48: atomic_add_unless
# https://github.com/0day-ci/linux/commit/51c8e14b179d9348ce97abfaa5f80a65d...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 51c8e14b179d9348ce97abfaa5f80a65dc244f2f
vim +1063 drivers/gpu/drm/i915/i915_vma.c
51c8e14b179d93 Chris Wilson 2020-05-28 1044
51c8e14b179d93 Chris Wilson 2020-05-28 1045 void i915_vma_close(struct i915_vma *vma)
3365e2268b6bc3 Chris Wilson 2018-05-03 1046 {
51c8e14b179d93 Chris Wilson 2020-05-28 1047 struct i915_vma_clock *clock = &vma->vm->gt->vma_clock;
51c8e14b179d93 Chris Wilson 2020-05-28 1048
3365e2268b6bc3 Chris Wilson 2018-05-03 1049 /*
3365e2268b6bc3 Chris Wilson 2018-05-03 1050 * We defer actually closing, unbinding and destroying the VMA until
3365e2268b6bc3 Chris Wilson 2018-05-03 1051 * the next idle point, or if the object is freed in the meantime. By
3365e2268b6bc3 Chris Wilson 2018-05-03 1052 * postponing the unbind, we allow for it to be resurrected by the
3365e2268b6bc3 Chris Wilson 2018-05-03 1053 * client, avoiding the work required to rebind the VMA. This is
3365e2268b6bc3 Chris Wilson 2018-05-03 1054 * advantageous for DRI, where the client/server pass objects
3365e2268b6bc3 Chris Wilson 2018-05-03 1055 * between themselves, temporarily opening a local VMA to the
3365e2268b6bc3 Chris Wilson 2018-05-03 1056 * object, and then closing it again. The same object is then reused
3365e2268b6bc3 Chris Wilson 2018-05-03 1057 * on the next frame (or two, depending on the depth of the swap queue)
3365e2268b6bc3 Chris Wilson 2018-05-03 1058 * causing us to rebind the VMA once more. This ends up being a lot
3365e2268b6bc3 Chris Wilson 2018-05-03 1059 * of wasted work for the steady state.
3365e2268b6bc3 Chris Wilson 2018-05-03 1060 */
50689771c8f073 Chris Wilson 2020-04-22 1061
50689771c8f073 Chris Wilson 2020-04-22 1062 GEM_BUG_ON(!atomic_read(&vma->open_count));
51c8e14b179d93 Chris Wilson 2020-05-28 @1063 if (atomic_dec_and_lock(&vma->open_count, &clock->lock)) {
51c8e14b179d93 Chris Wilson 2020-05-28 1064 GEM_BUG_ON(i915_vma_is_closed(vma));
51c8e14b179d93 Chris Wilson 2020-05-28 1065 if (object_inuse(vma->obj)) {
51c8e14b179d93 Chris Wilson 2020-05-28 1066 i915_vma_get(vma);
51c8e14b179d93 Chris Wilson 2020-05-28 1067 list_add(&vma->closed_link, &clock->age[0]);
50689771c8f073 Chris Wilson 2020-04-22 1068 }
51c8e14b179d93 Chris Wilson 2020-05-28 1069 spin_unlock(&clock->lock);
3365e2268b6bc3 Chris Wilson 2018-05-03 1070
51c8e14b179d93 Chris Wilson 2020-05-28 1071 if (!list_empty(&vma->closed_link))
51c8e14b179d93 Chris Wilson 2020-05-28 @1072 schedule_delayed_work(&clock->work,
51c8e14b179d93 Chris Wilson 2020-05-28 1073 round_jiffies_up_relative(HZ));
51c8e14b179d93 Chris Wilson 2020-05-28 1074 }
3365e2268b6bc3 Chris Wilson 2018-05-03 1075
51c8e14b179d93 Chris Wilson 2020-05-28 1076 i915_vma_put(vma);
3365e2268b6bc3 Chris Wilson 2018-05-03 1077 }
155ab8836caa69 Chris Wilson 2019-06-06 1078
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[dhowells-fs:afs-operation 22/27] fs/afs/callback.c:74:38: sparse: sparse: context imbalance in 'afs_lookup_volume_rcu' - different lock contexts for basic block
by kbuild test robot
CC: kbuild-all(a)lists.01.org
TO: "David, Howells," <dhowells(a)redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git afs-operation
head: 0295d9a491871fb70f3e5792955d8ae0801a7ae5
commit: 44f32d4b0c05e78ca628dc52f04d86ec98da1e95 [22/27] afs: Reorganise volume and server trees to be rooted on the cell
:::::: branch date: 30 hours ago
:::::: commit date: 30 hours ago
config: parisc-randconfig-s031-20200531 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-243-gc100a7ab-dirty
git checkout 44f32d4b0c05e78ca628dc52f04d86ec98da1e95
# save the attached .config to linux build tree
make W=1 C=1 ARCH=parisc CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/afs/callback.c:74:38: sparse: sparse: context imbalance in 'afs_lookup_volume_rcu' - different lock contexts for basic block
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git remote update dhowells-fs
git checkout 44f32d4b0c05e78ca628dc52f04d86ec98da1e95
vim +/afs_lookup_volume_rcu +74 fs/afs/callback.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 58
fc7e32d8695359 David Howells 2020-03-27 59 /*
44f32d4b0c05e7 David Howells 2020-04-30 60 * Look up a volume by volume ID under RCU conditions.
fc7e32d8695359 David Howells 2020-03-27 61 */
44f32d4b0c05e7 David Howells 2020-04-30 62 static struct afs_volume *afs_lookup_volume_rcu(struct afs_cell *cell,
fc7e32d8695359 David Howells 2020-03-27 63 afs_volid_t vid)
fc7e32d8695359 David Howells 2020-03-27 64 {
44f32d4b0c05e7 David Howells 2020-04-30 65 struct afs_volume *volume = NULL;
fc7e32d8695359 David Howells 2020-03-27 66 struct rb_node *p;
fc7e32d8695359 David Howells 2020-03-27 67 int seq = 0;
fc7e32d8695359 David Howells 2020-03-27 68
fc7e32d8695359 David Howells 2020-03-27 69 do {
fc7e32d8695359 David Howells 2020-03-27 70 /* Unfortunately, rbtree walking doesn't give reliable results
fc7e32d8695359 David Howells 2020-03-27 71 * under just the RCU read lock, so we have to check for
fc7e32d8695359 David Howells 2020-03-27 72 * changes.
fc7e32d8695359 David Howells 2020-03-27 73 */
44f32d4b0c05e7 David Howells 2020-04-30 @74 read_seqbegin_or_lock(&cell->volume_lock, &seq);
fc7e32d8695359 David Howells 2020-03-27 75
44f32d4b0c05e7 David Howells 2020-04-30 76 p = rcu_dereference_raw(cell->volumes.rb_node);
fc7e32d8695359 David Howells 2020-03-27 77 while (p) {
44f32d4b0c05e7 David Howells 2020-04-30 78 volume = rb_entry(p, struct afs_volume, cell_node);
fc7e32d8695359 David Howells 2020-03-27 79
44f32d4b0c05e7 David Howells 2020-04-30 80 if (volume->vid < vid)
fc7e32d8695359 David Howells 2020-03-27 81 p = rcu_dereference_raw(p->rb_left);
44f32d4b0c05e7 David Howells 2020-04-30 82 else if (volume->vid > vid)
fc7e32d8695359 David Howells 2020-03-27 83 p = rcu_dereference_raw(p->rb_right);
fc7e32d8695359 David Howells 2020-03-27 84 else
fc7e32d8695359 David Howells 2020-03-27 85 break;
44f32d4b0c05e7 David Howells 2020-04-30 86 volume = NULL;
fc7e32d8695359 David Howells 2020-03-27 87 }
fc7e32d8695359 David Howells 2020-03-27 88
44f32d4b0c05e7 David Howells 2020-04-30 89 } while (need_seqretry(&cell->volume_lock, seq));
fc7e32d8695359 David Howells 2020-03-27 90
44f32d4b0c05e7 David Howells 2020-04-30 91 done_seqretry(&cell->volume_lock, seq);
44f32d4b0c05e7 David Howells 2020-04-30 92 return volume;
fc7e32d8695359 David Howells 2020-03-27 93 }
fc7e32d8695359 David Howells 2020-03-27 94
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months