lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201810301412.5w7kxe2E%fengguang.wu@intel.com>
Date:   Tue, 30 Oct 2018 14:16:30 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Kai-Heng Feng <kai.heng.feng@...onical.com>
Cc:     kbuild-all@...org, gregkh@...uxfoundation.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        Kai-Heng Feng <kai.heng.feng@...onical.com>
Subject: Re: [PATCH] USB: Don't enable LPM if it's already enabled

Hi Kai-Heng,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on v4.19 next-20181029]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Kai-Heng-Feng/USB-Don-t-enable-LPM-if-it-s-already-enabled/20181030-135717
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-x002-201843 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/ioport.h:13:0,
                    from include/linux/device.h:15,
                    from drivers/usb/core/driver.c:28:
   drivers/usb/core/driver.c: In function 'usb_set_usb2_hardware_lpm':
   drivers/usb/core/driver.c:1904:13: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if (enable && !udev->usb2_hw_lpm_allowed ||
         ~~~~~~~^~~~~~~~~~~
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/usb/core/driver.c:1904:2: note: in expansion of macro 'if'
     if (enable && !udev->usb2_hw_lpm_allowed ||
     ^~
   drivers/usb/core/driver.c:1904:13: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if (enable && !udev->usb2_hw_lpm_allowed ||
         ~~~~~~~^~~~~~~~~~~
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/usb/core/driver.c:1904:2: note: in expansion of macro 'if'
     if (enable && !udev->usb2_hw_lpm_allowed ||
     ^~
   drivers/usb/core/driver.c:1904:13: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if (enable && !udev->usb2_hw_lpm_allowed ||
         ~~~~~~~^~~~~~~~~~~
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/usb/core/driver.c:1904:2: note: in expansion of macro 'if'
     if (enable && !udev->usb2_hw_lpm_allowed ||
     ^~

vim +/if +1904 drivers/usb/core/driver.c

  1898	
  1899	int usb_set_usb2_hardware_lpm(struct usb_device *udev, int enable)
  1900	{
  1901		struct usb_hcd *hcd = bus_to_hcd(udev->bus);
  1902		int ret = -EPERM;
  1903	
> 1904		if (enable && !udev->usb2_hw_lpm_allowed ||
  1905		    udev->usb2_hw_lpm_enabled == enable)
  1906			return 0;
  1907	
  1908		if (hcd->driver->set_usb2_hw_lpm) {
  1909			ret = hcd->driver->set_usb2_hw_lpm(hcd, udev, enable);
  1910			if (!ret)
  1911				udev->usb2_hw_lpm_enabled = enable;
  1912		}
  1913	
  1914		return ret;
  1915	}
  1916	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (33442 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ