From: "Liu, Yujie" <yujie.liu@intel.com>
To: lkp <lkp@intel.com>,
"oe-kbuild@lists.linux.dev" <oe-kbuild@lists.linux.dev>
Subject: RE: drivers/watchdog/ath79_wdt.c:161:37: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Wed, 13 Dec 2023 06:31:01 +0000 [thread overview]
Message-ID: <CY5PR11MB639260B09E151FF49ED7C419FB8DA@CY5PR11MB6392.namprd11.prod.outlook.com> (raw)
In-Reply-To: <202312091851.OVvu4Nax-lkp@intel.com>
not_report
This is a sparse patch, not the root cause of the warning in watchdog driver.
-----Original Message-----
From: lkp <lkp@intel.com>
Sent: Saturday, December 9, 2023 19:03
To: oe-kbuild@lists.linux.dev
Cc: lkp <lkp@intel.com>
Subject: drivers/watchdog/ath79_wdt.c:161:37: sparse: sparse: incorrect type in argument 1 (different address spaces)
::::::
:::::: Manual check reason: "only include/linux/compiler_types.h file changed"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f2e8a57ee9036c7d5443382b6c3c09b51a92ec7e
commit: 25fd529c34d063d1bef23742f2e8f8341c639dc3 sparse: group the defines by functionality
date: 3 years, 4 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 3 years, 4 months ago
config: arm-randconfig-r123-20231107 (https://download.01.org/0day-ci/archive/20231209/202312091851.OVvu4Nax-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231209/202312091851.OVvu4Nax-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202312091851.OVvu4Nax-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/watchdog/ath79_wdt.c:161:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got char const * @@
drivers/watchdog/ath79_wdt.c:161:37: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/ath79_wdt.c:161:37: sparse: got char const *
drivers/watchdog/ath79_wdt.c:235:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected int ( *write )( ... ) @@ got int ( * )( ... ) @@
drivers/watchdog/ath79_wdt.c:235:27: sparse: expected int ( *write )( ... )
drivers/watchdog/ath79_wdt.c:235:27: sparse: got int ( * )( ... )
vim +161 drivers/watchdog/ath79_wdt.c
f8394f61c66f48 Gabor Juhos 2011-01-04 148
f8394f61c66f48 Gabor Juhos 2011-01-04 149 static ssize_t ath79_wdt_write(struct file *file, const char *data,
f8394f61c66f48 Gabor Juhos 2011-01-04 150 size_t len, loff_t *ppos)
f8394f61c66f48 Gabor Juhos 2011-01-04 151 {
f8394f61c66f48 Gabor Juhos 2011-01-04 152 if (len) {
f8394f61c66f48 Gabor Juhos 2011-01-04 153 if (!nowayout) {
f8394f61c66f48 Gabor Juhos 2011-01-04 154 size_t i;
f8394f61c66f48 Gabor Juhos 2011-01-04 155
f8394f61c66f48 Gabor Juhos 2011-01-04 156 clear_bit(WDT_FLAGS_EXPECT_CLOSE, &wdt_flags);
f8394f61c66f48 Gabor Juhos 2011-01-04 157
f8394f61c66f48 Gabor Juhos 2011-01-04 158 for (i = 0; i != len; i++) {
f8394f61c66f48 Gabor Juhos 2011-01-04 159 char c;
f8394f61c66f48 Gabor Juhos 2011-01-04 160
f8394f61c66f48 Gabor Juhos 2011-01-04 @161 if (get_user(c, data + i))
f8394f61c66f48 Gabor Juhos 2011-01-04 162 return -EFAULT;
f8394f61c66f48 Gabor Juhos 2011-01-04 163
f8394f61c66f48 Gabor Juhos 2011-01-04 164 if (c == 'V')
f8394f61c66f48 Gabor Juhos 2011-01-04 165 set_bit(WDT_FLAGS_EXPECT_CLOSE,
f8394f61c66f48 Gabor Juhos 2011-01-04 166 &wdt_flags);
f8394f61c66f48 Gabor Juhos 2011-01-04 167 }
f8394f61c66f48 Gabor Juhos 2011-01-04 168 }
f8394f61c66f48 Gabor Juhos 2011-01-04 169
f8394f61c66f48 Gabor Juhos 2011-01-04 170 ath79_wdt_keepalive();
f8394f61c66f48 Gabor Juhos 2011-01-04 171 }
f8394f61c66f48 Gabor Juhos 2011-01-04 172
f8394f61c66f48 Gabor Juhos 2011-01-04 173 return len;
f8394f61c66f48 Gabor Juhos 2011-01-04 174 }
f8394f61c66f48 Gabor Juhos 2011-01-04 175
:::::: The code at line 161 was first introduced by commit
:::::: f8394f61c66f48b1fe9d6964ddce492d7f9a4cd9 watchdog: add driver for the Atheros AR71XX/AR724X/AR913X SoCs
:::::: TO: Gabor Juhos <juhosg@openwrt.org>
:::::: CC: Wim Van Sebroeck <wim@iguana.be>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-12-13 6:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-09 11:03 drivers/watchdog/ath79_wdt.c:161:37: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2023-12-13 6:31 ` Liu, Yujie [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-05 21:56 kernel test robot
2023-12-01 14:11 kernel test robot
2021-08-14 4:20 kernel test robot
2021-08-14 4:20 ` kernel test robot
2021-06-26 14:45 kernel test robot
2021-06-26 14:45 ` kernel test robot
2021-05-16 6:53 kernel test robot
2021-05-16 6:53 ` 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=CY5PR11MB639260B09E151FF49ED7C419FB8DA@CY5PR11MB6392.namprd11.prod.outlook.com \
--to=yujie.liu@intel.com \
--cc=lkp@intel.com \
--cc=oe-kbuild@lists.linux.dev \
/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.