Messages in this thread | | | Date | Sat, 18 Sep 2021 20:24:14 +0800 | From | kernel test robot <> | Subject | drivers/watchdog/bcm63xx_wdt.c:147:37: sparse: sparse: incorrect type in initializer (different address spaces) |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 4357f03d6611753936e4d52fc251b54a6afb1b54 commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros date: 5 months ago config: mips-randconfig-s031-20210918 (attached as .config) compiler: mips-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 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@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/bcm63xx_wdt.c:59:9: sparse: sparse: cast removes address space '__iomem' of expression drivers/watchdog/bcm63xx_wdt.c:60:9: sparse: sparse: cast removes address space '__iomem' of expression drivers/watchdog/bcm63xx_wdt.c:61:9: sparse: sparse: cast removes address space '__iomem' of expression drivers/watchdog/bcm63xx_wdt.c:66:9: sparse: sparse: cast removes address space '__iomem' of expression drivers/watchdog/bcm63xx_wdt.c:67:9: sparse: sparse: cast removes address space '__iomem' of expression drivers/watchdog/bcm63xx_wdt.c:94:28: sparse: sparse: Using plain integer as NULL pointer >> drivers/watchdog/bcm63xx_wdt.c:147:37: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char const [noderef] __user *__p @@ got char const * @@ drivers/watchdog/bcm63xx_wdt.c:147:37: sparse: expected char const [noderef] __user *__p drivers/watchdog/bcm63xx_wdt.c:147:37: sparse: got char const * drivers/watchdog/bcm63xx_wdt.c:222:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected int ( *write )( ... ) @@ got int ( * )( ... ) @@ drivers/watchdog/bcm63xx_wdt.c:222:27: sparse: expected int ( *write )( ... ) drivers/watchdog/bcm63xx_wdt.c:222:27: sparse: got int ( * )( ... )
vim +147 drivers/watchdog/bcm63xx_wdt.c
b63aa731cd9e3f Florian Fainelli 2010-08-28 134 b63aa731cd9e3f Florian Fainelli 2010-08-28 135 static ssize_t bcm63xx_wdt_write(struct file *file, const char *data, b63aa731cd9e3f Florian Fainelli 2010-08-28 136 size_t len, loff_t *ppos) b63aa731cd9e3f Florian Fainelli 2010-08-28 137 { b63aa731cd9e3f Florian Fainelli 2010-08-28 138 if (len) { b63aa731cd9e3f Florian Fainelli 2010-08-28 139 if (!nowayout) { b63aa731cd9e3f Florian Fainelli 2010-08-28 140 size_t i; b63aa731cd9e3f Florian Fainelli 2010-08-28 141 b63aa731cd9e3f Florian Fainelli 2010-08-28 142 /* In case it was set long ago */ b63aa731cd9e3f Florian Fainelli 2010-08-28 143 expect_close = 0; b63aa731cd9e3f Florian Fainelli 2010-08-28 144 b63aa731cd9e3f Florian Fainelli 2010-08-28 145 for (i = 0; i != len; i++) { b63aa731cd9e3f Florian Fainelli 2010-08-28 146 char c; b63aa731cd9e3f Florian Fainelli 2010-08-28 @147 if (get_user(c, data + i)) b63aa731cd9e3f Florian Fainelli 2010-08-28 148 return -EFAULT; b63aa731cd9e3f Florian Fainelli 2010-08-28 149 if (c == 'V') b63aa731cd9e3f Florian Fainelli 2010-08-28 150 expect_close = 42; b63aa731cd9e3f Florian Fainelli 2010-08-28 151 } b63aa731cd9e3f Florian Fainelli 2010-08-28 152 } b63aa731cd9e3f Florian Fainelli 2010-08-28 153 bcm63xx_wdt_pet(); b63aa731cd9e3f Florian Fainelli 2010-08-28 154 } b63aa731cd9e3f Florian Fainelli 2010-08-28 155 return len; b63aa731cd9e3f Florian Fainelli 2010-08-28 156 } b63aa731cd9e3f Florian Fainelli 2010-08-28 157
:::::: The code at line 147 was first introduced by commit :::::: b63aa731cd9e3fed7694a99f9c233f5f4b244f03 watchdog: add support for Broadcom BCM63xx built-in watchdog
:::::: TO: Florian Fainelli <florian@openwrt.org> :::::: CC: Wim Van Sebroeck <wim@iguana.be>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |