[balbi-usb:next 69/89] drivers/usb/dwc3/core.c:292:2: note: in expansion of macro 'if'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
head:   a65a1ec70639afa5ff7990cf33213dd41f3c7176
commit: edecc785996030331a83dddaeee960ab9302c608 [69/89] usb: dwc3: Add support for DWC_usb32 IP
config: i386-randconfig-a002-20200520 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
        git checkout edecc785996030331a83dddaeee960ab9302c608
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/err.h:5:0,
from include/linux/clk.h:12,
from drivers/usb/dwc3/core.c:11:
drivers/usb/dwc3/core.c: In function 'dwc3_core_soft_reset':
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/usb/dwc3/core.c:292:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~
drivers/usb/dwc3/core.c:292:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/usb/dwc3/core.c:292:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~
drivers/usb/dwc3/core.c:292:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
(cond) ?           ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~
>> drivers/usb/dwc3/core.c:292:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~
drivers/usb/dwc3/core.c:292:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.c: In function 'dwc3_phy_setup':
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/usb/dwc3/core.c:588:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:588:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/usb/dwc3/core.c:588:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:588:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
(cond) ?           ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~
drivers/usb/dwc3/core.c:588:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:588:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/usb/dwc3/core.c:679:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:679:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/usb/dwc3/core.c:679:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:679:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
(cond) ?           ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~
drivers/usb/dwc3/core.c:679:2: note: in expansion of macro 'if'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~
drivers/usb/dwc3/core.c:679:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.c: In function 'dwc3_core_init':
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
drivers/usb/dwc3/core.c:962:2: note: in expansion of macro 'if'
if (hw_mode == DWC3_GHWPARAMS0_MODE_DRD &&
^~
drivers/usb/dwc3/core.c:963:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A)) {
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
--
In file included from include/linux/ioport.h:13:0,
from include/linux/acpi.h:12,
from drivers/usb/dwc3/host.c:10:
drivers/usb/dwc3/host.c: In function 'dwc3_host_init':
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/usb/dwc3/host.c:107:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~
drivers/usb/dwc3/host.c:107:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> drivers/usb/dwc3/host.c:107:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~
drivers/usb/dwc3/host.c:107:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
dwc->revision >= _ip##_REVISION_##_from &&                       ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
(cond) ?           ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~
>> drivers/usb/dwc3/host.c:107:2: note: in expansion of macro 'if'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~
drivers/usb/dwc3/host.c:107:6: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
if (DWC3_VER_IS_WITHIN(DWC3, ANY, 300A))
^~~~~~~~~~~~~~~~~~

vim +/if +292 drivers/usb/dwc3/core.c

   226	
   227	/**
   228	 * dwc3_core_soft_reset - Issues core soft reset and PHY reset
   229	 * @dwc: pointer to our context structure
   230	 */
   231	static int dwc3_core_soft_reset(struct dwc3 *dwc)
   232	{
   233		u32		reg;
   234		int		retries = 1000;
   235		int		ret;
   236	
   237		usb_phy_init(dwc->usb2_phy);
   238		usb_phy_init(dwc->usb3_phy);
   239		ret = phy_init(dwc->usb2_generic_phy);
   240		if (ret < 0)
   241			return ret;
   242	
   243		ret = phy_init(dwc->usb3_generic_phy);
   244		if (ret < 0) {
   245			phy_exit(dwc->usb2_generic_phy);
   246			return ret;
   247		}
   248	
   249		/*
   250		 * We're resetting only the device side because, if we're in host mode,
   251		 * XHCI driver will reset the host block. If dwc3 was configured for
   252		 * host-only mode, then we can return early.
   253		 */
   254		if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST)
   255			return 0;
   256	
   257		reg = dwc3_readl(dwc->regs, DWC3_DCTL);
   258		reg |= DWC3_DCTL_CSFTRST;
   259		dwc3_writel(dwc->regs, DWC3_DCTL, reg);
   260	
   261		/*
   262		 * For DWC_usb31 controller 1.90a and later, the DCTL.CSFRST bit
   263		 * is cleared only after all the clocks are synchronized. This can
   264		 * take a little more than 50ms. Set the polling rate at 20ms
   265		 * for 10 times instead.
   266		 */
   267		if (DWC3_VER_IS_WITHIN(DWC31, 190A, ANY) || DWC3_IP_IS(DWC32))
   268			retries = 10;
   269	
   270		do {
   271			reg = dwc3_readl(dwc->regs, DWC3_DCTL);
   272			if (!(reg & DWC3_DCTL_CSFTRST))
   273				goto done;
   274	
   275			if (DWC3_VER_IS_WITHIN(DWC31, 190A, ANY) || DWC3_IP_IS(DWC32))
   276				msleep(20);
   277			else
   278				udelay(1);
   279		} while (--retries);
   280	
   281		phy_exit(dwc->usb3_generic_phy);
   282		phy_exit(dwc->usb2_generic_phy);
   283	
   284		return -ETIMEDOUT;
   285	
   286	done:
   287		/*
   288		 * For DWC_usb31 controller 1.80a and prior, once DCTL.CSFRST bit
   289		 * is cleared, we must wait at least 50ms before accessing the PHY
   290		 * domain (synchronization delay).
   291		 */
 > 292		if (DWC3_VER_IS_WITHIN(DWC31, ANY, 180A))
   293			msleep(50);
   294	
   295		return 0;
   296	}
   297	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux