mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>
Subject: drivers/watchdog/rc32434_wdt.c:176:37: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Sun, 20 Mar 2022 12:21:59 +0800	[thread overview]
Message-ID: <202203201245.WYJq6i13-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   34e047aa16c0123bbae8e2f6df33e5ecc1f56601
commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
date:   11 months ago
config: mips-randconfig-s032-20220319 (https://download.01.org/0day-ci/archive/20220320/202203201245.WYJq6i13-lkp@intel.com/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/?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 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
>> drivers/watchdog/rc32434_wdt.c:176:37: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected char const [noderef] __user *__p @@     got char const * @@
   drivers/watchdog/rc32434_wdt.c:176:37: sparse:     expected char const [noderef] __user *__p
   drivers/watchdog/rc32434_wdt.c:176:37: sparse:     got char const *
   drivers/watchdog/rc32434_wdt.c:246:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@     expected int ( *write )( ... ) @@     got int ( * )( ... ) @@
   drivers/watchdog/rc32434_wdt.c:246:27: sparse:     expected int ( *write )( ... )
   drivers/watchdog/rc32434_wdt.c:246:27: sparse:     got int ( * )( ... )

vim +176 drivers/watchdog/rc32434_wdt.c

03ec58568a3c66 Florian Fainelli 2008-02-25  163  
03ec58568a3c66 Florian Fainelli 2008-02-25  164  static ssize_t rc32434_wdt_write(struct file *file, const char *data,
03ec58568a3c66 Florian Fainelli 2008-02-25  165  				size_t len, loff_t *ppos)
03ec58568a3c66 Florian Fainelli 2008-02-25  166  {
03ec58568a3c66 Florian Fainelli 2008-02-25  167  	if (len) {
03ec58568a3c66 Florian Fainelli 2008-02-25  168  		if (!nowayout) {
03ec58568a3c66 Florian Fainelli 2008-02-25  169  			size_t i;
03ec58568a3c66 Florian Fainelli 2008-02-25  170  
03ec58568a3c66 Florian Fainelli 2008-02-25  171  			/* In case it was set long ago */
03ec58568a3c66 Florian Fainelli 2008-02-25  172  			expect_close = 0;
03ec58568a3c66 Florian Fainelli 2008-02-25  173  
03ec58568a3c66 Florian Fainelli 2008-02-25  174  			for (i = 0; i != len; i++) {
03ec58568a3c66 Florian Fainelli 2008-02-25  175  				char c;
03ec58568a3c66 Florian Fainelli 2008-02-25 @176  				if (get_user(c, data + i))
03ec58568a3c66 Florian Fainelli 2008-02-25  177  					return -EFAULT;
03ec58568a3c66 Florian Fainelli 2008-02-25  178  				if (c == 'V')
0af98d37e85e69 Phil Sutter      2009-02-08  179  					expect_close = 42;
03ec58568a3c66 Florian Fainelli 2008-02-25  180  			}
03ec58568a3c66 Florian Fainelli 2008-02-25  181  		}
0af98d37e85e69 Phil Sutter      2009-02-08  182  		rc32434_wdt_ping();
03ec58568a3c66 Florian Fainelli 2008-02-25  183  		return len;
03ec58568a3c66 Florian Fainelli 2008-02-25  184  	}
03ec58568a3c66 Florian Fainelli 2008-02-25  185  	return 0;
03ec58568a3c66 Florian Fainelli 2008-02-25  186  }
03ec58568a3c66 Florian Fainelli 2008-02-25  187  

:::::: The code at line 176 was first introduced by commit
:::::: 03ec58568a3c66cac4b23ff74db95c966a1521de [WATCHDOG] Add support for the IDT RC32434 watchdog

:::::: TO: Florian Fainelli <florian.fainelli@telecomint.eu>
:::::: CC: Wim Van Sebroeck <wim@iguana.be>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-03-20  4:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202203201245.WYJq6i13-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hch@lst.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®