[xlnx:xlnx_rebase_v5.4 913/1701] drivers/usb/dwc3/core.c:977:5: warning: no previous prototype for 'dwc3_core_init'

kernel test robot lkp at intel.com
Thu Apr 1 22:45:28 BST 2021


Hi Anurag,

FYI, the error/warning still remains.

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head:   8540825db3d5519ef205a710515b7819b95eeb4f
commit: 526f56822f971265d67428fe61e40fe18f95ac81 [913/1701] usb: dwc3: Add hibernation support when operating as gadget
config: i386-randconfig-c021-20210401 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/Xilinx/linux-xlnx/commit/526f56822f971265d67428fe61e40fe18f95ac81
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx xlnx_rebase_v5.4
        git checkout 526f56822f971265d67428fe61e40fe18f95ac81
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/usb/dwc3/core.c:36:
   drivers/usb/dwc3/core.h:1444:6: warning: no previous prototype for 'dwc3_simple_wakeup_capable' [-Wmissing-prototypes]
    1444 | void dwc3_simple_wakeup_capable(struct device *dev, bool wakeup)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/dwc3/core.h:1446:6: warning: no previous prototype for 'dwc3_set_simple_data' [-Wmissing-prototypes]
    1446 | void dwc3_set_simple_data(struct dwc3 *dwc)
         |      ^~~~~~~~~~~~~~~~~~~~
   drivers/usb/dwc3/core.h:1448:6: warning: no previous prototype for 'dwc3_simple_check_quirks' [-Wmissing-prototypes]
    1448 | void dwc3_simple_check_quirks(struct dwc3 *dwc)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/dwc3/core.h:1450:5: warning: no previous prototype for 'dwc3_set_usb_core_power' [-Wmissing-prototypes]
    1450 | int dwc3_set_usb_core_power(struct dwc3 *dwc, bool on)
         |     ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/dwc3/core.c:386:6: warning: no previous prototype for 'dwc3_free_event_buffers' [-Wmissing-prototypes]
     386 | void dwc3_free_event_buffers(struct dwc3 *dwc)
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/dwc3/core.c:403:5: warning: no previous prototype for 'dwc3_alloc_event_buffers' [-Wmissing-prototypes]
     403 | int dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/usb/dwc3/core.c:977:5: warning: no previous prototype for 'dwc3_core_init' [-Wmissing-prototypes]
     977 | int dwc3_core_init(struct dwc3 *dwc)
         |     ^~~~~~~~~~~~~~
   In file included from drivers/usb/dwc3/core.c:36:
   drivers/usb/dwc3/core.h: In function 'dwc3_set_usb_core_power':
   drivers/usb/dwc3/core.h:1451:5: warning: control reaches end of non-void function [-Wreturn-type]
    1451 | { ; }
         |     ^


vim +/dwc3_core_init +977 drivers/usb/dwc3/core.c

   970	
   971	/**
   972	 * dwc3_core_init - Low-level initialization of DWC3 Core
   973	 * @dwc: Pointer to our controller context structure
   974	 *
   975	 * Returns 0 on success otherwise negative errno.
   976	 */
 > 977	int dwc3_core_init(struct dwc3 *dwc)
   978	{
   979		u32			reg;
   980		int			ret;
   981	
   982		/*
   983		 * Write Linux Version Code to our GUID register so it's easy to figure
   984		 * out which kernel version a bug was found.
   985		 */
   986		dwc3_writel(dwc->regs, DWC3_GUID, LINUX_VERSION_CODE);
   987	
   988		/* Handle USB2.0-only core configuration */
   989		if (DWC3_GHWPARAMS3_SSPHY_IFC(dwc->hwparams.hwparams3) ==
   990				DWC3_GHWPARAMS3_SSPHY_IFC_DIS) {
   991			if (dwc->maximum_speed == USB_SPEED_SUPER)
   992				dwc->maximum_speed = USB_SPEED_HIGH;
   993		}
   994	
   995		ret = dwc3_phy_setup(dwc);
   996		if (ret)
   997			goto err0;
   998	
   999		if (!dwc->ulpi_ready) {
  1000			ret = dwc3_core_ulpi_init(dwc);
  1001			if (ret)
  1002				goto err0;
  1003			dwc->ulpi_ready = true;
  1004		}
  1005	
  1006		if (!dwc->phys_ready) {
  1007			ret = dwc3_core_get_phy(dwc);
  1008			if (ret)
  1009				goto err0a;
  1010			dwc->phys_ready = true;
  1011		}
  1012	
  1013		ret = dwc3_core_soft_reset(dwc);
  1014		if (ret)
  1015			goto err0a;
  1016	
  1017		dwc3_core_setup_global_control(dwc);
  1018		dwc3_core_num_eps(dwc);
  1019	
  1020		if (dwc->scratchbuf == NULL) {
  1021			ret = dwc3_alloc_scratch_buffers(dwc);
  1022			if (ret) {
  1023				dev_err(dwc->dev,
  1024					"Not enough memory for scratch buffers\n");
  1025				goto err1;
  1026			}
  1027		}
  1028	
  1029		ret = dwc3_setup_scratch_buffers(dwc);
  1030		if (ret) {
  1031			dev_err(dwc->dev, "Failed to setup scratch buffers: %d\n", ret);
  1032			goto err1;
  1033		}
  1034	
  1035		/* Adjust Frame Length */
  1036		dwc3_frame_length_adjustment(dwc);
  1037	
  1038		dwc3_set_incr_burst_type(dwc);
  1039	
  1040		ret = dwc3_config_soc_bus(dwc);
  1041		if (ret)
  1042			goto err1;
  1043	
  1044		usb_phy_set_suspend(dwc->usb2_phy, 0);
  1045		usb_phy_set_suspend(dwc->usb3_phy, 0);
  1046		ret = phy_power_on(dwc->usb2_generic_phy);
  1047		if (ret < 0)
  1048			goto err2;
  1049	
  1050		ret = phy_power_on(dwc->usb3_generic_phy);
  1051		if (ret < 0)
  1052			goto err3;
  1053	
  1054		ret = dwc3_event_buffers_setup(dwc);
  1055		if (ret) {
  1056			dev_err(dwc->dev, "failed to setup event buffers\n");
  1057			goto err4;
  1058		}
  1059	
  1060		/*
  1061		 * ENDXFER polling is available on version 3.10a and later of
  1062		 * the DWC_usb3 controller. It is NOT available in the
  1063		 * DWC_usb31 controller.
  1064		 */
  1065		if (!dwc3_is_usb31(dwc) && dwc->revision >= DWC3_REVISION_310A) {
  1066			reg = dwc3_readl(dwc->regs, DWC3_GUCTL2);
  1067			reg |= DWC3_GUCTL2_RST_ACTBITLATER;
  1068			dwc3_writel(dwc->regs, DWC3_GUCTL2, reg);
  1069		}
  1070	
  1071		/* When configured in HOST mode, after issuing U3/L2 exit controller
  1072		 * fails to send proper CRC checksum in CRC5 feild. Because of this
  1073		 * behaviour Transaction Error is generated, resulting in reset and
  1074		 * re-enumeration of usb device attached. Enabling bit 10 of GUCTL1
  1075		 * will correct this problem
  1076		 */
  1077		if (dwc->enable_guctl1_resume_quirk) {
  1078			reg = dwc3_readl(dwc->regs, DWC3_GUCTL1);
  1079			reg |= DWC3_GUCTL1_RESUME_QUIRK;
  1080			dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
  1081		}
  1082	
  1083		/* SNPS controller when configureed in HOST mode maintains Inter Packet
  1084		 * Delay (IPD) of ~380ns which works with most of the super-speed hubs
  1085		 * except VIA-LAB hubs. When IPD is ~380ns HOST controller fails to
  1086		 * enumerate FS/LS devices when connected behind VIA-LAB hubs.
  1087		 * Enabling bit 9 of GUCTL1 enables the workaround in HW to reduce the
  1088		 * ULPI clock latency by 1 cycle, thus reducing the IPD (~360ns) and
  1089		 * making controller enumerate FS/LS devices connected behind VIA-LAB.
  1090		 */
  1091		if (dwc->enable_guctl1_ipd_quirk) {
  1092			reg = dwc3_readl(dwc->regs, DWC3_GUCTL1);
  1093			reg |= DWC3_GUCTL1_IPD_QUIRK;
  1094			dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
  1095		}
  1096	
  1097		if (dwc->revision >= DWC3_REVISION_250A) {
  1098			reg = dwc3_readl(dwc->regs, DWC3_GUCTL1);
  1099	
  1100			/*
  1101			 * Enable hardware control of sending remote wakeup
  1102			 * in HS when the device is in the L1 state.
  1103			 */
  1104			if (dwc->revision >= DWC3_REVISION_290A)
  1105				reg |= DWC3_GUCTL1_DEV_L1_EXIT_BY_HW;
  1106	
  1107			if (dwc->dis_tx_ipgap_linecheck_quirk)
  1108				reg |= DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS;
  1109	
  1110			dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
  1111		}
  1112	
  1113		if (dwc->dr_mode == USB_DR_MODE_HOST ||
  1114		    dwc->dr_mode == USB_DR_MODE_OTG) {
  1115			reg = dwc3_readl(dwc->regs, DWC3_GUCTL);
  1116	
  1117			/*
  1118			 * Enable Auto retry Feature to make the controller operating in
  1119			 * Host mode on seeing transaction errors(CRC errors or internal
  1120			 * overrun scenerios) on IN transfers to reply to the device
  1121			 * with a non-terminating retry ACK (i.e, an ACK transcation
  1122			 * packet with Retry=1 & Nump != 0)
  1123			 */
  1124			reg |= DWC3_GUCTL_HSTINAUTORETRY;
  1125	
  1126			dwc3_writel(dwc->regs, DWC3_GUCTL, reg);
  1127		}
  1128	
  1129		/*
  1130		 * Must config both number of packets and max burst settings to enable
  1131		 * RX and/or TX threshold.
  1132		 */
  1133		if (dwc3_is_usb31(dwc) && dwc->dr_mode == USB_DR_MODE_HOST) {
  1134			u8 rx_thr_num = dwc->rx_thr_num_pkt_prd;
  1135			u8 rx_maxburst = dwc->rx_max_burst_prd;
  1136			u8 tx_thr_num = dwc->tx_thr_num_pkt_prd;
  1137			u8 tx_maxburst = dwc->tx_max_burst_prd;
  1138	
  1139			if (rx_thr_num && rx_maxburst) {
  1140				reg = dwc3_readl(dwc->regs, DWC3_GRXTHRCFG);
  1141				reg |= DWC31_RXTHRNUMPKTSEL_PRD;
  1142	
  1143				reg &= ~DWC31_RXTHRNUMPKT_PRD(~0);
  1144				reg |= DWC31_RXTHRNUMPKT_PRD(rx_thr_num);
  1145	
  1146				reg &= ~DWC31_MAXRXBURSTSIZE_PRD(~0);
  1147				reg |= DWC31_MAXRXBURSTSIZE_PRD(rx_maxburst);
  1148	
  1149				dwc3_writel(dwc->regs, DWC3_GRXTHRCFG, reg);
  1150			}
  1151	
  1152			if (tx_thr_num && tx_maxburst) {
  1153				reg = dwc3_readl(dwc->regs, DWC3_GTXTHRCFG);
  1154				reg |= DWC31_TXTHRNUMPKTSEL_PRD;
  1155	
  1156				reg &= ~DWC31_TXTHRNUMPKT_PRD(~0);
  1157				reg |= DWC31_TXTHRNUMPKT_PRD(tx_thr_num);
  1158	
  1159				reg &= ~DWC31_MAXTXBURSTSIZE_PRD(~0);
  1160				reg |= DWC31_MAXTXBURSTSIZE_PRD(tx_maxburst);
  1161	
  1162				dwc3_writel(dwc->regs, DWC3_GTXTHRCFG, reg);
  1163			}
  1164		}
  1165	
  1166		return 0;
  1167	
  1168	err4:
  1169		phy_power_off(dwc->usb3_generic_phy);
  1170	
  1171	err3:
  1172		phy_power_off(dwc->usb2_generic_phy);
  1173	
  1174	err2:
  1175		usb_phy_set_suspend(dwc->usb2_phy, 1);
  1176		usb_phy_set_suspend(dwc->usb3_phy, 1);
  1177	
  1178	err1:
  1179		usb_phy_shutdown(dwc->usb2_phy);
  1180		usb_phy_shutdown(dwc->usb3_phy);
  1181		phy_exit(dwc->usb2_generic_phy);
  1182		phy_exit(dwc->usb3_generic_phy);
  1183	
  1184	err0a:
  1185		dwc3_ulpi_exit(dwc);
  1186	
  1187	err0:
  1188		return ret;
  1189	}
  1190	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35311 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210402/54e51e92/attachment-0001.gz>


More information about the linux-arm-kernel mailing list