From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 187/5003] arch/sh/kernel/traps_32.c:574:9: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Tue, 25 May 2021 19:01:33 +0800 [thread overview]
Message-ID: <202105251920.2tTA4mjW-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4882 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5d765451c2409e63563fa6a3e8005bd03ab9e82f
commit: b1deeeb93933d39098cf9b192ae0ac347e9bbd02 [187/5003] sh: fix trivial misannotations
config: sh-randconfig-s031-20210525 (attached as .config)
compiler: sh4-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/next/linux-next.git/commit/?id=b1deeeb93933d39098cf9b192ae0ac347e9bbd02
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout b1deeeb93933d39098cf9b192ae0ac347e9bbd02
# 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=sh
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 >>)
>> arch/sh/kernel/traps_32.c:574:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short const [noderef] __user *__gu_addr @@ got unsigned short * @@
arch/sh/kernel/traps_32.c:574:9: sparse: expected unsigned short const [noderef] __user *__gu_addr
arch/sh/kernel/traps_32.c:574:9: sparse: got unsigned short *
arch/sh/kernel/traps_32.c:563:5: sparse: sparse: symbol 'is_dsp_inst' was not declared. Should it be static?
vim +574 arch/sh/kernel/traps_32.c
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 558
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 559 #ifdef CONFIG_SH_DSP
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 560 /*
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 561 * SH-DSP support gerg(a)snapgear.com.
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 562 */
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 563 int is_dsp_inst(struct pt_regs *regs)
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 564 {
882c12c4e1a95e5 arch/sh/kernel/traps.c Paul Mundt 2007-05-14 565 unsigned short inst = 0;
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 566
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 567 /*
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 568 * Safe guard if DSP mode is already enabled or we're lacking
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 569 * the DSP altogether.
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 570 */
11c1965687b0a47 arch/sh/kernel/traps.c Paul Mundt 2006-12-25 571 if (!(current_cpu_data.flags & CPU_HAS_DSP) || (regs->sr & SR_DSP))
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 572 return 0;
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 573
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 @574 get_user(inst, ((unsigned short *) regs->pc));
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 575
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 576 inst &= 0xf000;
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 577
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 578 /* Check for any type of DSP or support instruction */
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 579 if ((inst == 0xf000) || (inst == 0x4000))
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 580 return 1;
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 581
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 582 return 0;
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 583 }
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 584 #else
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 585 #define is_dsp_inst(regs) (0)
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 586 #endif /* CONFIG_SH_DSP */
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 587
:::::: The code at line 574 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 17512 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Rich Felker <dalias@libc.org>
Subject: [linux-next:master 187/5003] arch/sh/kernel/traps_32.c:574:9: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Tue, 25 May 2021 19:01:33 +0800 [thread overview]
Message-ID: <202105251920.2tTA4mjW-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4809 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5d765451c2409e63563fa6a3e8005bd03ab9e82f
commit: b1deeeb93933d39098cf9b192ae0ac347e9bbd02 [187/5003] sh: fix trivial misannotations
config: sh-randconfig-s031-20210525 (attached as .config)
compiler: sh4-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/next/linux-next.git/commit/?id=b1deeeb93933d39098cf9b192ae0ac347e9bbd02
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout b1deeeb93933d39098cf9b192ae0ac347e9bbd02
# 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=sh
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 >>)
>> arch/sh/kernel/traps_32.c:574:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short const [noderef] __user *__gu_addr @@ got unsigned short * @@
arch/sh/kernel/traps_32.c:574:9: sparse: expected unsigned short const [noderef] __user *__gu_addr
arch/sh/kernel/traps_32.c:574:9: sparse: got unsigned short *
arch/sh/kernel/traps_32.c:563:5: sparse: sparse: symbol 'is_dsp_inst' was not declared. Should it be static?
vim +574 arch/sh/kernel/traps_32.c
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 558
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 559 #ifdef CONFIG_SH_DSP
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 560 /*
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 561 * SH-DSP support gerg@snapgear.com.
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 562 */
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 563 int is_dsp_inst(struct pt_regs *regs)
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 564 {
882c12c4e1a95e5 arch/sh/kernel/traps.c Paul Mundt 2007-05-14 565 unsigned short inst = 0;
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 566
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 567 /*
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 568 * Safe guard if DSP mode is already enabled or we're lacking
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 569 * the DSP altogether.
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 570 */
11c1965687b0a47 arch/sh/kernel/traps.c Paul Mundt 2006-12-25 571 if (!(current_cpu_data.flags & CPU_HAS_DSP) || (regs->sr & SR_DSP))
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 572 return 0;
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 573
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 @574 get_user(inst, ((unsigned short *) regs->pc));
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 575
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 576 inst &= 0xf000;
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 577
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 578 /* Check for any type of DSP or support instruction */
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 579 if ((inst == 0xf000) || (inst == 0x4000))
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 580 return 1;
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 581
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 582 return 0;
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 583 }
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 584 #else
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 585 #define is_dsp_inst(regs) (0)
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 586 #endif /* CONFIG_SH_DSP */
^1da177e4c3f415 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 587
:::::: The code at line 574 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.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: 17512 bytes --]
next reply other threads:[~2021-05-25 11:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 11:01 kernel test robot [this message]
2021-05-25 11:01 ` [linux-next:master 187/5003] arch/sh/kernel/traps_32.c:574:9: sparse: sparse: incorrect type in initializer (different address spaces) kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202105251920.2tTA4mjW-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.