All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-review:UPDATE-20200728-174624/eli-billauer-gmail-com/usb-core-Solve-race-condition-in-usb_kill_anchored_urbs/20200727-152745 1/1] drivers/usb/core/hcd.c:1643:27: warning: use of logical '&&' with constant operand
@ 2020-07-28 12:25 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-28 12:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3207 bytes --]

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20200728-174624/eli-billauer-gmail-com/usb-core-Solve-race-condition-in-usb_kill_anchored_urbs/20200727-152745
head:   4b098729aca24aec132a95ae0b97f3639fb53db5
commit: 4b098729aca24aec132a95ae0b97f3639fb53db5 [1/1] usb: core: Solve race condition in usb_kill_anchored_urbs
config: arm64-randconfig-r033-20200728 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e57464151d4c4912a7ec4d6fd0920056b2f75c7c)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        git checkout 4b098729aca24aec132a95ae0b97f3639fb53db5
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/usb/core/hcd.c:1643:27: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
           if (!urb->transfer_flags && URB_ANCHOR_PERMANENT)
                                    ^  ~~~~~~~~~~~~~~~~~~~~
   drivers/usb/core/hcd.c:1643:27: note: use '&' for a bitwise operation
           if (!urb->transfer_flags && URB_ANCHOR_PERMANENT)
                                    ^~
                                    &
   drivers/usb/core/hcd.c:1643:27: note: remove constant to silence this warning
           if (!urb->transfer_flags && URB_ANCHOR_PERMANENT)
                                   ~^~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.

vim +1643 drivers/usb/core/hcd.c

  1627	
  1628	static void __usb_hcd_giveback_urb(struct urb *urb)
  1629	{
  1630		struct usb_hcd *hcd = bus_to_hcd(urb->dev->bus);
  1631		struct usb_anchor *anchor = urb->anchor;
  1632		int status = urb->unlinked;
  1633	
  1634		urb->hcpriv = NULL;
  1635		if (unlikely((urb->transfer_flags & URB_SHORT_NOT_OK) &&
  1636		    urb->actual_length < urb->transfer_buffer_length &&
  1637		    !status))
  1638			status = -EREMOTEIO;
  1639	
  1640		unmap_urb_for_dma(hcd, urb);
  1641		usbmon_urb_complete(&hcd->self, urb, status);
  1642		usb_anchor_suspend_wakeups(anchor);
> 1643		if (!urb->transfer_flags && URB_ANCHOR_PERMANENT)
  1644			usb_unanchor_urb(urb);
  1645		if (likely(status == 0))
  1646			usb_led_activity(USB_LED_EVENT_HOST);
  1647	
  1648		/* pass ownership to the completion handler */
  1649		urb->status = status;
  1650		kcov_remote_start_usb((u64)urb->dev->bus->busnum);
  1651		urb->complete(urb);
  1652		kcov_remote_stop();
  1653	
  1654		usb_anchor_resume_wakeups(anchor);
  1655		atomic_dec(&urb->use_count);
  1656		if (unlikely(atomic_read(&urb->reject)))
  1657			wake_up(&usb_kill_urb_queue);
  1658		usb_put_urb(urb);
  1659	}
  1660	

---
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: 37837 bytes --]

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

only message in thread, other threads:[~2020-07-28 12:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 12:25 [linux-review:UPDATE-20200728-174624/eli-billauer-gmail-com/usb-core-Solve-race-condition-in-usb_kill_anchored_urbs/20200727-152745 1/1] drivers/usb/core/hcd.c:1643:27: warning: use of logical '&&' with constant operand kernel test robot

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.