* arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2021-05-01 21:30 kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-05-01 21:30 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: kbuild-all, linux-kernel, Christoph Hellwig
[-- Attachment #1: Type: text/plain, Size: 13205 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 10a3efd0fee5e881b1866cf45950808575cb0f24
commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
date: 3 weeks ago
config: mips-randconfig-s032-20210502 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.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.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@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
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *p @@ got char *buf @@
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: expected void const [noderef] __user *p
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: got char *buf
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got char *dest @@
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: expected void [noderef] __user *to
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: got char *dest
>> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: expected int [noderef] __user *__p
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: got int *
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected int ( *read )( ... ) @@ got int ( * )( ... ) @@
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: expected int ( *read )( ... )
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: got int ( * )( ... )
vim +515 arch/mips/sibyte/common/sb_tbprof.c
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 439
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 440 static ssize_t sbprof_tb_read(struct file *filp, char *buf,
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 441 size_t size, loff_t *offp)
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 442 {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 443 int cur_sample, sample_off, cur_count, sample_left;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 444 char *src;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 445 int count = 0;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 446 char *dest = buf;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 447 long cur_off = *offp;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 448
96d4f267e40f95 arch/mips/sibyte/common/sb_tbprof.c Linus Torvalds 2019-01-03 @449 if (!access_ok(buf, size))
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 450 return -EFAULT;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 451
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 452 mutex_lock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 453
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 454 count = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 455 cur_sample = cur_off / TB_SAMPLE_SIZE;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 456 sample_off = cur_off % TB_SAMPLE_SIZE;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 457 sample_left = TB_SAMPLE_SIZE - sample_off;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 458
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 459 while (size && (cur_sample < sbp.next_tb_sample)) {
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 460 int err;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 461
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 462 cur_count = size < sample_left ? size : sample_left;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 463 src = (char *)(((long)sbp.sbprof_tbbuf[cur_sample])+sample_off);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 464 err = __copy_to_user(dest, src, cur_count);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 465 if (err) {
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 466 *offp = cur_off + cur_count - err;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 467 mutex_unlock(&sbp.lock);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 468 return err;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 469 }
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 470 pr_debug(DEVNAME ": read from sample %d, %d bytes\n",
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 471 cur_sample, cur_count);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 472 size -= cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 473 sample_left -= cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 474 if (!sample_left) {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 475 cur_sample++;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 476 sample_off = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 477 sample_left = TB_SAMPLE_SIZE;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 478 } else {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 479 sample_off += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 480 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 481 cur_off += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 482 dest += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 483 count += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 484 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 485 *offp = cur_off;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 486 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 487
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 488 return count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 489 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 490
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 491 static long sbprof_tb_ioctl(struct file *filp,
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 492 unsigned int command,
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 493 unsigned long arg)
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 494 {
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 495 int err = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 496
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 497 switch (command) {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 498 case SBPROF_ZBSTART:
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 499 mutex_lock(&sbp.lock);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 500 err = sbprof_zbprof_start(filp);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 501 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 502 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 503
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 504 case SBPROF_ZBSTOP:
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 505 mutex_lock(&sbp.lock);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 506 err = sbprof_zbprof_stop();
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 507 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 508 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 509
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 510 case SBPROF_ZBWAITFULL: {
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 511 err = wait_event_interruptible(sbp.tb_read, TB_FULL);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 512 if (err)
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 513 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 514
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 @515 err = put_user(TB_FULL, (int *) arg);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 516 break;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 517 }
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 518
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 519 default:
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 520 err = -EINVAL;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 521 break;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 522 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 523
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 524 return err;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 525 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 526
:::::: The code at line 515 was first introduced by commit
:::::: d619f38fdacb5cec0c841798bbadeaf903868852 [MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
:::::: TO: Mark Mason <mmason@upwardaccess.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21781 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces)
2022-02-14 8:04 ` Christoph Hellwig
@ 2022-02-15 15:03 ` Thomas Bogendoerfer
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Bogendoerfer @ 2022-02-15 15:03 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: kernel test robot, kbuild-all, linux-kernel
On Mon, Feb 14, 2022 at 09:04:29AM +0100, Christoph Hellwig wrote:
> Thomas, can you find someone who cares about the sibyte support to
> fix up the address space annotations in this code?
I'll have a look.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces)
2022-02-12 21:00 kernel test robot
@ 2022-02-14 8:04 ` Christoph Hellwig
2022-02-15 15:03 ` Thomas Bogendoerfer
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2022-02-14 8:04 UTC (permalink / raw)
To: kernel test robot
Cc: Thomas Bogendoerfer, kbuild-all, linux-kernel, Christoph Hellwig
Thomas, can you find someone who cares about the sibyte support to
fix up the address space annotations in this code?
On Sun, Feb 13, 2022 at 05:00:29AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 83e396641110663d3c7bb25b9bc0c6a750359ecf
> commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
> date: 10 months ago
> config: mips-randconfig-s032-20220213 (https://download.01.org/0day-ci/archive/20220213/202202130432.4tPqXRgn-lkp@intel.com/config)
> compiler: mips64el-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/?id=ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/sibyte/common/
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@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
> arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *p @@ got char *buf @@
> arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: expected void const [noderef] __user *p
> arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: got char *buf
> arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got char *dest @@
> arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: expected void [noderef] __user *to
> arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: got char *dest
> >> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: expected int [noderef] __user *__p
> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: got int *
> arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected long ( *read )( ... ) @@ got long ( * )( ... ) @@
> arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: expected long ( *read )( ... )
> arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: got long ( * )( ... )
>
> vim +515 arch/mips/sibyte/common/sb_tbprof.c
>
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 490
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 491 static long sbprof_tb_ioctl(struct file *filp,
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 492 unsigned int command,
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 493 unsigned long arg)
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 494 {
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 495 int err = 0;
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 496
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 497 switch (command) {
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 498 case SBPROF_ZBSTART:
> bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 499 mutex_lock(&sbp.lock);
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 500 err = sbprof_zbprof_start(filp);
> bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 501 mutex_unlock(&sbp.lock);
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 502 break;
> bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 503
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 504 case SBPROF_ZBSTOP:
> bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 505 mutex_lock(&sbp.lock);
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 506 err = sbprof_zbprof_stop();
> bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 507 mutex_unlock(&sbp.lock);
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 508 break;
> bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 509
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 510 case SBPROF_ZBWAITFULL: {
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 511 err = wait_event_interruptible(sbp.tb_read, TB_FULL);
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 512 if (err)
> bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 513 break;
> bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 514
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 @515 err = put_user(TB_FULL, (int *) arg);
> bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 516 break;
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 517 }
> bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 518
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 519 default:
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 520 err = -EINVAL;
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 521 break;
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 522 }
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 523
> d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 524 return err;
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 525 }
> ^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 526
>
> :::::: The code at line 515 was first introduced by commit
> :::::: d619f38fdacb5cec0c841798bbadeaf903868852 [MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
>
> :::::: TO: Mark Mason <mmason@upwardaccess.com>
> :::::: CC: Ralf Baechle <ralf@linux-mips.org>
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
---end quoted text---
^ permalink raw reply [flat|nested] 7+ messages in thread
* arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2022-02-12 21:00 kernel test robot
2022-02-14 8:04 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2022-02-12 21:00 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: kbuild-all, linux-kernel, Christoph Hellwig
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 83e396641110663d3c7bb25b9bc0c6a750359ecf
commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
date: 10 months ago
config: mips-randconfig-s032-20220213 (https://download.01.org/0day-ci/archive/20220213/202202130432.4tPqXRgn-lkp@intel.com/config)
compiler: mips64el-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/?id=ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/sibyte/common/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@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
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *p @@ got char *buf @@
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: expected void const [noderef] __user *p
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: got char *buf
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got char *dest @@
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: expected void [noderef] __user *to
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: got char *dest
>> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: expected int [noderef] __user *__p
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: got int *
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected long ( *read )( ... ) @@ got long ( * )( ... ) @@
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: expected long ( *read )( ... )
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: got long ( * )( ... )
vim +515 arch/mips/sibyte/common/sb_tbprof.c
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 490
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 491 static long sbprof_tb_ioctl(struct file *filp,
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 492 unsigned int command,
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 493 unsigned long arg)
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 494 {
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 495 int err = 0;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 496
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 497 switch (command) {
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 498 case SBPROF_ZBSTART:
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 499 mutex_lock(&sbp.lock);
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 500 err = sbprof_zbprof_start(filp);
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 501 mutex_unlock(&sbp.lock);
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 502 break;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 503
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 504 case SBPROF_ZBSTOP:
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 505 mutex_lock(&sbp.lock);
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 506 err = sbprof_zbprof_stop();
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 507 mutex_unlock(&sbp.lock);
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 508 break;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 509
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 510 case SBPROF_ZBWAITFULL: {
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 511 err = wait_event_interruptible(sbp.tb_read, TB_FULL);
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 512 if (err)
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 513 break;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 514
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 @515 err = put_user(TB_FULL, (int *) arg);
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 516 break;
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 517 }
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 518
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 519 default:
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 520 err = -EINVAL;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 521 break;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 522 }
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 523
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 524 return err;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 525 }
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 526
:::::: The code at line 515 was first introduced by commit
:::::: d619f38fdacb5cec0c841798bbadeaf903868852 [MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
:::::: TO: Mark Mason <mmason@upwardaccess.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2021-12-16 10:19 kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-12-16 10:19 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: kbuild-all, linux-kernel, Christoph Hellwig
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2b14864acbaaf03d9c01982e243a84632524c3ac
commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
date: 8 months ago
config: mips-randconfig-s031-20211216 (https://download.01.org/0day-ci/archive/20211216/202112161836.SB5KUxha-lkp@intel.com/config)
compiler: mips64el-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/?id=ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/sibyte/common/ kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@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
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *p @@ got char *buf @@
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: expected void const [noderef] __user *p
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: got char *buf
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got char *dest @@
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: expected void [noderef] __user *to
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: got char *dest
>> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: expected int [noderef] __user *__p
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: got int *
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected long ( *read )( ... ) @@ got long ( * )( ... ) @@
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: expected long ( *read )( ... )
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: got long ( * )( ... )
vim +515 arch/mips/sibyte/common/sb_tbprof.c
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 490
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 491 static long sbprof_tb_ioctl(struct file *filp,
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 492 unsigned int command,
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 493 unsigned long arg)
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 494 {
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 495 int err = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 496
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 497 switch (command) {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 498 case SBPROF_ZBSTART:
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 499 mutex_lock(&sbp.lock);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 500 err = sbprof_zbprof_start(filp);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 501 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 502 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 503
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 504 case SBPROF_ZBSTOP:
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 505 mutex_lock(&sbp.lock);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 506 err = sbprof_zbprof_stop();
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 507 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 508 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 509
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 510 case SBPROF_ZBWAITFULL: {
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 511 err = wait_event_interruptible(sbp.tb_read, TB_FULL);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 512 if (err)
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 513 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 514
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 @515 err = put_user(TB_FULL, (int *) arg);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 516 break;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 517 }
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 518
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 519 default:
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 520 err = -EINVAL;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 521 break;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 522 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 523
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 524 return err;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 525 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 526
:::::: The code at line 515 was first introduced by commit
:::::: d619f38fdacb5cec0c841798bbadeaf903868852 [MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
:::::: TO: Mark Mason <mmason@upwardaccess.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2021-12-02 10:36 kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-12-02 10:36 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: kbuild-all, linux-kernel, Christoph Hellwig
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 58e1100fdc5990b0cc0d4beaf2562a92e621ac7d
commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
date: 8 months ago
config: mips-randconfig-s031-20211202 (https://download.01.org/0day-ci/archive/20211202/202112021828.HbLk4k4J-lkp@intel.com/config)
compiler: mips64-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/?id=ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/sibyte/common/ drivers/clk/ drivers/gpio/ drivers/watchdog/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@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
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *p @@ got char *buf @@
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: expected void const [noderef] __user *p
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: got char *buf
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got char *dest @@
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: expected void [noderef] __user *to
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: got char *dest
>> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: expected int [noderef] __user *__p
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: got int *
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected long ( *read )( ... ) @@ got long ( * )( ... ) @@
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: expected long ( *read )( ... )
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: got long ( * )( ... )
vim +515 arch/mips/sibyte/common/sb_tbprof.c
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 490
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 491 static long sbprof_tb_ioctl(struct file *filp,
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 492 unsigned int command,
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 493 unsigned long arg)
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 494 {
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 495 int err = 0;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 496
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 497 switch (command) {
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 498 case SBPROF_ZBSTART:
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 499 mutex_lock(&sbp.lock);
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 500 err = sbprof_zbprof_start(filp);
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 501 mutex_unlock(&sbp.lock);
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 502 break;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 503
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 504 case SBPROF_ZBSTOP:
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 505 mutex_lock(&sbp.lock);
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 506 err = sbprof_zbprof_stop();
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 507 mutex_unlock(&sbp.lock);
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 508 break;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 509
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 510 case SBPROF_ZBWAITFULL: {
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 511 err = wait_event_interruptible(sbp.tb_read, TB_FULL);
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 512 if (err)
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 513 break;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 514
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 @515 err = put_user(TB_FULL, (int *) arg);
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 516 break;
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 517 }
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 518
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 519 default:
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 520 err = -EINVAL;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 521 break;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 522 }
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 523
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 524 return err;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 525 }
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 526
:::::: The code at line 515 was first introduced by commit
:::::: d619f38fdacb5cec0c841798bbadeaf903868852 [MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
:::::: TO: Mark Mason <mmason@upwardaccess.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2021-05-18 21:54 kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-05-18 21:54 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: kbuild-all, linux-kernel, Christoph Hellwig
[-- Attachment #1: Type: text/plain, Size: 13207 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
date: 5 weeks ago
config: mips-randconfig-s032-20210519 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.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.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@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
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *p @@ got char *buf @@
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: expected void const [noderef] __user *p
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: got char *buf
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got char *dest @@
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: expected void [noderef] __user *to
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: got char *dest
>> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: expected int [noderef] __user *__p
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: got int *
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected int ( *read )( ... ) @@ got int ( * )( ... ) @@
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: expected int ( *read )( ... )
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: got int ( * )( ... )
vim +515 arch/mips/sibyte/common/sb_tbprof.c
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 439
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 440 static ssize_t sbprof_tb_read(struct file *filp, char *buf,
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 441 size_t size, loff_t *offp)
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 442 {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 443 int cur_sample, sample_off, cur_count, sample_left;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 444 char *src;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 445 int count = 0;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 446 char *dest = buf;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 447 long cur_off = *offp;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 448
96d4f267e40f95 arch/mips/sibyte/common/sb_tbprof.c Linus Torvalds 2019-01-03 @449 if (!access_ok(buf, size))
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 450 return -EFAULT;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 451
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 452 mutex_lock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 453
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 454 count = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 455 cur_sample = cur_off / TB_SAMPLE_SIZE;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 456 sample_off = cur_off % TB_SAMPLE_SIZE;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 457 sample_left = TB_SAMPLE_SIZE - sample_off;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 458
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 459 while (size && (cur_sample < sbp.next_tb_sample)) {
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 460 int err;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 461
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 462 cur_count = size < sample_left ? size : sample_left;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 463 src = (char *)(((long)sbp.sbprof_tbbuf[cur_sample])+sample_off);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 464 err = __copy_to_user(dest, src, cur_count);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 465 if (err) {
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 466 *offp = cur_off + cur_count - err;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 467 mutex_unlock(&sbp.lock);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 468 return err;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 469 }
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 470 pr_debug(DEVNAME ": read from sample %d, %d bytes\n",
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 471 cur_sample, cur_count);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 472 size -= cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 473 sample_left -= cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 474 if (!sample_left) {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 475 cur_sample++;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 476 sample_off = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 477 sample_left = TB_SAMPLE_SIZE;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 478 } else {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 479 sample_off += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 480 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 481 cur_off += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 482 dest += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 483 count += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 484 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 485 *offp = cur_off;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 486 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 487
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 488 return count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 489 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 490
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 491 static long sbprof_tb_ioctl(struct file *filp,
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 492 unsigned int command,
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 493 unsigned long arg)
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 494 {
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 495 int err = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 496
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 497 switch (command) {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 498 case SBPROF_ZBSTART:
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 499 mutex_lock(&sbp.lock);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 500 err = sbprof_zbprof_start(filp);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 501 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 502 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 503
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 504 case SBPROF_ZBSTOP:
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 505 mutex_lock(&sbp.lock);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 506 err = sbprof_zbprof_stop();
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 507 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 508 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 509
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 510 case SBPROF_ZBWAITFULL: {
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 511 err = wait_event_interruptible(sbp.tb_read, TB_FULL);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 512 if (err)
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 513 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 514
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 @515 err = put_user(TB_FULL, (int *) arg);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 516 break;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 517 }
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 518
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 519 default:
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 520 err = -EINVAL;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 521 break;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 522 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 523
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 524 return err;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 525 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 526
:::::: The code at line 515 was first introduced by commit
:::::: d619f38fdacb5cec0c841798bbadeaf903868852 [MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
:::::: TO: Mark Mason <mmason@upwardaccess.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28108 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-02-15 15:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 21:30 arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) kernel test robot
2021-05-18 21:54 kernel test robot
2021-12-02 10:36 kernel test robot
2021-12-16 10:19 kernel test robot
2022-02-12 21:00 kernel test robot
2022-02-14 8:04 ` Christoph Hellwig
2022-02-15 15:03 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).