[balbi-usb:next 69/89] drivers/usb/dwc3/gadget.c:1885:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'

[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: microblaze-randconfig-s002-20200520 (attached as .config)
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-193-gb8fad4bc-dirty
        git checkout edecc785996030331a83dddaeee960ab9302c608
        # save the attached .config to linux build tree
        make C=1 ARCH=microblaze CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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 drivers/usb/dwc3/debug.h:14,
from drivers/usb/dwc3/gadget.c:25:
drivers/usb/dwc3/gadget.c: In function 'dwc3_gadget_run_stop':
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
1413 |   dwc->revision >= _ip##_REVISION_##_from &&            |                 ^~
>> drivers/usb/dwc3/gadget.c:1885:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
1885 |   if (DWC3_VER_IS_WITHIN(DWC3, ANY, 187A)) {
|       ^~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/gadget.c: In function 'dwc3_gadget_conndone_interrupt':
drivers/usb/dwc3/core.h:1413:17: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
1413 |   dwc->revision >= _ip##_REVISION_##_from &&            |                 ^~
drivers/usb/dwc3/gadget.c:3025:7: note: in expansion of macro 'DWC3_VER_IS_WITHIN'
3025 |  if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A) &&
|       ^~~~~~~~~~~~~~~~~~

vim +/DWC3_VER_IS_WITHIN +1885 drivers/usb/dwc3/gadget.c

  1874	
  1875	static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
  1876	{
  1877		u32			reg;
  1878		u32			timeout = 500;
  1879	
  1880		if (pm_runtime_suspended(dwc->dev))
  1881			return 0;
  1882	
  1883		reg = dwc3_readl(dwc->regs, DWC3_DCTL);
  1884		if (is_on) {
> 1885			if (DWC3_VER_IS_WITHIN(DWC3, ANY, 187A)) {
  1886				reg &= ~DWC3_DCTL_TRGTULST_MASK;
  1887				reg |= DWC3_DCTL_TRGTULST_RX_DET;
  1888			}
  1889	
  1890			if (!DWC3_VER_IS_PRIOR(DWC3, 194A))
  1891				reg &= ~DWC3_DCTL_KEEP_CONNECT;
  1892			reg |= DWC3_DCTL_RUN_STOP;
  1893	
  1894			if (dwc->has_hibernation)
  1895				reg |= DWC3_DCTL_KEEP_CONNECT;
  1896	
  1897			dwc->pullups_connected = true;
  1898		} else {
  1899			reg &= ~DWC3_DCTL_RUN_STOP;
  1900	
  1901			if (dwc->has_hibernation && !suspend)
  1902				reg &= ~DWC3_DCTL_KEEP_CONNECT;
  1903	
  1904			dwc->pullups_connected = false;
  1905		}
  1906	
  1907		dwc3_gadget_dctl_write_safe(dwc, reg);
  1908	
  1909		do {
  1910			reg = dwc3_readl(dwc->regs, DWC3_DSTS);
  1911			reg &= DWC3_DSTS_DEVCTRLHLT;
  1912		} while (--timeout && !(!is_on ^ !reg));
  1913	
  1914		if (!timeout)
  1915			return -ETIMEDOUT;
  1916	
  1917		return 0;
  1918	}
  1919	

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