Re: [PATCH v5 2/2] spi: cadence-quadpsi: Add support for the Cadence QSPI controller
by Dan Carpenter
Hi "Ramuthevar,Vadivel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on spi/for-next]
[cannot apply to v5.5-rc3 next-20191219]
[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/Ramuthevar-Vadivel-MuruganX/spi-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/spi/spi-cadence-quadspi.c:412 cqspi_read_execute() warn: if statement not indented
drivers/spi/spi-cadence-quadspi.c:1015 cqspi_probe() error: we previously assumed 'pdata' could be null (see line 1004)
# https://github.com/0day-ci/linux/commit/7d7e98888a40e593dcd442db83b53d929...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 7d7e98888a40e593dcd442db83b53d92980c036f
vim +412 drivers/spi/spi-cadence-quadspi.c
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 381 static int cqspi_read_execute(struct struct_cqspi *cqspi,
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 382 const struct spi_mem_op *op, u8 *rxbuf)
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 383 {
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 384 struct platform_device *pdev = cqspi->pdev;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 385 struct cqspi_platform_data *pdata = pdev->dev.platform_data;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 386 void *reg_base = cqspi->iobase;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 387 void *ahb_base = cqspi->qspi_ahb_virt;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 388 u32 rxlen = op->data.nbytes;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 389 u8 *rxbuf_end = rxbuf + rxlen;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 390 u32 mod_bytes = rxlen % 4;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 391 u32 bytes_to_read = 0;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 392 int remaining = op->data.nbytes;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 393 unsigned long timeout;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 394 int ret;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 395
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 396 writel(remaining, reg_base + CQSPI_REG_INDIRECTRDBYTES);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 397
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 398 mb();/* flush previous writes */
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 399
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 400 writel(pdata->fifo_depth - CQSPI_REG_SRAM_RESV_WORDS,
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 401 reg_base + CQSPI_REG_SRAMPARTITION);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 402 /* Clear all interrupts. */
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 403 writel(CQSPI_IRQ_STATUS_MASK, reg_base + CQSPI_REG_IRQSTATUS);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 404 writel(CQSPI_IRQ_MASK_RD, reg_base + CQSPI_REG_IRQMASK);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 405
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 406 reinit_completion(&cqspi->transfer_complete);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 407 writel(CQSPI_REG_INDIRECTRD_START_MASK,
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 408 reg_base + CQSPI_REG_INDIRECTRD);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 409
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 410 timeout = msecs_to_jiffies(CQSPI_READ_TIMEOUT_MS);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 411 while (remaining > 0) {
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 @412 if (!wait_for_completion_timeout(&cqspi->transfer_complete,
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 413 timeout))
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 414 ret = -ETIMEDOUT;
This should be indented and "return -ETIMEDOUT;" or a break or
something?
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 415
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 416 bytes_to_read = CQSPI_GET_RD_SRAM_LEVEL(reg_base);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 417
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 418 while (bytes_to_read != 0) {
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 419 unsigned int word_remain = round_down(remaining, 4);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 420
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 421 bytes_to_read *= CQSPI_FIFO_WIDTH;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 422 bytes_to_read = bytes_to_read > remaining ?
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 423 remaining : bytes_to_read;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 424 bytes_to_read = round_down(bytes_to_read, 4);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 425 if (bytes_to_read) {
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 426 ioread32_rep(ahb_base, rxbuf,
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 427 (bytes_to_read / 4));
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 428 } else if (!word_remain && mod_bytes) {
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 429 unsigned int temp = ioread32(ahb_base);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 430
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 431 bytes_to_read = mod_bytes;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 432 memcpy(rxbuf, &temp, min((unsigned int)
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 433 (rxbuf_end - rxbuf), bytes_to_read));
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 434 }
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 435
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 436 rxbuf += bytes_to_read;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 437 remaining -= bytes_to_read;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 438 bytes_to_read = CQSPI_GET_RD_SRAM_LEVEL(reg_base);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 439 }
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 440
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 441 if (remaining < 0)
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 442 reinit_completion(&cqspi->transfer_complete);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 443 }
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 444
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 445 /* Check indirect done status */
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 446 ret = cqspi_wait_for_bit(reg_base + CQSPI_REG_INDIRECTRD,
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 447 CQSPI_REG_INDIRECTRD_DONE_MASK, 0);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 448 if (ret) {
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 449 dev_err(&pdev->dev,
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 450 "Indirect read completion error (%i)\n", ret);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 451 goto failrd;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 452 }
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 453
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 454 /* Disable interrupt */
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 455 writel(0, reg_base + CQSPI_REG_IRQMASK);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 456 /* Clear indirect completion status */
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 457 writel(CQSPI_REG_INDIRECTRD_DONE_MASK, reg_base + CQSPI_REG_INDIRECTRD);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 458
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 459 return 0;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 460 failrd:
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 461 /* Disable interrupt */
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 462 writel(0, reg_base + CQSPI_REG_IRQMASK);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 463 /* Cancel the indirect read */
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 464 writel(CQSPI_REG_INDIRECTWR_CANCEL_MASK,
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 465 reg_base + CQSPI_REG_INDIRECTRD);
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 466 return ret;
7d7e98888a40e5 Ramuthevar Vadivel Murugan 2019-12-26 467 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
drivers/clk/ingenic/jz4770-cgu.c:442 jz4770_cgu_init() error: we previously assumed 'cgu' could be null (see line 435)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9455d25f4e3b3d009fa1b810862e5b06229530e4
commit: cd94eade0b2ab7673a97223d09406abf668b7f73 clk: ingenic: Allow drivers to be built with COMPILE_TEST
date: 2 weeks ago
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/clk/ingenic/jz4770-cgu.c:442 jz4770_cgu_init() error: we previously assumed 'cgu' could be null (see line 435)
# 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 cd94eade0b2ab7673a97223d09406abf668b7f73
vim +/cgu +442 drivers/clk/ingenic/jz4770-cgu.c
7a01c19007ad3c Paul Cercueil 2018-01-16 429 static void __init jz4770_cgu_init(struct device_node *np)
7a01c19007ad3c Paul Cercueil 2018-01-16 430 {
7a01c19007ad3c Paul Cercueil 2018-01-16 431 int retval;
7a01c19007ad3c Paul Cercueil 2018-01-16 432
7a01c19007ad3c Paul Cercueil 2018-01-16 433 cgu = ingenic_cgu_new(jz4770_cgu_clocks,
7a01c19007ad3c Paul Cercueil 2018-01-16 434 ARRAY_SIZE(jz4770_cgu_clocks), np);
7a01c19007ad3c Paul Cercueil 2018-01-16 @435 if (!cgu)
7a01c19007ad3c Paul Cercueil 2018-01-16 436 pr_err("%s: failed to initialise CGU\n", __func__);
7a01c19007ad3c Paul Cercueil 2018-01-16 437
7a01c19007ad3c Paul Cercueil 2018-01-16 438 retval = ingenic_cgu_register_clocks(cgu);
7a01c19007ad3c Paul Cercueil 2018-01-16 439 if (retval)
7a01c19007ad3c Paul Cercueil 2018-01-16 440 pr_err("%s: failed to register CGU Clocks\n", __func__);
7a01c19007ad3c Paul Cercueil 2018-01-16 441
2ee93e3c953b72 Paul Cercueil 2019-06-11 @442 ingenic_cgu_register_syscore_ops(cgu);
7a01c19007ad3c Paul Cercueil 2018-01-16 443 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 6 months
Re: [Intel-gfx] [PATCH] drm/i915: Add lmem fault handler
by Dan Carpenter
Hi Abdiel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip next-20191210]
[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/Abdiel-Janulgue/drm-i915-Add-lme...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/gpu/drm/i915/gem/i915_gem_lmem.c:40 vm_fault_lmem() error: uninitialized symbol 'vmf_ret'.
# https://github.com/0day-ci/linux/commit/527bcb2414222221b5b3cea4909756095...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 527bcb2414222221b5b3cea4909756095ae07d6a
vim +/vmf_ret +40 drivers/gpu/drm/i915/gem/i915_gem_lmem.c
527bcb24142222 Abdiel Janulgue 2019-12-11 12 vm_fault_t vm_fault_lmem(struct vm_fault *vmf)
527bcb24142222 Abdiel Janulgue 2019-12-11 13 {
527bcb24142222 Abdiel Janulgue 2019-12-11 14 struct vm_area_struct *area = vmf->vma;
527bcb24142222 Abdiel Janulgue 2019-12-11 15 struct i915_mmap_offset *priv = area->vm_private_data;
527bcb24142222 Abdiel Janulgue 2019-12-11 16 struct drm_i915_gem_object *obj = priv->obj;
527bcb24142222 Abdiel Janulgue 2019-12-11 17 unsigned long size = area->vm_end - area->vm_start;
527bcb24142222 Abdiel Janulgue 2019-12-11 18 bool write = area->vm_flags & VM_WRITE;
527bcb24142222 Abdiel Janulgue 2019-12-11 19 vm_fault_t vmf_ret;
^^^^^^^^^^^^^^^^^^^
527bcb24142222 Abdiel Janulgue 2019-12-11 20 int i, ret;
527bcb24142222 Abdiel Janulgue 2019-12-11 21
527bcb24142222 Abdiel Janulgue 2019-12-11 22 /* Sanity check that we allow writing into this object */
527bcb24142222 Abdiel Janulgue 2019-12-11 23 if (i915_gem_object_is_readonly(obj) && write)
527bcb24142222 Abdiel Janulgue 2019-12-11 24 return VM_FAULT_SIGBUS;
527bcb24142222 Abdiel Janulgue 2019-12-11 25
527bcb24142222 Abdiel Janulgue 2019-12-11 26 ret = i915_gem_object_pin_pages(obj);
527bcb24142222 Abdiel Janulgue 2019-12-11 27 if (ret)
527bcb24142222 Abdiel Janulgue 2019-12-11 28 return i915_error_to_vmf_fault(ret);
527bcb24142222 Abdiel Janulgue 2019-12-11 29
527bcb24142222 Abdiel Janulgue 2019-12-11 30 for (i = 0; i < size >> PAGE_SHIFT; i++) {
Can size be less than a page?
527bcb24142222 Abdiel Janulgue 2019-12-11 31 vmf_ret = vmf_insert_pfn(area,
527bcb24142222 Abdiel Janulgue 2019-12-11 32 (unsigned long)area->vm_start + i * PAGE_SIZE,
527bcb24142222 Abdiel Janulgue 2019-12-11 33 i915_gem_object_lmem_io_pfn(obj, i));
527bcb24142222 Abdiel Janulgue 2019-12-11 34 if (vmf_ret != VM_FAULT_NOPAGE)
527bcb24142222 Abdiel Janulgue 2019-12-11 35 break;
527bcb24142222 Abdiel Janulgue 2019-12-11 36 }
527bcb24142222 Abdiel Janulgue 2019-12-11 37
527bcb24142222 Abdiel Janulgue 2019-12-11 38 i915_gem_object_unpin_pages(obj);
527bcb24142222 Abdiel Janulgue 2019-12-11 39
527bcb24142222 Abdiel Janulgue 2019-12-11 @40 return vmf_ret;
527bcb24142222 Abdiel Janulgue 2019-12-11 41 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 6 months
sound/firewire/motu/motu-pcm.c:191 pcm_open() error: double unlocked 'motu->mutex' (orig line 179)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 94e89b40235476a83a53a47b9ffb0cb91a4c335e
commit: 3fd80b2003882b6a328caff9e6b3a14bed61f27c ALSA: firewire-motu: use the same size of period for PCM substream in AMDTP streams
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
sound/firewire/motu/motu-pcm.c:191 pcm_open() error: double unlocked 'motu->mutex' (orig line 179)
# 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 3fd80b2003882b6a328caff9e6b3a14bed61f27c
vim +191 sound/firewire/motu/motu-pcm.c
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 133 static int pcm_open(struct snd_pcm_substream *substream)
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 134 {
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 135 struct snd_motu *motu = substream->private_data;
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 136 const struct snd_motu_protocol *const protocol = motu->spec->protocol;
3fd80b2003882b Takashi Sakamoto 2019-10-07 137 struct amdtp_domain *d = &motu->domain;
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 138 enum snd_motu_clock_source src;
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 139 int err;
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 140
71c3797779d3cd Takashi Sakamoto 2017-03-22 141 err = snd_motu_stream_lock_try(motu);
71c3797779d3cd Takashi Sakamoto 2017-03-22 142 if (err < 0)
71c3797779d3cd Takashi Sakamoto 2017-03-22 143 return err;
71c3797779d3cd Takashi Sakamoto 2017-03-22 144
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 145 mutex_lock(&motu->mutex);
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 146
8b460c76bd1712 Takashi Sakamoto 2017-08-20 147 err = snd_motu_stream_cache_packet_formats(motu);
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 148 if (err < 0)
71c3797779d3cd Takashi Sakamoto 2017-03-22 149 goto err_locked;
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 150
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 151 err = init_hw_info(motu, substream);
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 152 if (err < 0)
71c3797779d3cd Takashi Sakamoto 2017-03-22 153 goto err_locked;
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 154
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 155 err = protocol->get_clock_source(motu, &src);
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 156 if (err < 0)
71c3797779d3cd Takashi Sakamoto 2017-03-22 157 goto err_locked;
3fd80b2003882b Takashi Sakamoto 2019-10-07 158
3fd80b2003882b Takashi Sakamoto 2019-10-07 159 // When source of clock is not internal or any stream is reserved for
3fd80b2003882b Takashi Sakamoto 2019-10-07 160 // transmission of PCM frames, the available sampling rate is limited
3fd80b2003882b Takashi Sakamoto 2019-10-07 161 // at current one.
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 162 if (src != SND_MOTU_CLOCK_SOURCE_INTERNAL ||
3fd80b2003882b Takashi Sakamoto 2019-10-07 163 (motu->substreams_counter > 0 && d->events_per_period > 0)) {
3fd80b2003882b Takashi Sakamoto 2019-10-07 164 unsigned int frames_per_period = d->events_per_period;
3fd80b2003882b Takashi Sakamoto 2019-10-07 165 unsigned int rate;
3fd80b2003882b Takashi Sakamoto 2019-10-07 166
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 167 err = protocol->get_clock_rate(motu, &rate);
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 168 if (err < 0)
71c3797779d3cd Takashi Sakamoto 2017-03-22 169 goto err_locked;
3fd80b2003882b Takashi Sakamoto 2019-10-07 170
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 171 substream->runtime->hw.rate_min = rate;
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 172 substream->runtime->hw.rate_max = rate;
3fd80b2003882b Takashi Sakamoto 2019-10-07 173
3fd80b2003882b Takashi Sakamoto 2019-10-07 174 if (frames_per_period > 0) {
3fd80b2003882b Takashi Sakamoto 2019-10-07 175 err = snd_pcm_hw_constraint_minmax(substream->runtime,
3fd80b2003882b Takashi Sakamoto 2019-10-07 176 SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
3fd80b2003882b Takashi Sakamoto 2019-10-07 177 frames_per_period, frames_per_period);
3fd80b2003882b Takashi Sakamoto 2019-10-07 178 if (err < 0) {
3fd80b2003882b Takashi Sakamoto 2019-10-07 @179 mutex_unlock(&motu->mutex);
^^^^^^^^^^^^^^^^^^^^^^^^^^
Delete this.
3fd80b2003882b Takashi Sakamoto 2019-10-07 180 goto err_locked;
3fd80b2003882b Takashi Sakamoto 2019-10-07 181 }
3fd80b2003882b Takashi Sakamoto 2019-10-07 182 }
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 183 }
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 184
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 185 snd_pcm_set_sync(substream);
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 186
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 187 mutex_unlock(&motu->mutex);
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 188
3fd80b2003882b Takashi Sakamoto 2019-10-07 189 return 0;
71c3797779d3cd Takashi Sakamoto 2017-03-22 190 err_locked:
71c3797779d3cd Takashi Sakamoto 2017-03-22 @191 mutex_unlock(&motu->mutex);
71c3797779d3cd Takashi Sakamoto 2017-03-22 192 snd_motu_stream_lock_release(motu);
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 193 return err;
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 194 }
dd49b2d1f04af9 Takashi Sakamoto 2017-03-22 195
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 6 months
Re: [PATCH next 2/3] debugfs: introduce debugfs_create_single[,_data]
by Dan Carpenter
[ How do I fetch 0day git branchs?
git fetch https://github.com/0day-ci/linux/commits/Kefeng-Wang/debugfs-introduce-de...
doesn't work. - dan ]
Hi Kefeng,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20191128]
[cannot apply to v5.4]
[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/Kefeng-Wang/debugfs-introduce-de...
base: d26b0e226f222c22c3b7e9d16e5b886e7c51057a
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
fs/debugfs/file.c:1193 debugfs_create_single_data() warn: overwrite may leak 'entry'
Old smatch warnings:
include/linux/compiler.h:247 __write_once_size() warn: potential memory corrupting cast 8 vs 4 bytes
# https://github.com/0day-ci/linux/commit/198a4ea9768d6790a169e8b802e702c20...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 198a4ea9768d6790a169e8b802e702c208aafbd1
vim +/entry +1193 fs/debugfs/file.c
198a4ea9768d67 Kefeng Wang 2019-11-29 1179 struct dentry *debugfs_create_single_data(const char *name, umode_t mode,
198a4ea9768d67 Kefeng Wang 2019-11-29 1180 struct dentry *parent, void *data,
198a4ea9768d67 Kefeng Wang 2019-11-29 1181 int (*read_fn)(struct seq_file *s,
198a4ea9768d67 Kefeng Wang 2019-11-29 1182 void *data))
198a4ea9768d67 Kefeng Wang 2019-11-29 1183 {
198a4ea9768d67 Kefeng Wang 2019-11-29 1184 struct debugfs_entry *entry;
198a4ea9768d67 Kefeng Wang 2019-11-29 1185
198a4ea9768d67 Kefeng Wang 2019-11-29 1186 entry = kzalloc(sizeof(*entry), GFP_KERNEL);
198a4ea9768d67 Kefeng Wang 2019-11-29 1187 if (!entry)
198a4ea9768d67 Kefeng Wang 2019-11-29 1188 return ERR_PTR(-ENOMEM);
198a4ea9768d67 Kefeng Wang 2019-11-29 1189
198a4ea9768d67 Kefeng Wang 2019-11-29 1190 entry->read = read_fn;
198a4ea9768d67 Kefeng Wang 2019-11-29 1191 entry->data = data;
198a4ea9768d67 Kefeng Wang 2019-11-29 1192
198a4ea9768d67 Kefeng Wang 2019-11-29 @1193 entry = debugfs_set_lowest_bit(entry);
^^^^^^^^
I haven't looked at the surrounding code but how would we free "entry"
when we write over it here?
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 6 months
Re: [atishp04:efi_stub 1/1] drivers/firmware/efi/libstub/arm-stub.c:203:7: warning: variable 'secure_boot' is uninitialized when used here
by Rong Chen
On 11/26/19 2:11 AM, Nick Desaulniers wrote:
> On Mon, Nov 25, 2019 at 12:11 AM Rong Chen <rong.a.chen(a)intel.com> wrote:
>> Hi Nick,
>>
>> On 11/22/19 3:10 AM, Nick Desaulniers wrote:
>>> On Wed, Nov 20, 2019 at 2:46 PM Atish Patra <Atish.Patra(a)wdc.com> wrote:
>>>> On Mon, 2019-11-18 at 22:39 -0800, Nick Desaulniers wrote:
>>>>> Atish, below is a report from 0day bot from a build with Clang. The
>>>>> warning looks legit, can you please take a look?
>>>>>
>>>> Hi Nick,
>>>> Thanks for the email. This is a work in progress branch. Is there way
>>>> not to trigger kbuild tests on this branch ?
>>> That's a common question that Rong or Philip can answer (I forgot what
>>> the answer has been in the past). Rong/Philip, it may be good to have
>>> a URL/link that I can point people to in the future, since it's a FAQ.
>> We have blacklisted "efi_stub" and "wip_.*" branches for Atish. In
>> general, branches named as ".*experimental.*" or ".*dont-build"
>> won't be tested by default. and we have a doc to introduce basic
>> configurations: https://github.com/intel/lkp-tests/wiki/Repo-Spec
> Thanks for the link. Looks like it doesn't mention the `wip_`
> convention, and it says `*experiment*` (more specifically). Would you
> mind either adding the note about `wip_` or a new wiki page saying "If
> you don't want 0day bot to find/test your branches, please use the
> following naming conventions when pushing branches: XXX." That way in
> the future when I nag someone, and it was just an experimental branch,
> I can just send them the link to the wiki about the convention, and
> don't have to nag you?
>
>
Hi Nick,
Sorry for the delay, I just got the permission to write a doc in
github, please see
https://github.com/intel/lkp-tests/wiki/LKP-FAQ#is-there-a-way-not-to-tri...
Best Regards,
Rong Chen
2 years, 6 months