net/dccp/ccids/ccid3.c:474:25: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a90af8f15bdc9449ee2d24e1d73fa3f7e8633f81
commit: d991bb1c8da842a2a0b9dc83b1005e655783f861 include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*()
date: 7 months ago
config: mips-randconfig-s032-20211116 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# 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 fetch --no-tags linus master
git checkout d991bb1c8da842a2a0b9dc83b1005e655783f861
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
>> net/dccp/ccids/ccid3.c:474:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] opt_val @@ got unsigned int [usertype] @@
net/dccp/ccids/ccid3.c:474:25: sparse: expected restricted __be32 [usertype] opt_val
net/dccp/ccids/ccid3.c:474:25: sparse: got unsigned int [usertype]
net/dccp/ccids/ccid3.c:478:39: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] tx_x_recv @@ got restricted __be32 [usertype] opt_val @@
net/dccp/ccids/ccid3.c:478:39: sparse: expected unsigned long long [usertype] tx_x_recv
net/dccp/ccids/ccid3.c:478:39: sparse: got restricted __be32 [usertype] opt_val
net/dccp/ccids/ccid3.c:485:64: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] loss_event_rate @@ got restricted __be32 [usertype] opt_val @@
net/dccp/ccids/ccid3.c:485:64: sparse: expected unsigned int [usertype] loss_event_rate
net/dccp/ccids/ccid3.c:485:64: sparse: got restricted __be32 [usertype] opt_val
vim +474 net/dccp/ccids/ccid3.c
7c657876b63cb1 Arnaldo Carvalho de Melo 2005-08-09 456
4874c131d79695 Gerrit Renker 2010-09-19 457 static int ccid3_hc_tx_parse_options(struct sock *sk, u8 packet_type,
4874c131d79695 Gerrit Renker 2010-09-19 458 u8 option, u8 *optval, u8 optlen)
7c657876b63cb1 Arnaldo Carvalho de Melo 2005-08-09 459 {
996ccf49005662 Gerrit Renker 2009-10-05 460 struct ccid3_hc_tx_sock *hc = ccid3_hc_tx_sk(sk);
76fd1e87d9456c Gerrit Renker 2007-10-24 461 __be32 opt_val;
7c657876b63cb1 Arnaldo Carvalho de Melo 2005-08-09 462
410e27a49bb98b Gerrit Renker 2008-09-09 463 switch (option) {
37efb03fbd0935 Gerrit Renker 2010-09-14 464 case TFRC_OPT_RECEIVE_RATE:
410e27a49bb98b Gerrit Renker 2008-09-09 465 case TFRC_OPT_LOSS_EVENT_RATE:
4874c131d79695 Gerrit Renker 2010-09-19 466 /* Must be ignored on Data packets, cf. RFC 4342 8.3 and 8.5 */
4874c131d79695 Gerrit Renker 2010-09-19 467 if (packet_type == DCCP_PKT_DATA)
4874c131d79695 Gerrit Renker 2010-09-19 468 break;
4874c131d79695 Gerrit Renker 2010-09-19 469 if (unlikely(optlen != 4)) {
37efb03fbd0935 Gerrit Renker 2010-09-14 470 DCCP_WARN("%s(%p), invalid len %d for %u\n",
4874c131d79695 Gerrit Renker 2010-09-19 471 dccp_role(sk), sk, optlen, option);
37efb03fbd0935 Gerrit Renker 2010-09-14 472 return -EINVAL;
7c657876b63cb1 Arnaldo Carvalho de Melo 2005-08-09 473 }
4874c131d79695 Gerrit Renker 2010-09-19 @474 opt_val = ntohl(get_unaligned((__be32 *)optval));
37efb03fbd0935 Gerrit Renker 2010-09-14 475
37efb03fbd0935 Gerrit Renker 2010-09-14 476 if (option == TFRC_OPT_RECEIVE_RATE) {
536bb20b45dee3 Gerrit Renker 2010-09-19 477 /* Receive Rate is kept in units of 64 bytes/second */
536bb20b45dee3 Gerrit Renker 2010-09-19 478 hc->tx_x_recv = opt_val;
536bb20b45dee3 Gerrit Renker 2010-09-19 479 hc->tx_x_recv <<= 6;
536bb20b45dee3 Gerrit Renker 2010-09-19 480
410e27a49bb98b Gerrit Renker 2008-09-09 481 ccid3_pr_debug("%s(%p), RECEIVE_RATE=%u\n",
37efb03fbd0935 Gerrit Renker 2010-09-14 482 dccp_role(sk), sk, opt_val);
37efb03fbd0935 Gerrit Renker 2010-09-14 483 } else {
536bb20b45dee3 Gerrit Renker 2010-09-19 484 /* Update the fixpoint Loss Event Rate fraction */
536bb20b45dee3 Gerrit Renker 2010-09-19 485 hc->tx_p = tfrc_invert_loss_event_rate(opt_val);
536bb20b45dee3 Gerrit Renker 2010-09-19 486
37efb03fbd0935 Gerrit Renker 2010-09-14 487 ccid3_pr_debug("%s(%p), LOSS_EVENT_RATE=%u\n",
37efb03fbd0935 Gerrit Renker 2010-09-14 488 dccp_role(sk), sk, opt_val);
7c657876b63cb1 Arnaldo Carvalho de Melo 2005-08-09 489 }
410e27a49bb98b Gerrit Renker 2008-09-09 490 }
37efb03fbd0935 Gerrit Renker 2010-09-14 491 return 0;
7c657876b63cb1 Arnaldo Carvalho de Melo 2005-08-09 492 }
7c657876b63cb1 Arnaldo Carvalho de Melo 2005-08-09 493
:::::: The code at line 474 was first introduced by commit
:::::: 4874c131d79695e3d372042781a408a1a8a762d8 dccp: Add packet type information to CCID-specific option parsing
:::::: TO: Gerrit Renker <gerrit(a)erg.abdn.ac.uk>
:::::: CC: Gerrit Renker <gerrit(a)erg.abdn.ac.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[PATCH] media: platform: vxd: Kconfig: fix noderef.cocci warnings
by Julia Lawall
From: kernel test robot <lkp(a)intel.com>
sizeof when applied to a pointer typed expression gives the size of
the pointer
Generated by: scripts/coccinelle/misc/noderef.cocci
CC: Sidraya <sidraya.bj(a)pathpartnertech.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Julia Lawall <julia.lawall(a)inria.fr>
---
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 0c67d996db8f3c9149598bc98657ae28fee22208
commit: 97dfdd999ba7266785579c99c40a3c65e63e864a [10173/10206] media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile
:::::: branch date: 2 days ago
:::::: commit date: 9 days ago
work_queue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/media/platform/vxe-vxd/common/work_queue.c
+++ b/drivers/media/platform/vxe-vxd/common/work_queue.c
@@ -39,7 +39,7 @@ void init_work(void **work_args, void *w
//create a link
struct node *link = kmalloc(sizeof(*link), GFP_KERNEL);
- *work = kzalloc(sizeof(*work), GFP_KERNEL);
+ *work = kzalloc(sizeof(**work), GFP_KERNEL);
if (!(*work)) {
pr_err("Memory allocation failed for work_queue\n");
return;
@@ -62,7 +62,7 @@ void init_delayed_work(void **work_args,
//create a link
struct node *link = kmalloc(sizeof(*link), GFP_KERNEL);
- *work = kzalloc(sizeof(*work), GFP_KERNEL);
+ *work = kzalloc(sizeof(**work), GFP_KERNEL);
if (!(*work)) {
pr_err("Memory allocation failed for delayed_work_queue\n");
return;
10 months
Re: [PATCH v13 2/3] fpga: bridge: Use standard dev_release for class driver
by kernel test robot
Hi Russ,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.16-rc1 next-20211118]
[cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Russ-Weight/fpga-Use-standard-cl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8ab774587903771821b59471cc723bba6d893942
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/cbab51e5108b1de0ce5fca9901f5b462c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Russ-Weight/fpga-Use-standard-class-dev_release-function/20211117-092426
git checkout cbab51e5108b1de0ce5fca9901f5b462cc62a71d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/fpga/altera-fpga2sdram.c: In function 'alt_fpga_bridge_probe':
>> drivers/fpga/altera-fpga2sdram.c:127:32: error: 'mgr' undeclared (first use in this function)
127 | return PTR_ERR(mgr);
| ^~~
drivers/fpga/altera-fpga2sdram.c:127:32: note: each undeclared identifier is reported only once for each function it appears in
vim +/mgr +127 drivers/fpga/altera-fpga2sdram.c
93
94 static int alt_fpga_bridge_probe(struct platform_device *pdev)
95 {
96 struct device *dev = &pdev->dev;
97 struct alt_fpga2sdram_data *priv;
98 struct fpga_bridge *br;
99 u32 enable;
100 struct regmap *sysmgr;
101 int ret = 0;
102
103 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
104 if (!priv)
105 return -ENOMEM;
106
107 priv->dev = dev;
108
109 priv->sdrctl = syscon_regmap_lookup_by_compatible("altr,sdr-ctl");
110 if (IS_ERR(priv->sdrctl)) {
111 dev_err(dev, "regmap for altr,sdr-ctl lookup failed.\n");
112 return PTR_ERR(priv->sdrctl);
113 }
114
115 sysmgr = syscon_regmap_lookup_by_compatible("altr,sys-mgr");
116 if (IS_ERR(sysmgr)) {
117 dev_err(dev, "regmap for altr,sys-mgr lookup failed.\n");
118 return PTR_ERR(sysmgr);
119 }
120
121 /* Get f2s bridge configuration saved in handoff register */
122 regmap_read(sysmgr, SYSMGR_ISWGRP_HANDOFF3, &priv->mask);
123
124 br = fpga_bridge_register(dev, F2S_BRIDGE_NAME,
125 &altera_fpga2sdram_br_ops, priv);
126 if (IS_ERR(br))
> 127 return PTR_ERR(mgr);
128
129 platform_set_drvdata(pdev, br);
130
131 dev_info(dev, "driver initialized with handoff %08x\n", priv->mask);
132
133 if (!of_property_read_u32(dev->of_node, "bridge-enable", &enable)) {
134 if (enable > 1) {
135 dev_warn(dev, "invalid bridge-enable %u > 1\n", enable);
136 } else {
137 dev_info(dev, "%s bridge\n",
138 (enable ? "enabling" : "disabling"));
139 ret = _alt_fpga2sdram_enable_set(priv, enable);
140 if (ret) {
141 fpga_bridge_unregister(br);
142 return ret;
143 }
144 }
145 }
146
147 return ret;
148 }
149
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH v4 1/6] drm/i915: Add support for moving fence waiting
by kernel test robot
Hi "Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-tip/drm-tip]
[also build test ERROR on drm-exynos/exynos-drm-next drm/drm-next v5.16-rc1 next-20211118]
[cannot apply to drm-intel/for-linux-next tegra-drm/drm/tegra/for-next airlied/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Thomas-Hellstr-m/drm-i915-ttm-As...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-randconfig-r001-20211118 (attached as .config)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/316dda0c6b91d043111cb348b43be6a6f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Hellstr-m/drm-i915-ttm-Async-migration/20211118-210436
git checkout 316dda0c6b91d043111cb348b43be6a6f2e3bb0a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/i915/i915_vma.c:478:13: error: implicit declaration of function 'i915_vma_verify_bind_complete' [-Werror,-Wimplicit-function-declaration]
GEM_BUG_ON(i915_vma_verify_bind_complete(vma));
^
1 error generated.
vim +/i915_vma_verify_bind_complete +478 drivers/gpu/drm/i915/i915_vma.c
463
464 void __iomem *i915_vma_pin_iomap(struct i915_vma *vma)
465 {
466 void __iomem *ptr;
467 int err;
468
469 if (!i915_gem_object_is_lmem(vma->obj)) {
470 if (GEM_WARN_ON(!i915_vma_is_map_and_fenceable(vma))) {
471 err = -ENODEV;
472 goto err;
473 }
474 }
475
476 GEM_BUG_ON(!i915_vma_is_ggtt(vma));
477 GEM_BUG_ON(!i915_vma_is_bound(vma, I915_VMA_GLOBAL_BIND));
> 478 GEM_BUG_ON(i915_vma_verify_bind_complete(vma));
479
480 ptr = READ_ONCE(vma->iomap);
481 if (ptr == NULL) {
482 /*
483 * TODO: consider just using i915_gem_object_pin_map() for lmem
484 * instead, which already supports mapping non-contiguous chunks
485 * of pages, that way we can also drop the
486 * I915_BO_ALLOC_CONTIGUOUS when allocating the object.
487 */
488 if (i915_gem_object_is_lmem(vma->obj))
489 ptr = i915_gem_object_lmem_io_map(vma->obj, 0,
490 vma->obj->base.size);
491 else
492 ptr = io_mapping_map_wc(&i915_vm_to_ggtt(vma->vm)->iomap,
493 vma->node.start,
494 vma->node.size);
495 if (ptr == NULL) {
496 err = -ENOMEM;
497 goto err;
498 }
499
500 if (unlikely(cmpxchg(&vma->iomap, NULL, ptr))) {
501 io_mapping_unmap(ptr);
502 ptr = vma->iomap;
503 }
504 }
505
506 __i915_vma_pin(vma);
507
508 err = i915_vma_pin_fence(vma);
509 if (err)
510 goto err_unpin;
511
512 i915_vma_set_ggtt_write(vma);
513
514 /* NB Access through the GTT requires the device to be awake. */
515 return ptr;
516
517 err_unpin:
518 __i915_vma_unpin(vma);
519 err:
520 return IO_ERR_PTR(err);
521 }
522
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[android-common:android12-5.10-2021-09 1943/10852] kernel/sched/core.c:6995:5: warning: no previous prototype for function '_sched_cpu_deactivate'
by kernel test robot
Hi Vincent,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android12-5.10-2021-09
head: cac628d5320f43641e9fb9285d972060b61ca2de
commit: 683010f555d804c2b9b01d327767755fa78a3ce5 [1943/10852] ANDROID: cpu/hotplug: add pause/resume_cpus interface
config: x86_64-randconfig-r033-20210928 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10-2021-09
git checkout 683010f555d804c2b9b01d327767755fa78a3ce5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/core.c:2410:6: warning: no previous prototype for function 'sched_set_stop_task' [-Wmissing-prototypes]
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
kernel/sched/core.c:2410:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
static
kernel/sched/core.c:4690:35: warning: no previous prototype for function 'schedule_user' [-Wmissing-prototypes]
asmlinkage __visible void __sched schedule_user(void)
^
kernel/sched/core.c:4690:22: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage __visible void __sched schedule_user(void)
^
static
>> kernel/sched/core.c:6995:5: warning: no previous prototype for function '_sched_cpu_deactivate' [-Wmissing-prototypes]
int _sched_cpu_deactivate(unsigned int cpu)
^
kernel/sched/core.c:6995:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int _sched_cpu_deactivate(unsigned int cpu)
^
static
kernel/sched/core.c:330:1: warning: unused function 'rq_csd_init' [-Wunused-function]
rq_csd_init(struct rq *rq, call_single_data_t *csd, smp_call_func_t func)
^
4 warnings generated.
vim +/_sched_cpu_deactivate +6995 kernel/sched/core.c
6994
> 6995 int _sched_cpu_deactivate(unsigned int cpu)
6996 {
6997 int ret;
6998
6999 set_cpu_active(cpu, false);
7000
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
drivers/net/ethernet/korina.c:391:20: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
Hi Thomas,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a90af8f15bdc9449ee2d24e1d73fa3f7e8633f81
commit: 6ef92063bf94cd8a6fa9fea3a82596955eb25424 net: korina: Make driver COMPILE_TESTable
date: 7 months ago
config: mips-randconfig-s032-20211116 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# 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 fetch --no-tags linus master
git checkout 6ef92063bf94cd8a6fa9fea3a82596955eb25424
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
drivers/net/ethernet/korina.c:408:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct dma_reg *ch @@ got struct dma_reg [noderef] __iomem *tx_dma_regs @@
drivers/net/ethernet/korina.c:408:33: sparse: expected struct dma_reg *ch
drivers/net/ethernet/korina.c:408:33: sparse: got struct dma_reg [noderef] __iomem *tx_dma_regs
drivers/net/ethernet/korina.c:415:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct dma_reg *ch @@ got struct dma_reg [noderef] __iomem *rx_dma_regs @@
drivers/net/ethernet/korina.c:415:33: sparse: expected struct dma_reg *ch
drivers/net/ethernet/korina.c:415:33: sparse: got struct dma_reg [noderef] __iomem *rx_dma_regs
>> drivers/net/ethernet/korina.c:391:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:391:20: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:391:20: sparse: got unsigned int *
>> drivers/net/ethernet/korina.c:392:31: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:392:31: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:392:31: sparse: got unsigned int *
drivers/net/ethernet/korina.c:394:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:394:33: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:394:33: sparse: got unsigned int *
drivers/net/ethernet/korina.c:397:28: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:397:28: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:397:28: sparse: got unsigned int *
drivers/net/ethernet/korina.c:400:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:400:20: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:400:20: sparse: got unsigned int *
drivers/net/ethernet/korina.c:401:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:401:20: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:401:20: sparse: got unsigned int *
>> drivers/net/ethernet/korina.c:391:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:391:20: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:391:20: sparse: got unsigned int *
>> drivers/net/ethernet/korina.c:392:31: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:392:31: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:392:31: sparse: got unsigned int *
drivers/net/ethernet/korina.c:394:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:394:33: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:394:33: sparse: got unsigned int *
drivers/net/ethernet/korina.c:397:28: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:397:28: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:397:28: sparse: got unsigned int *
drivers/net/ethernet/korina.c:400:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:400:20: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:400:20: sparse: got unsigned int *
drivers/net/ethernet/korina.c:401:20: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int * @@
drivers/net/ethernet/korina.c:401:20: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/korina.c:401:20: sparse: got unsigned int *
vim +391 drivers/net/ethernet/korina.c
0fc96939a97ffd drivers/net/ethernet/korina.c Thomas Bogendoerfer 2021-04-19 387
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 388 static inline void korina_abort_dma(struct net_device *dev,
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 389 struct dma_reg *ch)
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 390 {
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 @391 if (readl(&ch->dmac) & DMA_CHAN_RUN_BIT) {
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 @392 writel(0x10, &ch->dmac);
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 393
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 394 while (!(readl(&ch->dmas) & DMA_STAT_HALT))
860e9538a9482b drivers/net/ethernet/korina.c Florian Westphal 2016-05-03 395 netif_trans_update(dev);
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 396
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 397 writel(0, &ch->dmas);
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 398 }
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 399
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 400 writel(0, &ch->dmadptr);
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 401 writel(0, &ch->dmandptr);
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 402 }
ef11291bcd5f96 drivers/net/korina.c Florian Fainelli 2008-03-19 403
:::::: The code at line 391 was first introduced by commit
:::::: ef11291bcd5f963c72e7ba5952be3e3c97463d2c Add support the Korina (IDT RC32434) Ethernet MAC
:::::: TO: Florian Fainelli <florian.fainelli(a)telecomint.eu>
:::::: CC: Jeff Garzik <jeff(a)garzik.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a90af8f15bdc9449ee2d24e1d73fa3f7e8633f81
commit: 803f4e1eab7a8938ba3a3c30dd4eb5e9eeef5e63 asm-generic: simplify asm/unaligned.h
date: 6 months ago
config: sparc64-randconfig-s031-20211116 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# 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 fetch --no-tags linus master
git checkout 803f4e1eab7a8938ba3a3c30dd4eb5e9eeef5e63
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 x @@ got unsigned short [usertype] @@
drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: sparse: expected restricted __le16 x
drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: sparse: got unsigned short [usertype]
--
>> drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 x @@ got unsigned short [usertype] @@
drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9: sparse: expected restricted __le16 x
drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9: sparse: got unsigned short [usertype]
--
>> drivers/hid/hid-uclogic-rdesc.c:854:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed int x @@ got restricted __le32 [usertype] @@
drivers/hid/hid-uclogic-rdesc.c:854:25: sparse: expected signed int x
drivers/hid/hid-uclogic-rdesc.c:854:25: sparse: got restricted __le32 [usertype]
vim +241 drivers/net/wireless/ath/ath6kl/htc_pipe.c
636f828844fad9 Kalle Valo 2012-03-25 202
636f828844fad9 Kalle Valo 2012-03-25 203 static int htc_issue_packets(struct htc_target *target,
636f828844fad9 Kalle Valo 2012-03-25 204 struct htc_endpoint *ep,
636f828844fad9 Kalle Valo 2012-03-25 205 struct list_head *pkt_queue)
636f828844fad9 Kalle Valo 2012-03-25 206 {
636f828844fad9 Kalle Valo 2012-03-25 207 int status = 0;
636f828844fad9 Kalle Valo 2012-03-25 208 u16 payload_len;
636f828844fad9 Kalle Valo 2012-03-25 209 struct sk_buff *skb;
636f828844fad9 Kalle Valo 2012-03-25 210 struct htc_frame_hdr *htc_hdr;
636f828844fad9 Kalle Valo 2012-03-25 211 struct htc_packet *packet;
636f828844fad9 Kalle Valo 2012-03-25 212
636f828844fad9 Kalle Valo 2012-03-25 213 ath6kl_dbg(ATH6KL_DBG_HTC,
636f828844fad9 Kalle Valo 2012-03-25 214 "%s: queue: 0x%p, pkts %d\n", __func__,
636f828844fad9 Kalle Valo 2012-03-25 215 pkt_queue, get_queue_depth(pkt_queue));
636f828844fad9 Kalle Valo 2012-03-25 216
636f828844fad9 Kalle Valo 2012-03-25 217 while (!list_empty(pkt_queue)) {
636f828844fad9 Kalle Valo 2012-03-25 218 packet = list_first_entry(pkt_queue, struct htc_packet, list);
636f828844fad9 Kalle Valo 2012-03-25 219 list_del(&packet->list);
636f828844fad9 Kalle Valo 2012-03-25 220
636f828844fad9 Kalle Valo 2012-03-25 221 skb = packet->skb;
636f828844fad9 Kalle Valo 2012-03-25 222 if (!skb) {
636f828844fad9 Kalle Valo 2012-03-25 223 WARN_ON_ONCE(1);
636f828844fad9 Kalle Valo 2012-03-25 224 status = -EINVAL;
636f828844fad9 Kalle Valo 2012-03-25 225 break;
636f828844fad9 Kalle Valo 2012-03-25 226 }
636f828844fad9 Kalle Valo 2012-03-25 227
636f828844fad9 Kalle Valo 2012-03-25 228 payload_len = packet->act_len;
636f828844fad9 Kalle Valo 2012-03-25 229
636f828844fad9 Kalle Valo 2012-03-25 230 /* setup HTC frame header */
d58ff35122847a Johannes Berg 2017-06-16 231 htc_hdr = skb_push(skb, sizeof(*htc_hdr));
636f828844fad9 Kalle Valo 2012-03-25 232 if (!htc_hdr) {
636f828844fad9 Kalle Valo 2012-03-25 233 WARN_ON_ONCE(1);
636f828844fad9 Kalle Valo 2012-03-25 234 status = -EINVAL;
636f828844fad9 Kalle Valo 2012-03-25 235 break;
636f828844fad9 Kalle Valo 2012-03-25 236 }
636f828844fad9 Kalle Valo 2012-03-25 237
636f828844fad9 Kalle Valo 2012-03-25 238 packet->info.tx.flags |= HTC_FLAGS_TX_FIXUP_NETBUF;
636f828844fad9 Kalle Valo 2012-03-25 239
636f828844fad9 Kalle Valo 2012-03-25 240 /* Endianess? */
636f828844fad9 Kalle Valo 2012-03-25 @241 put_unaligned((u16) payload_len, &htc_hdr->payld_len);
636f828844fad9 Kalle Valo 2012-03-25 242 htc_hdr->flags = packet->info.tx.flags;
636f828844fad9 Kalle Valo 2012-03-25 243 htc_hdr->eid = (u8) packet->endpoint;
636f828844fad9 Kalle Valo 2012-03-25 244 htc_hdr->ctrl[0] = 0;
636f828844fad9 Kalle Valo 2012-03-25 245 htc_hdr->ctrl[1] = (u8) packet->info.tx.seqno;
636f828844fad9 Kalle Valo 2012-03-25 246
636f828844fad9 Kalle Valo 2012-03-25 247 spin_lock_bh(&target->tx_lock);
636f828844fad9 Kalle Valo 2012-03-25 248
636f828844fad9 Kalle Valo 2012-03-25 249 /* store in look up queue to match completions */
636f828844fad9 Kalle Valo 2012-03-25 250 list_add_tail(&packet->list, &ep->pipe.tx_lookup_queue);
636f828844fad9 Kalle Valo 2012-03-25 251 ep->ep_st.tx_issued += 1;
636f828844fad9 Kalle Valo 2012-03-25 252 spin_unlock_bh(&target->tx_lock);
636f828844fad9 Kalle Valo 2012-03-25 253
636f828844fad9 Kalle Valo 2012-03-25 254 status = ath6kl_hif_pipe_send(target->dev->ar,
636f828844fad9 Kalle Valo 2012-03-25 255 ep->pipe.pipeid_ul, NULL, skb);
636f828844fad9 Kalle Valo 2012-03-25 256
636f828844fad9 Kalle Valo 2012-03-25 257 if (status != 0) {
636f828844fad9 Kalle Valo 2012-03-25 258 if (status != -ENOMEM) {
636f828844fad9 Kalle Valo 2012-03-25 259 /* TODO: if more than 1 endpoint maps to the
636f828844fad9 Kalle Valo 2012-03-25 260 * same PipeID, it is possible to run out of
636f828844fad9 Kalle Valo 2012-03-25 261 * resources in the HIF layer.
636f828844fad9 Kalle Valo 2012-03-25 262 * Don't emit the error
636f828844fad9 Kalle Valo 2012-03-25 263 */
636f828844fad9 Kalle Valo 2012-03-25 264 ath6kl_dbg(ATH6KL_DBG_HTC,
636f828844fad9 Kalle Valo 2012-03-25 265 "%s: failed status:%d\n",
636f828844fad9 Kalle Valo 2012-03-25 266 __func__, status);
636f828844fad9 Kalle Valo 2012-03-25 267 }
636f828844fad9 Kalle Valo 2012-03-25 268 spin_lock_bh(&target->tx_lock);
636f828844fad9 Kalle Valo 2012-03-25 269 list_del(&packet->list);
636f828844fad9 Kalle Valo 2012-03-25 270
636f828844fad9 Kalle Valo 2012-03-25 271 /* reclaim credits */
636f828844fad9 Kalle Valo 2012-03-25 272 ep->cred_dist.credits += packet->info.tx.cred_used;
636f828844fad9 Kalle Valo 2012-03-25 273 spin_unlock_bh(&target->tx_lock);
636f828844fad9 Kalle Valo 2012-03-25 274
636f828844fad9 Kalle Valo 2012-03-25 275 /* put it back into the callers queue */
636f828844fad9 Kalle Valo 2012-03-25 276 list_add(&packet->list, pkt_queue);
636f828844fad9 Kalle Valo 2012-03-25 277 break;
636f828844fad9 Kalle Valo 2012-03-25 278 }
636f828844fad9 Kalle Valo 2012-03-25 279 }
636f828844fad9 Kalle Valo 2012-03-25 280
636f828844fad9 Kalle Valo 2012-03-25 281 if (status != 0) {
636f828844fad9 Kalle Valo 2012-03-25 282 while (!list_empty(pkt_queue)) {
636f828844fad9 Kalle Valo 2012-03-25 283 if (status != -ENOMEM) {
636f828844fad9 Kalle Valo 2012-03-25 284 ath6kl_dbg(ATH6KL_DBG_HTC,
636f828844fad9 Kalle Valo 2012-03-25 285 "%s: failed pkt:0x%p status:%d\n",
636f828844fad9 Kalle Valo 2012-03-25 286 __func__, packet, status);
636f828844fad9 Kalle Valo 2012-03-25 287 }
636f828844fad9 Kalle Valo 2012-03-25 288
636f828844fad9 Kalle Valo 2012-03-25 289 packet = list_first_entry(pkt_queue,
636f828844fad9 Kalle Valo 2012-03-25 290 struct htc_packet, list);
636f828844fad9 Kalle Valo 2012-03-25 291 list_del(&packet->list);
636f828844fad9 Kalle Valo 2012-03-25 292 packet->status = status;
636f828844fad9 Kalle Valo 2012-03-25 293 send_packet_completion(target, packet);
636f828844fad9 Kalle Valo 2012-03-25 294 }
636f828844fad9 Kalle Valo 2012-03-25 295 }
636f828844fad9 Kalle Valo 2012-03-25 296
636f828844fad9 Kalle Valo 2012-03-25 297 return status;
636f828844fad9 Kalle Valo 2012-03-25 298 }
636f828844fad9 Kalle Valo 2012-03-25 299
:::::: The code at line 241 was first introduced by commit
:::::: 636f828844fad9421ea6e7df053bba995febdecf ath6kl: Add HTC pipe implementation
:::::: TO: Kalle Valo <kvalo(a)qca.qualcomm.com>
:::::: CC: Kalle Valo <kvalo(a)qca.qualcomm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months