From: kbuild test robot <lkp@intel.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: kbuild-all@01.org, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Kai-Heng Feng <kai.heng.feng@canonical.com>
Subject: Re: [PATCH] USB: Don't enable LPM if it's already enabled
Date: Tue, 30 Oct 2018 14:16:30 +0800 [thread overview]
Message-ID: <201810301412.5w7kxe2E%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181030055452.25969-1-kai.heng.feng@canonical.com>
[-- Attachment #1: Type: text/plain, Size: 3097 bytes --]
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33442 bytes --]
next prev parent reply other threads:[~2018-10-30 6:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 5:54 Kai-Heng Feng
2018-10-30 6:16 ` kbuild test robot [this message]
2018-10-30 6:30 ` kbuild test robot
2018-10-30 14:24 ` Mathias Nyman
2018-10-30 15:00 ` Alan Stern
2018-10-30 15:07 ` Kai Heng Feng
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=201810301412.5w7kxe2E%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kai.heng.feng@canonical.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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 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®