Re: [PATCH 1/4] counter: Internalize sysfs interface code
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <d84f0bb3258d1664e90da64d75f787829c50a9bd.1588176662.git.vilhelm.gray(a)gmail.com>
References: <d84f0bb3258d1664e90da64d75f787829c50a9bd.1588176662.git.vilhelm.gray(a)gmail.com>
TO: William Breathitt Gray <vilhelm.gray(a)gmail.com>
TO: jic23(a)kernel.org
CC: kamel.bouhara(a)bootlin.com
CC: gwendal(a)chromium.org
CC: alexandre.belloni(a)bootlin.com
CC: david(a)lechnology.com
CC: felipe.balbi(a)linux.intel.com
CC: fabien.lahoudere(a)collabora.com
CC: linux-iio(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: linux-stm32(a)st-md-mailman.stormreply.com
Hi William,
I love your patch! Perhaps something to improve:
[auto build test WARNING on stm32/stm32-next]
[cannot apply to linus/master linux/master v5.7-rc3 next-20200430]
[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/William-Breathitt-Gray/Introduce...
base: https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git stm32-next
:::::: branch date: 25 hours ago
:::::: commit date: 25 hours ago
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/counter/counter-core.c:26:1-6: ERROR: invalid free of structure field
# https://github.com/0day-ci/linux/commit/bdd9a6aa70c61f16dacaf057f0ce70fc2...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout bdd9a6aa70c61f16dacaf057f0ce70fc210b5ec9
vim +26 drivers/counter/counter-core.c
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 20
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 21 static void counter_device_release(struct device *dev)
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 22 {
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 23 struct counter_device *const counter = dev_get_drvdata(dev);
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 24
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 25 counter_sysfs_free(counter);
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 @26 kfree(&counter->dev);
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 27 ida_simple_remove(&counter_ida, counter->id);
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 28 }
bdd9a6aa70c61f1 William Breathitt Gray 2020-04-29 29
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [RFC 05/17] drm: exynos: fix sg_table nents vs. orig_nents misuse
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200428132005.21424-6-m.szyprowski(a)samsung.com>
References: <20200428132005.21424-6-m.szyprowski(a)samsung.com>
TO: Marek Szyprowski <m.szyprowski(a)samsung.com>
Hi Marek,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on drm-exynos/exynos-drm-next]
[also build test WARNING on next-20200429]
[cannot apply to drm-intel/for-linux-next tegra-drm/drm/tegra/for-next linus/master v5.7-rc3]
[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/Marek-Szyprowski/DRM-fix-struct-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-191-gc51a0382-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
:::::: branch date: 29 hours ago
:::::: commit date: 29 hours ago
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 >>)
drivers/gpu/drm/exynos/exynos_drm_g2d.c:516:9: sparse: sparse: Expected ; at end of statement
drivers/gpu/drm/exynos/exynos_drm_g2d.c:516:9: sparse: sparse: got if
drivers/gpu/drm/exynos/exynos_drm_g2d.c:522:20: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:522:20: sparse: sparse: got ->
drivers/gpu/drm/exynos/exynos_drm_g2d.c:523:20: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:523:20: sparse: sparse: got ->
drivers/gpu/drm/exynos/exynos_drm_g2d.c:525:23: sparse: sparse: Expected ) in function declarator
drivers/gpu/drm/exynos/exynos_drm_g2d.c:525:23: sparse: sparse: got &
drivers/gpu/drm/exynos/exynos_drm_g2d.c:527:16: sparse: sparse: Expected ) in function declarator
drivers/gpu/drm/exynos/exynos_drm_g2d.c:527:16: sparse: sparse: got ->
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:527:9: sparse: sparse: Trying to use reserved word 'if' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:529:28: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:529:28: sparse: sparse: got ->
drivers/gpu/drm/exynos/exynos_drm_g2d.c:530:9: sparse: sparse: Expected ; at the end of type declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:530:9: sparse: sparse: got }
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:534:9: sparse: sparse: Trying to use reserved word 'return' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:534:16: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:534:16: sparse: sparse: got &
drivers/gpu/drm/exynos/exynos_drm_g2d.c:536:18: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:536:18: sparse: sparse: got :
drivers/gpu/drm/exynos/exynos_drm_g2d.c:539:13: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:539:13: sparse: sparse: got :
drivers/gpu/drm/exynos/exynos_drm_g2d.c:542:17: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:542:17: sparse: sparse: got :
drivers/gpu/drm/exynos/exynos_drm_g2d.c:545:21: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:545:21: sparse: sparse: got :
drivers/gpu/drm/exynos/exynos_drm_g2d.c:548:9: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:548:9: sparse: sparse: got :
drivers/gpu/drm/exynos/exynos_drm_g2d.c:551:9: sparse: sparse: Trying to use reserved word 'return' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:551:16: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:551:16: sparse: sparse: got ERR_PTR
drivers/gpu/drm/exynos/exynos_drm_g2d.c:552:1: sparse: sparse: Expected ; at the end of type declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:552:1: sparse: sparse: got }
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ) in function declarator
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got =
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Trying to use reserved word 'for' as identifier
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Trying to use reserved word 'do' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got {
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ) in function declarator
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got !
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Trying to use reserved word 'if' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ; at the end of type declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got }
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ) in function declarator
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got *
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Trying to use reserved word 'typeof' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ; at the end of type declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got }
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Trying to use reserved word 'do' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got {
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ) in function declarator
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got !
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Trying to use reserved word 'if' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ; at the end of type declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got }
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ) in function declarator
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got *
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Trying to use reserved word 'typeof' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ; at the end of type declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got }
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ; at the end of type declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got &
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:559:9: sparse: sparse: got )
drivers/gpu/drm/exynos/exynos_drm_g2d.c:563:12: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:563:12: sparse: sparse: got ->
drivers/gpu/drm/exynos/exynos_drm_g2d.c:564:1: sparse: sparse: Expected ; at the end of type declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:564:1: sparse: sparse: got }
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:570:9: sparse: sparse: Trying to use reserved word 'switch' as identifier
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:571:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:572:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:573:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:574:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:575:9: sparse: sparse: not in switch scope
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:577:17: sparse: sparse: break/continue not in iterator scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:578:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:580:17: sparse: sparse: break/continue not in iterator scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:581:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:582:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:583:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:584:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:585:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:587:17: sparse: sparse: break/continue not in iterator scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:588:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:590:17: sparse: sparse: break/continue not in iterator scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:591:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:593:17: sparse: sparse: break/continue not in iterator scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:594:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:596:17: sparse: sparse: break/continue not in iterator scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:597:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:601:17: sparse: sparse: break/continue not in iterator scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:604:9: sparse: sparse: Trying to use reserved word 'return' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:604:16: sparse: sparse: Expected ; at end of declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:604:16: sparse: sparse: got reg_type
drivers/gpu/drm/exynos/exynos_drm_g2d.c:605:1: sparse: sparse: Expected ; at the end of type declaration
drivers/gpu/drm/exynos/exynos_drm_g2d.c:605:1: sparse: sparse: got }
drivers/gpu/drm/exynos/exynos_drm_g2d.c:611:9: sparse: sparse: Trying to use reserved word 'switch' as identifier
drivers/gpu/drm/exynos/exynos_drm_g2d.c:612:9: sparse: sparse: not in switch scope
drivers/gpu/drm/exynos/exynos_drm_g2d.c:613:9: sparse: sparse: not in switch scope
>> drivers/gpu/drm/exynos/exynos_drm_g2d.c:615:17: sparse: sparse: too many errors
# https://github.com/0day-ci/linux/commit/e3b3dfab5ae2bb2842aaa4f90c41b264c...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout e3b3dfab5ae2bb2842aaa4f90c41b264cb18900c
vim +/if +527 drivers/gpu/drm/exynos/exynos_drm_g2d.c
2a3098ff6c2109 Inki Dae 2012-11-04 418
eb4d9796fa3404 Marek Szyprowski 2018-07-09 419 static dma_addr_t *g2d_userptr_get_dma_addr(struct g2d_data *g2d,
2a3098ff6c2109 Inki Dae 2012-11-04 420 unsigned long userptr,
2a3098ff6c2109 Inki Dae 2012-11-04 421 unsigned long size,
2a3098ff6c2109 Inki Dae 2012-11-04 422 struct drm_file *filp,
3aa2a5c14076e2 Marek Szyprowski 2018-07-09 423 void **obj)
2a3098ff6c2109 Inki Dae 2012-11-04 424 {
2a3098ff6c2109 Inki Dae 2012-11-04 425 struct drm_exynos_file_private *file_priv = filp->driver_priv;
2a3098ff6c2109 Inki Dae 2012-11-04 426 struct g2d_cmdlist_userptr *g2d_userptr;
2a3098ff6c2109 Inki Dae 2012-11-04 427 struct sg_table *sgt;
2a3098ff6c2109 Inki Dae 2012-11-04 428 unsigned long start, end;
2a3098ff6c2109 Inki Dae 2012-11-04 429 unsigned int npages, offset;
2a3098ff6c2109 Inki Dae 2012-11-04 430 int ret;
2a3098ff6c2109 Inki Dae 2012-11-04 431
2a3098ff6c2109 Inki Dae 2012-11-04 432 if (!size) {
6f83d20838c099 Inki Dae 2019-04-15 433 DRM_DEV_ERROR(g2d->dev, "invalid userptr size.\n");
2a3098ff6c2109 Inki Dae 2012-11-04 434 return ERR_PTR(-EINVAL);
2a3098ff6c2109 Inki Dae 2012-11-04 435 }
2a3098ff6c2109 Inki Dae 2012-11-04 436
2a3098ff6c2109 Inki Dae 2012-11-04 437 /* check if userptr already exists in userptr_list. */
eb4d9796fa3404 Marek Szyprowski 2018-07-09 438 list_for_each_entry(g2d_userptr, &file_priv->userptr_list, list) {
2a3098ff6c2109 Inki Dae 2012-11-04 439 if (g2d_userptr->userptr == userptr) {
2a3098ff6c2109 Inki Dae 2012-11-04 440 /*
2a3098ff6c2109 Inki Dae 2012-11-04 441 * also check size because there could be same address
2a3098ff6c2109 Inki Dae 2012-11-04 442 * and different size.
2a3098ff6c2109 Inki Dae 2012-11-04 443 */
2a3098ff6c2109 Inki Dae 2012-11-04 444 if (g2d_userptr->size == size) {
2a3098ff6c2109 Inki Dae 2012-11-04 445 atomic_inc(&g2d_userptr->refcount);
3aa2a5c14076e2 Marek Szyprowski 2018-07-09 446 *obj = g2d_userptr;
2a3098ff6c2109 Inki Dae 2012-11-04 447
2a3098ff6c2109 Inki Dae 2012-11-04 448 return &g2d_userptr->dma_addr;
2a3098ff6c2109 Inki Dae 2012-11-04 449 }
2a3098ff6c2109 Inki Dae 2012-11-04 450
2a3098ff6c2109 Inki Dae 2012-11-04 451 /*
2a3098ff6c2109 Inki Dae 2012-11-04 452 * at this moment, maybe g2d dma is accessing this
2a3098ff6c2109 Inki Dae 2012-11-04 453 * g2d_userptr memory region so just remove this
2a3098ff6c2109 Inki Dae 2012-11-04 454 * g2d_userptr object from userptr_list not to be
2a3098ff6c2109 Inki Dae 2012-11-04 455 * referred again and also except it the userptr
2a3098ff6c2109 Inki Dae 2012-11-04 456 * pool to be released after the dma access completion.
2a3098ff6c2109 Inki Dae 2012-11-04 457 */
2a3098ff6c2109 Inki Dae 2012-11-04 458 g2d_userptr->out_of_list = true;
2a3098ff6c2109 Inki Dae 2012-11-04 459 g2d_userptr->in_pool = false;
2a3098ff6c2109 Inki Dae 2012-11-04 460 list_del_init(&g2d_userptr->list);
2a3098ff6c2109 Inki Dae 2012-11-04 461
2a3098ff6c2109 Inki Dae 2012-11-04 462 break;
2a3098ff6c2109 Inki Dae 2012-11-04 463 }
2a3098ff6c2109 Inki Dae 2012-11-04 464 }
2a3098ff6c2109 Inki Dae 2012-11-04 465
2a3098ff6c2109 Inki Dae 2012-11-04 466 g2d_userptr = kzalloc(sizeof(*g2d_userptr), GFP_KERNEL);
38bb5253a95f2e Sachin Kamat 2013-08-19 467 if (!g2d_userptr)
2a3098ff6c2109 Inki Dae 2012-11-04 468 return ERR_PTR(-ENOMEM);
2a3098ff6c2109 Inki Dae 2012-11-04 469
2a3098ff6c2109 Inki Dae 2012-11-04 470 atomic_set(&g2d_userptr->refcount, 1);
63540f01917c0d Jan Kara 2015-07-20 471 g2d_userptr->size = size;
2a3098ff6c2109 Inki Dae 2012-11-04 472
2a3098ff6c2109 Inki Dae 2012-11-04 473 start = userptr & PAGE_MASK;
2a3098ff6c2109 Inki Dae 2012-11-04 474 offset = userptr & ~PAGE_MASK;
2a3098ff6c2109 Inki Dae 2012-11-04 475 end = PAGE_ALIGN(userptr + size);
2a3098ff6c2109 Inki Dae 2012-11-04 476 npages = (end - start) >> PAGE_SHIFT;
63540f01917c0d Jan Kara 2015-07-20 477 g2d_userptr->vec = frame_vector_create(npages);
63540f01917c0d Jan Kara 2015-07-20 478 if (!g2d_userptr->vec) {
4bb615c5fbb4f3 Seung-Woo Kim 2013-07-03 479 ret = -ENOMEM;
4bb615c5fbb4f3 Seung-Woo Kim 2013-07-03 480 goto err_free;
2a3098ff6c2109 Inki Dae 2012-11-04 481 }
2a3098ff6c2109 Inki Dae 2012-11-04 482
7f23b3504a0df6 Lorenzo Stoakes 2016-10-13 483 ret = get_vaddr_frames(start, npages, FOLL_FORCE | FOLL_WRITE,
7f23b3504a0df6 Lorenzo Stoakes 2016-10-13 484 g2d_userptr->vec);
63540f01917c0d Jan Kara 2015-07-20 485 if (ret != npages) {
6f83d20838c099 Inki Dae 2019-04-15 486 DRM_DEV_ERROR(g2d->dev,
6f83d20838c099 Inki Dae 2019-04-15 487 "failed to get user pages from userptr.\n");
63540f01917c0d Jan Kara 2015-07-20 488 if (ret < 0)
63540f01917c0d Jan Kara 2015-07-20 489 goto err_destroy_framevec;
2a3098ff6c2109 Inki Dae 2012-11-04 490 ret = -EFAULT;
63540f01917c0d Jan Kara 2015-07-20 491 goto err_put_framevec;
2a3098ff6c2109 Inki Dae 2012-11-04 492 }
63540f01917c0d Jan Kara 2015-07-20 493 if (frame_vector_to_pages(g2d_userptr->vec) < 0) {
2a3098ff6c2109 Inki Dae 2012-11-04 494 ret = -EFAULT;
63540f01917c0d Jan Kara 2015-07-20 495 goto err_put_framevec;
2a3098ff6c2109 Inki Dae 2012-11-04 496 }
2a3098ff6c2109 Inki Dae 2012-11-04 497
e44a5c00169df6 Sachin Kamat 2013-01-25 498 sgt = kzalloc(sizeof(*sgt), GFP_KERNEL);
2a3098ff6c2109 Inki Dae 2012-11-04 499 if (!sgt) {
2a3098ff6c2109 Inki Dae 2012-11-04 500 ret = -ENOMEM;
63540f01917c0d Jan Kara 2015-07-20 501 goto err_put_framevec;
2a3098ff6c2109 Inki Dae 2012-11-04 502 }
2a3098ff6c2109 Inki Dae 2012-11-04 503
63540f01917c0d Jan Kara 2015-07-20 504 ret = sg_alloc_table_from_pages(sgt,
63540f01917c0d Jan Kara 2015-07-20 505 frame_vector_pages(g2d_userptr->vec),
63540f01917c0d Jan Kara 2015-07-20 506 npages, offset, size, GFP_KERNEL);
2a3098ff6c2109 Inki Dae 2012-11-04 507 if (ret < 0) {
6f83d20838c099 Inki Dae 2019-04-15 508 DRM_DEV_ERROR(g2d->dev, "failed to get sgt from pages.\n");
2a3098ff6c2109 Inki Dae 2012-11-04 509 goto err_free_sgt;
2a3098ff6c2109 Inki Dae 2012-11-04 510 }
2a3098ff6c2109 Inki Dae 2012-11-04 511
2a3098ff6c2109 Inki Dae 2012-11-04 512 g2d_userptr->sgt = sgt;
2a3098ff6c2109 Inki Dae 2012-11-04 513
e3b3dfab5ae2bb Marek Szyprowski 2020-04-28 514 sgt->nents = dma_map_sg(to_dma_dev(g2d->drm_dev), sgt->sgl,
e3b3dfab5ae2bb Marek Szyprowski 2020-04-28 515 sgt->orig_nents, DMA_BIDIRECTIONAL)
e3b3dfab5ae2bb Marek Szyprowski 2020-04-28 516 if (!sgt->nents) {
6f83d20838c099 Inki Dae 2019-04-15 517 DRM_DEV_ERROR(g2d->dev, "failed to map sgt with dma region.\n");
6aa5e85d7c1578 Joonyoung Shim 2016-04-22 518 ret = -ENOMEM;
067ed3311f7961 YoungJun Cho 2013-03-11 519 goto err_sg_free_table;
2a3098ff6c2109 Inki Dae 2012-11-04 520 }
2a3098ff6c2109 Inki Dae 2012-11-04 521
2a3098ff6c2109 Inki Dae 2012-11-04 522 g2d_userptr->dma_addr = sgt->sgl[0].dma_address;
2a3098ff6c2109 Inki Dae 2012-11-04 523 g2d_userptr->userptr = userptr;
2a3098ff6c2109 Inki Dae 2012-11-04 524
eb4d9796fa3404 Marek Szyprowski 2018-07-09 525 list_add_tail(&g2d_userptr->list, &file_priv->userptr_list);
2a3098ff6c2109 Inki Dae 2012-11-04 526
2a3098ff6c2109 Inki Dae 2012-11-04 @527 if (g2d->current_pool + (npages << PAGE_SHIFT) < g2d->max_pool) {
2a3098ff6c2109 Inki Dae 2012-11-04 528 g2d->current_pool += npages << PAGE_SHIFT;
2a3098ff6c2109 Inki Dae 2012-11-04 529 g2d_userptr->in_pool = true;
2a3098ff6c2109 Inki Dae 2012-11-04 530 }
2a3098ff6c2109 Inki Dae 2012-11-04 531
3aa2a5c14076e2 Marek Szyprowski 2018-07-09 532 *obj = g2d_userptr;
2a3098ff6c2109 Inki Dae 2012-11-04 533
2a3098ff6c2109 Inki Dae 2012-11-04 @534 return &g2d_userptr->dma_addr;
2a3098ff6c2109 Inki Dae 2012-11-04 535
067ed3311f7961 YoungJun Cho 2013-03-11 536 err_sg_free_table:
2a3098ff6c2109 Inki Dae 2012-11-04 537 sg_free_table(sgt);
067ed3311f7961 YoungJun Cho 2013-03-11 538
067ed3311f7961 YoungJun Cho 2013-03-11 539 err_free_sgt:
2a3098ff6c2109 Inki Dae 2012-11-04 540 kfree(sgt);
2a3098ff6c2109 Inki Dae 2012-11-04 541
63540f01917c0d Jan Kara 2015-07-20 542 err_put_framevec:
63540f01917c0d Jan Kara 2015-07-20 543 put_vaddr_frames(g2d_userptr->vec);
2a3098ff6c2109 Inki Dae 2012-11-04 544
63540f01917c0d Jan Kara 2015-07-20 545 err_destroy_framevec:
63540f01917c0d Jan Kara 2015-07-20 546 frame_vector_destroy(g2d_userptr->vec);
4bb615c5fbb4f3 Seung-Woo Kim 2013-07-03 547
4bb615c5fbb4f3 Seung-Woo Kim 2013-07-03 548 err_free:
2a3098ff6c2109 Inki Dae 2012-11-04 549 kfree(g2d_userptr);
2a3098ff6c2109 Inki Dae 2012-11-04 550
2a3098ff6c2109 Inki Dae 2012-11-04 551 return ERR_PTR(ret);
2a3098ff6c2109 Inki Dae 2012-11-04 552 }
2a3098ff6c2109 Inki Dae 2012-11-04 553
eb4d9796fa3404 Marek Szyprowski 2018-07-09 554 static void g2d_userptr_free_all(struct g2d_data *g2d, struct drm_file *filp)
2a3098ff6c2109 Inki Dae 2012-11-04 555 {
2a3098ff6c2109 Inki Dae 2012-11-04 556 struct drm_exynos_file_private *file_priv = filp->driver_priv;
2a3098ff6c2109 Inki Dae 2012-11-04 557 struct g2d_cmdlist_userptr *g2d_userptr, *n;
2a3098ff6c2109 Inki Dae 2012-11-04 558
eb4d9796fa3404 Marek Szyprowski 2018-07-09 @559 list_for_each_entry_safe(g2d_userptr, n, &file_priv->userptr_list, list)
2a3098ff6c2109 Inki Dae 2012-11-04 560 if (g2d_userptr->in_pool)
3aa2a5c14076e2 Marek Szyprowski 2018-07-09 561 g2d_userptr_put_dma_addr(g2d, g2d_userptr, true);
2a3098ff6c2109 Inki Dae 2012-11-04 562
2a3098ff6c2109 Inki Dae 2012-11-04 563 g2d->current_pool = 0;
2a3098ff6c2109 Inki Dae 2012-11-04 564 }
2a3098ff6c2109 Inki Dae 2012-11-04 565
6f83d20838c099 Inki Dae 2019-04-15 566 static enum g2d_reg_type g2d_get_reg_type(struct g2d_data *g2d, int reg_offset)
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 567 {
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 568 enum g2d_reg_type reg_type;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 569
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 @570 switch (reg_offset) {
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 @571 case G2D_SRC_BASE_ADDR:
ed4dc2718d3510 Tobias Jakobi 2016-05-25 572 case G2D_SRC_STRIDE:
2dec17c70e7567 YoungJun Cho 2013-03-11 573 case G2D_SRC_COLOR_MODE:
2dec17c70e7567 YoungJun Cho 2013-03-11 574 case G2D_SRC_LEFT_TOP:
2dec17c70e7567 YoungJun Cho 2013-03-11 575 case G2D_SRC_RIGHT_BOTTOM:
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 576 reg_type = REG_TYPE_SRC;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 @577 break;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 578 case G2D_SRC_PLANE2_BASE_ADDR:
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 579 reg_type = REG_TYPE_SRC_PLANE2;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 580 break;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 581 case G2D_DST_BASE_ADDR:
ed4dc2718d3510 Tobias Jakobi 2016-05-25 582 case G2D_DST_STRIDE:
2dec17c70e7567 YoungJun Cho 2013-03-11 583 case G2D_DST_COLOR_MODE:
2dec17c70e7567 YoungJun Cho 2013-03-11 584 case G2D_DST_LEFT_TOP:
2dec17c70e7567 YoungJun Cho 2013-03-11 585 case G2D_DST_RIGHT_BOTTOM:
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 586 reg_type = REG_TYPE_DST;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 587 break;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 588 case G2D_DST_PLANE2_BASE_ADDR:
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 589 reg_type = REG_TYPE_DST_PLANE2;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 590 break;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 591 case G2D_PAT_BASE_ADDR:
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 592 reg_type = REG_TYPE_PAT;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 593 break;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 594 case G2D_MSK_BASE_ADDR:
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 595 reg_type = REG_TYPE_MSK;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 596 break;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 597 default:
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 598 reg_type = REG_TYPE_NONE;
6f83d20838c099 Inki Dae 2019-04-15 599 DRM_DEV_ERROR(g2d->dev, "Unknown register offset![%d]\n",
6f83d20838c099 Inki Dae 2019-04-15 600 reg_offset);
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 601 break;
5cdbc8d993074f Sachin Kamat 2014-01-16 602 }
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 603
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 604 return reg_type;
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 605 }
9963cb6ef9e6f9 YoungJun Cho 2013-03-13 606
2dec17c70e7567 YoungJun Cho 2013-03-11 607 static unsigned long g2d_get_buf_bpp(unsigned int format)
2dec17c70e7567 YoungJun Cho 2013-03-11 608 {
2dec17c70e7567 YoungJun Cho 2013-03-11 609 unsigned long bpp;
2dec17c70e7567 YoungJun Cho 2013-03-11 610
2dec17c70e7567 YoungJun Cho 2013-03-11 611 switch (format) {
2dec17c70e7567 YoungJun Cho 2013-03-11 612 case G2D_FMT_XRGB8888:
2dec17c70e7567 YoungJun Cho 2013-03-11 613 case G2D_FMT_ARGB8888:
2dec17c70e7567 YoungJun Cho 2013-03-11 614 bpp = 4;
2dec17c70e7567 YoungJun Cho 2013-03-11 @615 break;
2dec17c70e7567 YoungJun Cho 2013-03-11 616 case G2D_FMT_RGB565:
2dec17c70e7567 YoungJun Cho 2013-03-11 617 case G2D_FMT_XRGB1555:
2dec17c70e7567 YoungJun Cho 2013-03-11 618 case G2D_FMT_ARGB1555:
2dec17c70e7567 YoungJun Cho 2013-03-11 619 case G2D_FMT_XRGB4444:
2dec17c70e7567 YoungJun Cho 2013-03-11 620 case G2D_FMT_ARGB4444:
2dec17c70e7567 YoungJun Cho 2013-03-11 621 bpp = 2;
2dec17c70e7567 YoungJun Cho 2013-03-11 622 break;
2dec17c70e7567 YoungJun Cho 2013-03-11 623 case G2D_FMT_PACKED_RGB888:
2dec17c70e7567 YoungJun Cho 2013-03-11 624 bpp = 3;
2dec17c70e7567 YoungJun Cho 2013-03-11 625 break;
2dec17c70e7567 YoungJun Cho 2013-03-11 626 default:
2dec17c70e7567 YoungJun Cho 2013-03-11 627 bpp = 1;
2dec17c70e7567 YoungJun Cho 2013-03-11 628 break;
2dec17c70e7567 YoungJun Cho 2013-03-11 629 }
2dec17c70e7567 YoungJun Cho 2013-03-11 630
2dec17c70e7567 YoungJun Cho 2013-03-11 631 return bpp;
2dec17c70e7567 YoungJun Cho 2013-03-11 632 }
2dec17c70e7567 YoungJun Cho 2013-03-11 633
:::::: The code at line 527 was first introduced by commit
:::::: 2a3098ff6c2109557868f9f230f4725312dcb882 drm/exynos: add userptr feature for g2d module
:::::: TO: Inki Dae <inki.dae(a)samsung.com>
:::::: CC: Inki Dae <inki.dae(a)samsung.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[tobetter-linux:odroid-5.7.y 14/15] drivers/input/touchscreen/dwav-usb-mt.c:554:28: sparse: sparse: no newline at end of file
by kbuild test robot
CC: kbuild-all(a)lists.01.org
TO: Hyeonki Hong <hhk7734(a)gmail.com>
CC: Dongjin Kim <tobetter(a)gmail.com>
tree: https://github.com/tobetter/linux odroid-5.7.y
head: de6229921716005f03f8bbd04e21262095b8fd4b
commit: 85ab26b729a3eeb1ad89f371a8e543f1f959170c [14/15] ODROID-COMMON: input/touchscreen: Add D-WAV Multitouch driver.
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-191-gc51a0382-dirty
git checkout 85ab26b729a3eeb1ad89f371a8e543f1f959170c
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
:::::: branch date: 29 hours ago
:::::: commit date: 31 hours ago
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 >>)
>> drivers/input/touchscreen/dwav-usb-mt.c:554:28: sparse: sparse: no newline at end of file
>> drivers/input/touchscreen/dwav-usb-mt.c:176:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int x @@ got restricted __be1unsigned int x @@
>> drivers/input/touchscreen/dwav-usb-mt.c:176:41: sparse: expected unsigned int x
>> drivers/input/touchscreen/dwav-usb-mt.c:176:41: sparse: got restricted __be16 [usertype]
>> drivers/input/touchscreen/dwav-usb-mt.c:178:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int y @@ got restricted __be1unsigned int y @@
>> drivers/input/touchscreen/dwav-usb-mt.c:178:41: sparse: expected unsigned int y
drivers/input/touchscreen/dwav-usb-mt.c:178:41: sparse: got restricted __be16 [usertype]
drivers/input/touchscreen/dwav-usb-mt.c:182:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int x @@ got restricted __be1unsigned int x @@
drivers/input/touchscreen/dwav-usb-mt.c:182:41: sparse: expected unsigned int x
drivers/input/touchscreen/dwav-usb-mt.c:182:41: sparse: got restricted __be16 [usertype]
drivers/input/touchscreen/dwav-usb-mt.c:184:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int y @@ got restricted __be1unsigned int y @@
drivers/input/touchscreen/dwav-usb-mt.c:184:41: sparse: expected unsigned int y
drivers/input/touchscreen/dwav-usb-mt.c:184:41: sparse: got restricted __be16 [usertype]
drivers/input/touchscreen/dwav-usb-mt.c:188:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int x @@ got restricted __be1unsigned int x @@
drivers/input/touchscreen/dwav-usb-mt.c:188:41: sparse: expected unsigned int x
drivers/input/touchscreen/dwav-usb-mt.c:188:41: sparse: got restricted __be16 [usertype]
drivers/input/touchscreen/dwav-usb-mt.c:190:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int y @@ got restricted __be1unsigned int y @@
drivers/input/touchscreen/dwav-usb-mt.c:190:41: sparse: expected unsigned int y
drivers/input/touchscreen/dwav-usb-mt.c:190:41: sparse: got restricted __be16 [usertype]
drivers/input/touchscreen/dwav-usb-mt.c:194:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int x @@ got restricted __be1unsigned int x @@
drivers/input/touchscreen/dwav-usb-mt.c:194:41: sparse: expected unsigned int x
drivers/input/touchscreen/dwav-usb-mt.c:194:41: sparse: got restricted __be16 [usertype]
drivers/input/touchscreen/dwav-usb-mt.c:196:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int y @@ got restricted __be1unsigned int y @@
drivers/input/touchscreen/dwav-usb-mt.c:196:41: sparse: expected unsigned int y
drivers/input/touchscreen/dwav-usb-mt.c:196:41: sparse: got restricted __be16 [usertype]
drivers/input/touchscreen/dwav-usb-mt.c:200:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int x @@ got restricted __be1unsigned int x @@
drivers/input/touchscreen/dwav-usb-mt.c:200:41: sparse: expected unsigned int x
drivers/input/touchscreen/dwav-usb-mt.c:200:41: sparse: got restricted __be16 [usertype]
drivers/input/touchscreen/dwav-usb-mt.c:202:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int y @@ got restricted __be1unsigned int y @@
drivers/input/touchscreen/dwav-usb-mt.c:202:41: sparse: expected unsigned int y
drivers/input/touchscreen/dwav-usb-mt.c:202:41: sparse: got restricted __be16 [usertype]
# https://github.com/tobetter/linux/commit/85ab26b729a3eeb1ad89f371a8e543f1...
git remote add tobetter-linux https://github.com/tobetter/linux
git remote update tobetter-linux
git checkout 85ab26b729a3eeb1ad89f371a8e543f1f959170c
vim +554 drivers/input/touchscreen/dwav-usb-mt.c
85ab26b729a3eeb Hyeonki Hong 2020-03-05 553
85ab26b729a3eeb Hyeonki Hong 2020-03-05 @554 MODULE_ALIAS("dwav_usb_mt");
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[yyu168-linux_cet:cet 30/47] arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: missing identifier in declaration
by Dan Carpenter
tree: https://github.com/yyu168/linux_cet.git cet
head: 80138cab012f983a4395ac70e3804739eaff02eb
commit: 0087ee9f497dcb2ae98a00a0b6c95994848c9943 [30/47] x86/cet/shstk: Handle signals for shadow stack
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-191-gc51a0382-dirty
git checkout 0087ee9f497dcb2ae98a00a0b6c95994848c9943
make ARCH=x86_64 allmodconfig
make C=1 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 >>)
>> arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: missing identifier in declaration
arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: Expected ; at the end of type declaration
arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: got {
arch/x86/include/asm/fpu/internal.h:487:1: sparse: sparse: Expected ; at the end of type declaration
arch/x86/include/asm/fpu/internal.h:487:1: sparse: sparse: got }
--
>> arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: missing identifier in declaration
arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: Expected ; at the end of type declaration
arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: got {
arch/x86/include/asm/fpu/internal.h:487:1: sparse: sparse: Expected ; at the end of type declaration
arch/x86/include/asm/fpu/internal.h:487:1: sparse: sparse: got }
arch/x86/kernel/signal.c:282:15: sparse: sparse: undefined identifier 'copy_fpstate_to_sigframe'
# https://github.com/yyu168/linux_cet/commit/0087ee9f497dcb2ae98a00a0b6c959...
git remote add yyu168-linux_cet https://github.com/yyu168/linux_cet.git
git remote update yyu168-linux_cet
git checkout 0087ee9f497dcb2ae98a00a0b6c95994848c9943
vim +485 arch/x86/include/asm/fpu/internal.h
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 479 #ifdef CONFIG_X86_INTEL_CET
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 480 extern int save_cet_to_sigframe(int ia32, void __user *fp,
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 481 unsigned long restorer);
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 482 #else
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 483 static inline int save_cet_to_sigframe(int ia32, void __user *fp,
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 484 unsigned long restorer);
^
Extra semi-colon.
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 @485 {
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 486 return 0;
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 487 }
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 488 #endif
87dafd41a4423c arch/x86/include/asm/fpu/internal.h Ingo Molnar 2015-05-25 489 extern int copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int size);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
10 months
[yyu168-linux_cet:cet 30/47] arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: missing identifier in declaration
by kbuild test robot
CC: kbuild-all(a)lists.01.org
TO: "Yu-cheng Yu" <yu-cheng.yu(a)intel.com>
tree: https://github.com/yyu168/linux_cet.git cet
head: 80138cab012f983a4395ac70e3804739eaff02eb
commit: 0087ee9f497dcb2ae98a00a0b6c95994848c9943 [30/47] x86/cet/shstk: Handle signals for shadow stack
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-191-gc51a0382-dirty
git checkout 0087ee9f497dcb2ae98a00a0b6c95994848c9943
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago
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 >>)
>> arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: missing identifier in declaration
arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: Expected ; at the end of type declaration
arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: got {
arch/x86/include/asm/fpu/internal.h:487:1: sparse: sparse: Expected ; at the end of type declaration
arch/x86/include/asm/fpu/internal.h:487:1: sparse: sparse: got }
--
>> arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: missing identifier in declaration
arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: Expected ; at the end of type declaration
arch/x86/include/asm/fpu/internal.h:485:1: sparse: sparse: got {
arch/x86/include/asm/fpu/internal.h:487:1: sparse: sparse: Expected ; at the end of type declaration
arch/x86/include/asm/fpu/internal.h:487:1: sparse: sparse: got }
arch/x86/kernel/signal.c:282:15: sparse: sparse: undefined identifier 'copy_fpstate_to_sigframe'
# https://github.com/yyu168/linux_cet/commit/0087ee9f497dcb2ae98a00a0b6c959...
git remote add yyu168-linux_cet https://github.com/yyu168/linux_cet.git
git remote update yyu168-linux_cet
git checkout 0087ee9f497dcb2ae98a00a0b6c95994848c9943
vim +485 arch/x86/include/asm/fpu/internal.h
1361b83a13d4d9 arch/x86/include/asm/fpu-internal.h Linus Torvalds 2012-02-21 478
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 479 #ifdef CONFIG_X86_INTEL_CET
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 480 extern int save_cet_to_sigframe(int ia32, void __user *fp,
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 481 unsigned long restorer);
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 482 #else
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 483 static inline int save_cet_to_sigframe(int ia32, void __user *fp,
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 484 unsigned long restorer);
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 @485 {
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 486 return 0;
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 487 }
0087ee9f497dcb arch/x86/include/asm/fpu/internal.h Yu-cheng Yu 2017-01-05 488 #endif
87dafd41a4423c arch/x86/include/asm/fpu/internal.h Ingo Molnar 2015-05-25 489 extern int copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int size);
b1b64dc3558b7b arch/x86/include/asm/fpu/internal.h Ingo Molnar 2015-05-05 490
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[dhowells-fs:afs-operation /17] fs/afs/super.c:539:61: sparse: expected struct afs_server_list *
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: 71607840c8097c9f8cd0dcada9c96a1500ce7837
commit: e54a7a021c8c23c3eaca54c7b60f99263eeec267 [/17] afs: Detect cell aliases 1 - Cells with root volumes
reproduce:
# apt-get install sparse
# sparse version:
git checkout e54a7a021c8c23c3eaca54c7b60f99263eeec267
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
:::::: branch date: 31 minutes ago
:::::: commit date: 3 days ago
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/rotate.c:28:56: sparse: warning: incorrect type in argument 1 (different address spaces)
>> fs/afs/rotate.c:28:56: sparse: expected struct afs_server_list *slist
>> fs/afs/rotate.c:28:56: sparse: got struct afs_server_list [noderef] <asn:4> *servers
fs/afs/rotate.c:176:49: sparse: error: incompatible types in comparison expression (different address spaces):
>> fs/afs/rotate.c:176:49: sparse: struct afs_server_list [noderef] <asn:4> *
>> fs/afs/rotate.c:176:49: sparse: struct afs_server_list *
fs/afs/rotate.c:266:49: sparse: error: incompatible types in comparison expression (different address spaces):
fs/afs/rotate.c:266:49: sparse: struct afs_server_list [noderef] <asn:4> *
fs/afs/rotate.c:266:49: sparse: struct afs_server_list *
--
fs/afs/super.c:539:61: sparse: warning: incorrect type in argument 2 (different address spaces)
>> fs/afs/super.c:539:61: sparse: expected struct afs_server_list *
>> fs/afs/super.c:539:61: sparse: got struct afs_server_list [noderef] <asn:4> *servers
--
fs/afs/volume.c:12:24: sparse: warning: symbol 'afs_volume_gc_delay' was not declared. Should it be static?
fs/afs/volume.c:13:24: sparse: warning: symbol 'afs_volume_record_life' was not declared. Should it be static?
fs/afs/volume.c:159:39: sparse: warning: incorrect type in argument 2 (different address spaces)
>> fs/afs/volume.c:159:39: sparse: expected struct afs_server_list *
>> fs/afs/volume.c:159:39: sparse: got struct afs_server_list [noderef] <asn:4> *servers
# 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 e54a7a021c8c23c3eaca54c7b60f99263eeec267
vim +539 fs/afs/super.c
49566f6f06b38d David Howells 2017-11-02 526
0da0b7fd73e4f2 David Howells 2018-06-15 527 static void afs_kill_super(struct super_block *sb)
0da0b7fd73e4f2 David Howells 2018-06-15 528 {
0da0b7fd73e4f2 David Howells 2018-06-15 529 struct afs_super_info *as = AFS_FS_S(sb);
0da0b7fd73e4f2 David Howells 2018-06-15 530 struct afs_net *net = afs_net(as->net_ns);
0da0b7fd73e4f2 David Howells 2018-06-15 531
0da0b7fd73e4f2 David Howells 2018-06-15 532 if (as->dyn_root)
0da0b7fd73e4f2 David Howells 2018-06-15 533 afs_dynroot_depopulate(sb);
0da0b7fd73e4f2 David Howells 2018-06-15 534
0da0b7fd73e4f2 David Howells 2018-06-15 535 /* Clear the callback interests (which will do ilookup5) before
0da0b7fd73e4f2 David Howells 2018-06-15 536 * deactivating the superblock.
0da0b7fd73e4f2 David Howells 2018-06-15 537 */
0da0b7fd73e4f2 David Howells 2018-06-15 538 if (as->volume)
0da0b7fd73e4f2 David Howells 2018-06-15 @539 afs_clear_callback_interests(net, as->volume->servers);
0da0b7fd73e4f2 David Howells 2018-06-15 540 kill_anon_super(sb);
0da0b7fd73e4f2 David Howells 2018-06-15 541 if (as->volume)
0da0b7fd73e4f2 David Howells 2018-06-15 542 afs_deactivate_volume(as->volume);
0da0b7fd73e4f2 David Howells 2018-06-15 543 afs_destroy_sbi(as);
0da0b7fd73e4f2 David Howells 2018-06-15 544 }
0da0b7fd73e4f2 David Howells 2018-06-15 545
:::::: The code at line 539 was first introduced by commit
:::::: 0da0b7fd73e4f20e1a987dfade0b36bb4813cf10 afs: Display manually added cells in dynamic root mount
:::::: TO: David Howells <dhowells(a)redhat.com>
:::::: CC: David Howells <dhowells(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[joro:sev-es-client-v5.7-rc2 44/74] arch/x86/include/asm/stacktrace.h:25:58: sparse: sparse: bad constant expression type
by kbuild test robot
CC: kbuild-all(a)lists.01.org
TO: Joerg Roedel <jroedel(a)suse.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git sev-es-client-v5.7-rc2
head: d145adbc6f48a45af59f5878a14d7ac5af86a707
commit: 21fd7de86f3a8c4fd2b66d5543e2d526f874143b [44/74] x86/dumpstack/64: Handle #VC exception stacks
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-191-gc51a0382-dirty
git checkout 21fd7de86f3a8c4fd2b66d5543e2d526f874143b
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago
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 >>)
arch/x86/include/asm/stacktrace.h:25:46: sparse: sparse: undefined identifier 'N_VC_STACKS'
>> arch/x86/include/asm/stacktrace.h:25:58: sparse: sparse: bad constant expression type
--
arch/x86/include/asm/stacktrace.h:25:46: sparse: sparse: undefined identifier 'N_VC_STACKS'
>> arch/x86/include/asm/stacktrace.h:25:58: sparse: sparse: bad constant expression type
>> arch/x86/include/asm/unwind.h:46:39: sparse: sparse: incompatible types for operation (==):
>> arch/x86/include/asm/unwind.h:46:39: sparse: bad type enum stack_type type
>> arch/x86/include/asm/unwind.h:46:39: sparse: int
--
arch/x86/include/asm/stacktrace.h:25:46: sparse: sparse: undefined identifier 'N_VC_STACKS'
>> arch/x86/include/asm/stacktrace.h:25:58: sparse: sparse: bad constant expression type
arch/x86/kernel/traps.c:969:9: sparse: sparse: undefined identifier 'sev_es_init_vc_handling'
--
arch/x86/include/asm/stacktrace.h:25:46: sparse: sparse: undefined identifier 'N_VC_STACKS'
>> arch/x86/include/asm/stacktrace.h:25:58: sparse: sparse: bad constant expression type
>> arch/x86/kernel/dumpstack_32.c:23:18: sparse: sparse: incompatible types for operation (==):
>> arch/x86/kernel/dumpstack_32.c:23:18: sparse: bad type enum stack_type type
>> arch/x86/kernel/dumpstack_32.c:23:18: sparse: int
arch/x86/kernel/dumpstack_32.c:26:18: sparse: sparse: incompatible types for operation (==):
arch/x86/kernel/dumpstack_32.c:26:18: sparse: bad type enum stack_type type
arch/x86/kernel/dumpstack_32.c:26:18: sparse: int
arch/x86/kernel/dumpstack_32.c:29:18: sparse: sparse: incompatible types for operation (==):
arch/x86/kernel/dumpstack_32.c:29:18: sparse: bad type enum stack_type type
arch/x86/kernel/dumpstack_32.c:29:18: sparse: int
arch/x86/kernel/dumpstack_32.c:32:18: sparse: sparse: incompatible types for operation (==):
arch/x86/kernel/dumpstack_32.c:32:18: sparse: bad type enum stack_type type
arch/x86/kernel/dumpstack_32.c:32:18: sparse: int
arch/x86/kernel/dumpstack_32.c:147:40: sparse: sparse: incompatible types for operation (<<):
>> arch/x86/kernel/dumpstack_32.c:147:40: sparse: unsigned long
arch/x86/kernel/dumpstack_32.c:147:40: sparse: bad type enum stack_type type
arch/x86/kernel/dumpstack_32.c:151:36: sparse: sparse: incompatible types for operation (<<):
arch/x86/kernel/dumpstack_32.c:151:36: sparse: unsigned long
arch/x86/kernel/dumpstack_32.c:151:36: sparse: bad type enum stack_type type
--
arch/x86/include/asm/stacktrace.h:25:46: sparse: sparse: undefined identifier 'N_VC_STACKS'
>> arch/x86/include/asm/stacktrace.h:25:58: sparse: sparse: bad constant expression type
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: sparse: incompatible types for operation (!=):
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: bad type enum stack_type type
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: int
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: sparse: incompatible types for operation (!=):
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: bad type enum stack_type type
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: int
>> arch/x86/include/asm/unwind.h:46:39: sparse: sparse: incompatible types for operation (==):
>> arch/x86/include/asm/unwind.h:46:39: sparse: bad type enum stack_type type
>> arch/x86/include/asm/unwind.h:46:39: sparse: int
>> arch/x86/include/asm/unwind.h:46:39: sparse: sparse: incompatible types for operation (==):
>> arch/x86/include/asm/unwind.h:46:39: sparse: bad type enum stack_type type
>> arch/x86/include/asm/unwind.h:46:39: sparse: int
--
arch/x86/include/asm/stacktrace.h:25:46: sparse: sparse: undefined identifier 'N_VC_STACKS'
>> arch/x86/include/asm/stacktrace.h:25:58: sparse: sparse: bad constant expression type
>> arch/x86/kernel/unwind_frame.c:230:54: sparse: sparse: incompatible types for operation (==):
>> arch/x86/kernel/unwind_frame.c:230:54: sparse: bad type enum stack_type type
>> arch/x86/kernel/unwind_frame.c:230:54: sparse: bad type enum stack_type prev_type
>> arch/x86/include/asm/unwind.h:46:39: sparse: sparse: incompatible types for operation (==):
>> arch/x86/include/asm/unwind.h:46:39: sparse: bad type enum stack_type type
>> arch/x86/include/asm/unwind.h:46:39: sparse: int
>> arch/x86/include/asm/unwind.h:46:39: sparse: sparse: incompatible types for operation (==):
>> arch/x86/include/asm/unwind.h:46:39: sparse: bad type enum stack_type type
>> arch/x86/include/asm/unwind.h:46:39: sparse: int
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: sparse: incompatible types for operation (!=):
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: bad type enum stack_type type
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: int
>> arch/x86/include/asm/unwind.h:46:39: sparse: sparse: incompatible types for operation (==):
>> arch/x86/include/asm/unwind.h:46:39: sparse: bad type enum stack_type type
>> arch/x86/include/asm/unwind.h:46:39: sparse: int
>> arch/x86/include/asm/unwind.h:46:39: sparse: sparse: incompatible types for operation (==):
>> arch/x86/include/asm/unwind.h:46:39: sparse: bad type enum stack_type type
>> arch/x86/include/asm/unwind.h:46:39: sparse: int
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: sparse: incompatible types for operation (!=):
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: bad type enum stack_type type
>> arch/x86/include/asm/stacktrace.h:48:28: sparse: int
# https://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git/commit/?id...
git remote add joro https://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git
git remote update joro
git checkout 21fd7de86f3a8c4fd2b66d5543e2d526f874143b
vim +25 arch/x86/include/asm/stacktrace.h
c9cf4dbb4d9ca7 Frederic Weisbecker 2010-05-19 15
cb76c939824042 Josh Poimboeuf 2016-09-14 16 enum stack_type {
cb76c939824042 Josh Poimboeuf 2016-09-14 17 STACK_TYPE_UNKNOWN,
cb76c939824042 Josh Poimboeuf 2016-09-14 18 STACK_TYPE_TASK,
cb76c939824042 Josh Poimboeuf 2016-09-14 19 STACK_TYPE_IRQ,
cb76c939824042 Josh Poimboeuf 2016-09-14 20 STACK_TYPE_SOFTIRQ,
4fe2d8b11a370a Dave Hansen 2017-12-04 21 STACK_TYPE_ENTRY,
cb76c939824042 Josh Poimboeuf 2016-09-14 22 STACK_TYPE_EXCEPTION,
cb76c939824042 Josh Poimboeuf 2016-09-14 23 STACK_TYPE_EXCEPTION_LAST = STACK_TYPE_EXCEPTION + N_EXCEPTION_STACKS-1,
21fd7de86f3a8c Joerg Roedel 2020-04-24 24 STACK_TYPE_VC,
21fd7de86f3a8c Joerg Roedel 2020-04-24 @25 STACK_TYPE_VC_LAST = STACK_TYPE_VC + N_VC_STACKS - 1,
cb76c939824042 Josh Poimboeuf 2016-09-14 26 };
cb76c939824042 Josh Poimboeuf 2016-09-14 27
cb76c939824042 Josh Poimboeuf 2016-09-14 28 struct stack_info {
cb76c939824042 Josh Poimboeuf 2016-09-14 29 enum stack_type type;
cb76c939824042 Josh Poimboeuf 2016-09-14 30 unsigned long *begin, *end, *next_sp;
cb76c939824042 Josh Poimboeuf 2016-09-14 31 };
cb76c939824042 Josh Poimboeuf 2016-09-14 32
cb76c939824042 Josh Poimboeuf 2016-09-14 33 bool in_task_stack(unsigned long *stack, struct task_struct *task,
cb76c939824042 Josh Poimboeuf 2016-09-14 34 struct stack_info *info);
cb76c939824042 Josh Poimboeuf 2016-09-14 35
4fe2d8b11a370a Dave Hansen 2017-12-04 36 bool in_entry_stack(unsigned long *stack, struct stack_info *info);
33a2f1a6c4d7c0 Andy Lutomirski 2017-12-04 37
cb76c939824042 Josh Poimboeuf 2016-09-14 38 int get_stack_info(unsigned long *stack, struct task_struct *task,
cb76c939824042 Josh Poimboeuf 2016-09-14 39 struct stack_info *info, unsigned long *visit_mask);
cb76c939824042 Josh Poimboeuf 2016-09-14 40
3d02a9c48d479e Josh Poimboeuf 2016-11-18 41 const char *stack_type_name(enum stack_type type);
cb76c939824042 Josh Poimboeuf 2016-09-14 42
cb76c939824042 Josh Poimboeuf 2016-09-14 43 static inline bool on_stack(struct stack_info *info, void *addr, size_t len)
cb76c939824042 Josh Poimboeuf 2016-09-14 44 {
cb76c939824042 Josh Poimboeuf 2016-09-14 45 void *begin = info->begin;
cb76c939824042 Josh Poimboeuf 2016-09-14 46 void *end = info->end;
cb76c939824042 Josh Poimboeuf 2016-09-14 47
cb76c939824042 Josh Poimboeuf 2016-09-14 @48 return (info->type != STACK_TYPE_UNKNOWN &&
cb76c939824042 Josh Poimboeuf 2016-09-14 49 addr >= begin && addr < end &&
cb76c939824042 Josh Poimboeuf 2016-09-14 50 addr + len > begin && addr + len <= end);
cb76c939824042 Josh Poimboeuf 2016-09-14 51 }
cb76c939824042 Josh Poimboeuf 2016-09-14 52
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[dm:for-next 29/30] drivers/md/dm-ebs-target.c:190:32: sparse: expected restricted blk_status_t [usertype] bi_status
by kbuild test robot
CC: kbuild-all(a)lists.01.org
CC: dm-devel(a)redhat.com
TO: Heinz Mauelshagen <heinzm(a)redhat.com>
CC: Mike Snitzer <snitzer(a)redhat.com>
CC: Damien Le Moal <DamienLeMoal(a)wdc.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next
head: ddc1316e185f6ab4a74656b4879a15ec23cdec31
commit: eeb17d25430dc2b3251a5abfec6a3b9160daaef6 [29/30] dm ebs: new block size emulating target
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-191-gc51a0382-dirty
git checkout eeb17d25430dc2b3251a5abfec6a3b9160daaef6
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
:::::: branch date: 7 hours ago
:::::: commit date: 30 hours ago
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 >>)
drivers/md/dm-ebs-target.c:190:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted blk_status_t [usertype] bi_status @@ got s_t [usertype] bi_status @@
>> drivers/md/dm-ebs-target.c:190:32: sparse: expected restricted blk_status_t [usertype] bi_status
>> drivers/md/dm-ebs-target.c:190:32: sparse: got int [assigned] r
drivers/md/dm-ebs-target.c:423:12: sparse: sparse: symbol 'dm_ebs_init' was not declared. Should it be static?
drivers/md/dm-ebs-target.c:433:6: sparse: sparse: symbol 'dm_ebs_exit' was not declared. Should it be static?
# https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.gi...
git remote add dm https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
git remote update dm
git checkout eeb17d25430dc2b3251a5abfec6a3b9160daaef6
vim +190 drivers/md/dm-ebs-target.c
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 146
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 147 /* Worker funtion to process incoming bios. */
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 148 static void __ebs_process_bios(struct work_struct *ws)
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 149 {
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 150 int r;
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 151 bool write = false;
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 152 sector_t block1, block2;
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 153 struct ebs_c *ec = container_of(ws, struct ebs_c, ws);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 154 struct bio *bio;
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 155 struct bio_list bios;
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 156
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 157 bio_list_init(&bios);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 158
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 159 spin_lock_irq(&ec->lock);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 160 bios = ec->bios_in;
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 161 bio_list_init(&ec->bios_in);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 162 spin_unlock_irq(&ec->lock);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 163
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 164 /* Prefetch all read and any mis-aligned write buffers */
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 165 bio_list_for_each(bio, &bios) {
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 166 block1 = __sector_to_block(ec, bio->bi_iter.bi_sector);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 167 if (bio_op(bio) == REQ_OP_READ)
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 168 dm_bufio_prefetch(ec->bufio, block1, __nr_blocks(ec, bio));
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 169 else if (bio_op(bio) == REQ_OP_WRITE && !(bio->bi_opf & REQ_PREFLUSH)) {
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 170 block2 = __sector_to_block(ec, bio_end_sector(bio));
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 171 if (__block_mod(bio->bi_iter.bi_sector, ec->u_bs))
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 172 dm_bufio_prefetch(ec->bufio, block1, 1);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 173 if (__block_mod(bio_end_sector(bio), ec->u_bs) && block2 != block1)
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 174 dm_bufio_prefetch(ec->bufio, block2, 1);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 175 }
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 176 }
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 177
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 178 bio_list_for_each(bio, &bios) {
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 179 r = -EIO;
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 180 if (bio_op(bio) == REQ_OP_READ)
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 181 r = __ebs_rw_bio(ec, READ, bio);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 182 else if (bio_op(bio) == REQ_OP_WRITE) {
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 183 write = true;
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 184 r = __ebs_rw_bio(ec, WRITE, bio);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 185 } else if (bio_op(bio) == REQ_OP_DISCARD) {
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 186 /* FIXME: (optionally) call dm_bufio_discard_buffers() once upstream. */
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 187 r = __ebs_forget_bio(ec, bio);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 188 }
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 189
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 @190 bio->bi_status = r;
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 191 }
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 192
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 193 /*
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 194 * We write dirty buffers after processing I/O on them
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 195 * but before we endio thus addressing REQ_FUA/REQ_SYNC.
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 196 */
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 197 r = write ? dm_bufio_write_dirty_buffers(ec->bufio) : 0;
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 198
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 199 while ((bio = bio_list_pop(&bios))) {
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 200 /* Any other request is endioed. */
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 201 if (unlikely(r && bio_op(bio) == REQ_OP_WRITE))
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 202 bio_io_error(bio);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 203 else
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 204 bio_endio(bio);
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 205 }
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 206 }
eeb17d25430dc2 Heinz Mauelshagen 2020-03-09 207
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[lkundrak-linux-mmp:lr/mmp3-hsic-phy 3/3] drivers/phy/marvell/phy-mmp3-hsic.c:61:31: sparse: sparse: cast removes address space '<asn:2>' of expression
by kbuild test robot
CC: kbuild-all(a)lists.01.org
TO: Lubomir Rintel <lkundrak(a)v3.sk>
tree: git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git lr/mmp3-hsic-phy
head: 2e517a94639d84fdd929005f5bbc688722670b3e
commit: 2e517a94639d84fdd929005f5bbc688722670b3e [3/3] phy: Add USB HSIC PHY driver for Marvell MMP3 SoC
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-191-gc51a0382-dirty
git checkout 2e517a94639d84fdd929005f5bbc688722670b3e
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago
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 >>)
>> drivers/phy/marvell/phy-mmp3-hsic.c:61:31: sparse: sparse: cast removes address space '<asn:2>' of expression
# https://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git/co...
git remote add lkundrak-linux-mmp git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git
git remote update lkundrak-linux-mmp
git checkout 2e517a94639d84fdd929005f5bbc688722670b3e
vim +61 drivers/phy/marvell/phy-mmp3-hsic.c
2e517a94639d84 Lubomir Rintel 2020-03-08 39
2e517a94639d84 Lubomir Rintel 2020-03-08 40 static int mmp3_hsic_phy_probe(struct platform_device *pdev)
2e517a94639d84 Lubomir Rintel 2020-03-08 41 {
2e517a94639d84 Lubomir Rintel 2020-03-08 42 struct device *dev = &pdev->dev;
2e517a94639d84 Lubomir Rintel 2020-03-08 43 struct phy_provider *provider;
2e517a94639d84 Lubomir Rintel 2020-03-08 44 struct resource *resource;
2e517a94639d84 Lubomir Rintel 2020-03-08 45 void __iomem *base;
2e517a94639d84 Lubomir Rintel 2020-03-08 46 struct phy *phy;
2e517a94639d84 Lubomir Rintel 2020-03-08 47
2e517a94639d84 Lubomir Rintel 2020-03-08 48 resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2e517a94639d84 Lubomir Rintel 2020-03-08 49 base = devm_ioremap_resource(dev, resource);
2e517a94639d84 Lubomir Rintel 2020-03-08 50 if (IS_ERR(base)) {
2e517a94639d84 Lubomir Rintel 2020-03-08 51 dev_err(dev, "failed to remap PHY regs\n");
2e517a94639d84 Lubomir Rintel 2020-03-08 52 return PTR_ERR(base);
2e517a94639d84 Lubomir Rintel 2020-03-08 53 }
2e517a94639d84 Lubomir Rintel 2020-03-08 54
2e517a94639d84 Lubomir Rintel 2020-03-08 55 phy = devm_phy_create(dev, NULL, &mmp3_hsic_phy_ops);
2e517a94639d84 Lubomir Rintel 2020-03-08 56 if (IS_ERR(phy)) {
2e517a94639d84 Lubomir Rintel 2020-03-08 57 dev_err(dev, "failed to create PHY\n");
2e517a94639d84 Lubomir Rintel 2020-03-08 58 return PTR_ERR(phy);
2e517a94639d84 Lubomir Rintel 2020-03-08 59 }
2e517a94639d84 Lubomir Rintel 2020-03-08 60
2e517a94639d84 Lubomir Rintel 2020-03-08 @61 phy_set_drvdata(phy, (void *)base);
2e517a94639d84 Lubomir Rintel 2020-03-08 62 provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
2e517a94639d84 Lubomir Rintel 2020-03-08 63 if (IS_ERR(provider)) {
2e517a94639d84 Lubomir Rintel 2020-03-08 64 dev_err(dev, "failed to register PHY provider\n");
2e517a94639d84 Lubomir Rintel 2020-03-08 65 return PTR_ERR(provider);
2e517a94639d84 Lubomir Rintel 2020-03-08 66 }
2e517a94639d84 Lubomir Rintel 2020-03-08 67
2e517a94639d84 Lubomir Rintel 2020-03-08 68 return 0;
2e517a94639d84 Lubomir Rintel 2020-03-08 69 }
2e517a94639d84 Lubomir Rintel 2020-03-08 70
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH bpf-next 1/2] bpf: Change error code when ops is NULL
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200422083010.28000-2-maowenan(a)huawei.com>
References: <20200422083010.28000-2-maowenan(a)huawei.com>
TO: Mao Wenan <maowenan(a)huawei.com>
TO: ast(a)kernel.org
TO: daniel(a)iogearbox.net
TO: kafai(a)fb.com
TO: songliubraving(a)fb.com
TO: yhs(a)fb.com
TO: andriin(a)fb.com
TO: john.fastabend(a)gmail.com
TO: kpsingh(a)chromium.org
CC: netdev(a)vger.kernel.org
CC: bpf(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: kernel-janitors(a)vger.kernel.org
Hi Mao,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master net/master net-next/master ipvs/master v5.7-rc2 next-20200423]
[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/Mao-Wenan/Change-return-code-if-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-191-gc51a0382-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
:::::: branch date: 19 hours ago
:::::: commit date: 19 hours ago
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 >>)
>> kernel/bpf/syscall.c:117:0: sparse: sparse: missing terminating " character
kernel/bpf/syscall.c:118:0: sparse: sparse: missing terminating " character
>> kernel/bpf/syscall.c:686:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:772:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:979:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:1046:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:1111:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:1164:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:1341:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:1442:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:1504:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:1548:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:1550:1: sparse: sparse: directive in macro's argument list
kernel/bpf/syscall.c:1551:1: sparse: sparse: directive in macro's argument list
>> kernel/bpf/syscall.c:116:17: sparse: sparse: macro "pr_warn" passed 2 arguments, but takes just 2
>> include/linux/bpf_types.h:7:1: sparse: sparse: No right hand side of ','-expression
include/linux/bpf_types.h:7:1: sparse: sparse: Expected ; at end of statement
include/linux/bpf_types.h:7:1: sparse: sparse: got [
include/linux/bpf_types.h:121:0: sparse: sparse: Expected } at end of compound statement
include/linux/bpf_types.h:121:0: sparse: sparse: got end-of-input
include/linux/bpf_types.h:121:0: sparse: sparse: Expected } at end of function
include/linux/bpf_types.h:121:0: sparse: sparse: got end-of-input
kernel/bpf/syscall.c:116:17: sparse: sparse: undefined identifier 'pr_warn'
kernel/bpf/syscall.c:1560:21: sparse: sparse: undefined identifier 'bpf_prog_types'
kernel/bpf/syscall.c:1560:21: sparse: sparse: undefined identifier 'bpf_prog_types'
kernel/bpf/syscall.c:1562:16: sparse: sparse: undefined identifier 'bpf_prog_types'
kernel/bpf/syscall.c:1562:16: sparse: sparse: undefined identifier 'bpf_prog_types'
kernel/bpf/syscall.c:1562:16: sparse: sparse: undefined identifier 'bpf_prog_types'
kernel/bpf/syscall.c:1562:16: sparse: sparse: undefined identifier 'bpf_prog_types'
>> kernel/bpf/syscall.c:1562:16: sparse: sparse: cannot size expression
kernel/bpf/syscall.c:1563:15: sparse: sparse: undefined identifier 'bpf_prog_types'
kernel/bpf/syscall.c:1797:27: sparse: sparse: undefined identifier 'bpf_dummy_read'
kernel/bpf/syscall.c:1798:27: sparse: sparse: undefined identifier 'bpf_dummy_write'
kernel/bpf/syscall.c:2293:27: sparse: sparse: undefined identifier 'bpf_dummy_read'
kernel/bpf/syscall.c:2294:27: sparse: sparse: undefined identifier 'bpf_dummy_write'
kernel/bpf/syscall.c:2870:23: sparse: sparse: undefined identifier '__bpf_map_inc_not_zero'
kernel/bpf/syscall.c:3538:15: sparse: sparse: undefined identifier 'map_get_sys_perms'
kernel/bpf/syscall.c:3544:15: sparse: sparse: undefined identifier 'map_get_sys_perms'
kernel/bpf/syscall.c:3685:23: sparse: sparse: undefined identifier 'map_create'
kernel/bpf/syscall.c:3688:23: sparse: sparse: undefined identifier 'map_lookup_elem'
kernel/bpf/syscall.c:3691:23: sparse: sparse: undefined identifier 'map_update_elem'
kernel/bpf/syscall.c:3694:23: sparse: sparse: undefined identifier 'map_delete_elem'
kernel/bpf/syscall.c:3697:23: sparse: sparse: undefined identifier 'map_get_next_key'
kernel/bpf/syscall.c:3700:23: sparse: sparse: undefined identifier 'map_freeze'
kernel/bpf/syscall.c:3757:23: sparse: sparse: undefined identifier 'map_lookup_and_delete_elem'
# https://github.com/0day-ci/linux/commit/45c88e856945c443c39e3f519ad9740b8...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 45c88e856945c443c39e3f519ad9740b8e487d8d
vim +117 kernel/bpf/syscall.c
a38845729ea398 Jakub Kicinski 2018-01-11 103
99c55f7d47c0dc Alexei Starovoitov 2014-09-26 104 static struct bpf_map *find_and_alloc_map(union bpf_attr *attr)
99c55f7d47c0dc Alexei Starovoitov 2014-09-26 105 {
1110f3a9bcf394 Jakub Kicinski 2018-01-11 106 const struct bpf_map_ops *ops;
9ef09e35e521bf Mark Rutland 2018-05-03 107 u32 type = attr->map_type;
99c55f7d47c0dc Alexei Starovoitov 2014-09-26 108 struct bpf_map *map;
1110f3a9bcf394 Jakub Kicinski 2018-01-11 109 int err;
99c55f7d47c0dc Alexei Starovoitov 2014-09-26 110
9ef09e35e521bf Mark Rutland 2018-05-03 111 if (type >= ARRAY_SIZE(bpf_map_types))
1110f3a9bcf394 Jakub Kicinski 2018-01-11 112 return ERR_PTR(-EINVAL);
9ef09e35e521bf Mark Rutland 2018-05-03 113 type = array_index_nospec(type, ARRAY_SIZE(bpf_map_types));
9ef09e35e521bf Mark Rutland 2018-05-03 114 ops = bpf_map_types[type];
45c88e856945c4 Mao Wenan 2020-04-22 115 if (!ops) {
45c88e856945c4 Mao Wenan 2020-04-22 @116 pr_warn("map type %d not supported or
45c88e856945c4 Mao Wenan 2020-04-22 @117 kernel config not opened\n", type);
45c88e856945c4 Mao Wenan 2020-04-22 118 return ERR_PTR(-EOPNOTSUPP);
45c88e856945c4 Mao Wenan 2020-04-22 119 }
1110f3a9bcf394 Jakub Kicinski 2018-01-11 120 if (ops->map_alloc_check) {
1110f3a9bcf394 Jakub Kicinski 2018-01-11 121 err = ops->map_alloc_check(attr);
1110f3a9bcf394 Jakub Kicinski 2018-01-11 122 if (err)
1110f3a9bcf394 Jakub Kicinski 2018-01-11 123 return ERR_PTR(err);
1110f3a9bcf394 Jakub Kicinski 2018-01-11 124 }
a38845729ea398 Jakub Kicinski 2018-01-11 125 if (attr->map_ifindex)
a38845729ea398 Jakub Kicinski 2018-01-11 126 ops = &bpf_map_offload_ops;
1110f3a9bcf394 Jakub Kicinski 2018-01-11 127 map = ops->map_alloc(attr);
99c55f7d47c0dc Alexei Starovoitov 2014-09-26 128 if (IS_ERR(map))
99c55f7d47c0dc Alexei Starovoitov 2014-09-26 129 return map;
1110f3a9bcf394 Jakub Kicinski 2018-01-11 130 map->ops = ops;
9ef09e35e521bf Mark Rutland 2018-05-03 131 map->map_type = type;
99c55f7d47c0dc Alexei Starovoitov 2014-09-26 132 return map;
99c55f7d47c0dc Alexei Starovoitov 2014-09-26 133 }
99c55f7d47c0dc Alexei Starovoitov 2014-09-26 134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week