From: kernel test robot <lkp@intel.com>
To: "Prashanth K" <quic_prashk@quicinc.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Thinh Nguyen" <Thinh.Nguyen@synopsys.com>,
"Jakob Koschel" <jakobkoschel@gmail.com>,
"Jó Ágila Bitsch" <jgilab@gmail.com>,
"Alan Stern" <stern@rowland.harvard.edu>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Pratham Pratap <quic_ppratap@quicinc.com>,
Jack Pham <quic_jackp@quicinc.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Prashanth K <quic_prashk@quicinc.com>
Subject: Re: [PATCH v2 2/2] usb: gadget: composite: Draw 100mA current if not configured
Date: Thu, 23 Feb 2023 20:09:06 +0800 [thread overview]
Message-ID: <202302231957.9Vfsa8ln-lkp@intel.com> (raw)
In-Reply-To: <1677142665-8686-3-git-send-email-quic_prashk@quicinc.com>
Hi Prashanth,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on usb/usb-next usb/usb-linus linus/master v6.2 next-20230223]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Prashanth-K/usb-dwc3-gadget-Change-condition-for-processing-suspend-event/20230223-165955
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/1677142665-8686-3-git-send-email-quic_prashk%40quicinc.com
patch subject: [PATCH v2 2/2] usb: gadget: composite: Draw 100mA current if not configured
config: x86_64-randconfig-a012 (https://download.01.org/0day-ci/archive/20230223/202302231957.9Vfsa8ln-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://github.com/intel-lab-lkp/linux/commit/19beaeb0554fc9c1556e8f7da85011f4267bd8fc
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Prashanth-K/usb-dwc3-gadget-Change-condition-for-processing-suspend-event/20230223-165955
git checkout 19beaeb0554fc9c1556e8f7da85011f4267bd8fc
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/usb/gadget/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302231957.9Vfsa8ln-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> drivers/usb/gadget/composite.c:2535:14: warning: comparison of distinct pointer types ('typeof (2) *' (aka 'int *') and 'typeof (100U) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
maxpower = min(CONFIG_USB_GADGET_VBUS_DRAW, 100U)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:67:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
>> drivers/usb/gadget/composite.c:2535:52: error: expected ';' after expression
maxpower = min(CONFIG_USB_GADGET_VBUS_DRAW, 100U)
^
;
1 warning and 1 error generated.
vim +2535 drivers/usb/gadget/composite.c
2504
2505 void composite_resume(struct usb_gadget *gadget)
2506 {
2507 struct usb_composite_dev *cdev = get_gadget_data(gadget);
2508 struct usb_function *f;
2509 unsigned maxpower;
2510
2511 /* REVISIT: should we have config level
2512 * suspend/resume callbacks?
2513 */
2514 DBG(cdev, "resume\n");
2515 if (cdev->driver->resume)
2516 cdev->driver->resume(cdev);
2517 if (cdev->config) {
2518 list_for_each_entry(f, &cdev->config->functions, list) {
2519 if (f->resume)
2520 f->resume(f);
2521 }
2522
2523 maxpower = cdev->config->MaxPower ?
2524 cdev->config->MaxPower : CONFIG_USB_GADGET_VBUS_DRAW;
2525 if (gadget->speed < USB_SPEED_SUPER)
2526 maxpower = min(maxpower, 500U);
2527 else
2528 maxpower = min(maxpower, 900U);
2529
2530 if (maxpower > USB_SELF_POWER_VBUS_MAX_DRAW)
2531 usb_gadget_clear_selfpowered(gadget);
2532
2533 usb_gadget_vbus_draw(gadget, maxpower);
2534 } else {
> 2535 maxpower = min(CONFIG_USB_GADGET_VBUS_DRAW, 100U)
2536 usb_gadget_vbus_draw(gadget, maxpower);
2537 }
2538
2539 cdev->suspended = 0;
2540 }
2541
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
prev parent reply other threads:[~2023-02-23 12:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 8:57 [PATCH v2 0/2] Fix vbus draw of dwc3 gadget Prashanth K
2023-02-23 8:57 ` [PATCH v2 1/2] usb: dwc3: gadget: Change condition for processing suspend event Prashanth K
2023-02-23 8:57 ` [PATCH v2 2/2] usb: gadget: composite: Draw 100mA current if not configured Prashanth K
2023-02-23 11:57 ` kernel test robot
2023-02-23 12:09 ` kernel test robot [this message]
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=202302231957.9Vfsa8ln-lkp@intel.com \
--to=lkp@intel.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=jakobkoschel@gmail.com \
--cc=jgilab@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_jackp@quicinc.com \
--cc=quic_ppratap@quicinc.com \
--cc=quic_prashk@quicinc.com \
--cc=stern@rowland.harvard.edu \
/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 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.