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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201810301402.JIIqCQuU%fengguang.wu@intel.com>
Date:   Tue, 30 Oct 2018 14:30:47 +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: i386-randconfig-x074-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=i386 

All warnings (new ones prefixed by >>):

   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 ||
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +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" (35726 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ