mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/usb/core/devio.c:2045:13: sparse: sparse: cast removes address space '__user' of expression
@ 2024-11-30  4:12 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-30  4:12 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: oe-kbuild-all, linux-kernel, Palmer Dabbelt

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2ba9f676d0a2e408aef14d679984c26373bf37b7
commit: 6df2a016c0c8a3d0933ef33dd192ea6606b115e3 riscv: fix build with binutils 2.38
date:   2 years, 10 months ago
config: riscv-randconfig-r123-20241120 (https://download.01.org/0day-ci/archive/20241130/202411301208.hn3ay9DH-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241130/202411301208.hn3ay9DH-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/oe-kbuild-all/202411301208.hn3ay9DH-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/usb/core/devio.c:2045:13: sparse: sparse: cast removes address space '__user' of expression
   drivers/usb/core/devio.c: note: in included file (through include/linux/gfp.h, include/linux/radix-tree.h, include/linux/fs.h):
   include/linux/mmzone.h:1526:40: sparse: sparse: self-comparison always evaluates to false

vim +/__user +2045 drivers/usb/core/devio.c

2ef47001b3ee3d Alan Stern     2017-11-08  2014  
^1da177e4c3f41 Linus Torvalds 2005-04-16  2015  static int processcompl(struct async *as, void __user * __user *arg)
^1da177e4c3f41 Linus Torvalds 2005-04-16  2016  {
^1da177e4c3f41 Linus Torvalds 2005-04-16  2017  	struct urb *urb = as->urb;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2018  	struct usbdevfs_urb __user *userurb = as->userurb;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2019  	void __user *addr = as->userurb;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2020  	unsigned int i;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2021  
2ef47001b3ee3d Alan Stern     2017-11-08  2022  	compute_isochronous_actual_length(urb);
7152b592593b9d Alan Stern     2010-03-06  2023  	if (as->userbuffer && urb->actual_length) {
3d97ff63f89977 Hans de Goede  2012-07-04  2024  		if (copy_urb_data_to_user(as->userbuffer, urb))
d794a02111cd33 Oliver Neukum  2009-06-28  2025  			goto err_out;
7152b592593b9d Alan Stern     2010-03-06  2026  	}
e015268d2fcfca Alan Stern     2007-08-24  2027  	if (put_user(as->status, &userurb->status))
d794a02111cd33 Oliver Neukum  2009-06-28  2028  		goto err_out;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2029  	if (put_user(urb->actual_length, &userurb->actual_length))
d794a02111cd33 Oliver Neukum  2009-06-28  2030  		goto err_out;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2031  	if (put_user(urb->error_count, &userurb->error_count))
d794a02111cd33 Oliver Neukum  2009-06-28  2032  		goto err_out;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2033  
93cf9b909efb77 Alan Stern     2007-07-30  2034  	if (usb_endpoint_xfer_isoc(&urb->ep->desc)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16  2035  		for (i = 0; i < urb->number_of_packets; i++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16  2036  			if (put_user(urb->iso_frame_desc[i].actual_length,
^1da177e4c3f41 Linus Torvalds 2005-04-16  2037  				     &userurb->iso_frame_desc[i].actual_length))
d794a02111cd33 Oliver Neukum  2009-06-28  2038  				goto err_out;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2039  			if (put_user(urb->iso_frame_desc[i].status,
^1da177e4c3f41 Linus Torvalds 2005-04-16  2040  				     &userurb->iso_frame_desc[i].status))
d794a02111cd33 Oliver Neukum  2009-06-28  2041  				goto err_out;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2042  		}
668a9541a56af5 Christopher Li 2005-04-18  2043  	}
^1da177e4c3f41 Linus Torvalds 2005-04-16  2044  
^1da177e4c3f41 Linus Torvalds 2005-04-16 @2045  	if (put_user(addr, (void __user * __user *)arg))
^1da177e4c3f41 Linus Torvalds 2005-04-16  2046  		return -EFAULT;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2047  	return 0;
d794a02111cd33 Oliver Neukum  2009-06-28  2048  
d794a02111cd33 Oliver Neukum  2009-06-28  2049  err_out:
d794a02111cd33 Oliver Neukum  2009-06-28  2050  	return -EFAULT;
^1da177e4c3f41 Linus Torvalds 2005-04-16  2051  }
^1da177e4c3f41 Linus Torvalds 2005-04-16  2052  

:::::: The code at line 2045 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
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-30  4:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-30  4:12 drivers/usb/core/devio.c:2045:13: sparse: sparse: cast removes address space '__user' of expression kernel test robot

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®