[balbi-usb:testing/next 19/21] drivers/usb//dwc3/gadget.c:2630:3: error: expected expression before '||' token

[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 testing/next
head:   72bc0e861a6678b4a36653cd94147a5043959ed2
commit: 5f404e8452cb9ff560e8f2a254e29d1449632a0d [19/21] usb: dwc3: gadget: don't use resource_index as a flag
config: x86_64-randconfig-x017-201904 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
reproduce:
        git checkout 5f404e8452cb9ff560e8f2a254e29d1449632a0d
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the balbi-usb/testing/next HEAD 72bc0e861a6678b4a36653cd94147a5043959ed2 builds fine.
      It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

   drivers/usb//dwc3/gadget.c: In function 'dwc3_stop_active_transfer':
>> drivers/usb//dwc3/gadget.c:2630:3: error: expected expression before '||' token
      || !(dep->flags & DWC3_EP_TRANSFER_STARTED))
      ^~
>> drivers/usb//dwc3/gadget.c:2629:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (dep->flags & DWC3_EP_END_TRANSFER_PENDING)
     ^~
   drivers/usb//dwc3/gadget.c:2630:46: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
      || !(dep->flags & DWC3_EP_TRANSFER_STARTED))
                                                 ^
>> drivers/usb//dwc3/gadget.c:2630:46: error: expected statement before ')' token

vim +2630 drivers/usb//dwc3/gadget.c

  2621	
  2622	static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force)
  2623	{
  2624		struct dwc3 *dwc = dep->dwc;
  2625		struct dwc3_gadget_ep_cmd_params params;
  2626		u32 cmd;
  2627		int ret;
  2628	
> 2629		if (dep->flags & DWC3_EP_END_TRANSFER_PENDING)
> 2630			|| !(dep->flags & DWC3_EP_TRANSFER_STARTED))
  2631			return;
  2632	
  2633		/*
  2634		 * NOTICE: We are violating what the Databook says about the
  2635		 * EndTransfer command. Ideally we would _always_ wait for the
  2636		 * EndTransfer Command Completion IRQ, but that's causing too
  2637		 * much trouble synchronizing between us and gadget driver.
  2638		 *
  2639		 * We have discussed this with the IP Provider and it was
  2640		 * suggested to giveback all requests here, but give HW some
  2641		 * extra time to synchronize with the interconnect. We're using
  2642		 * an arbitrary 100us delay for that.
  2643		 *
  2644		 * Note also that a similar handling was tested by Synopsys
  2645		 * (thanks a lot Paul) and nothing bad has come out of it.
  2646		 * In short, what we're doing is:
  2647		 *
  2648		 * - Issue EndTransfer WITH CMDIOC bit set
  2649		 * - Wait 100us
  2650		 *
  2651		 * As of IP version 3.10a of the DWC_usb3 IP, the controller
  2652		 * supports a mode to work around the above limitation. The
  2653		 * software can poll the CMDACT bit in the DEPCMD register
  2654		 * after issuing a EndTransfer command. This mode is enabled
  2655		 * by writing GUCTL2[14]. This polling is already done in the
  2656		 * dwc3_send_gadget_ep_cmd() function so if the mode is
  2657		 * enabled, the EndTransfer command will have completed upon
  2658		 * returning from this function and we don't need to delay for
  2659		 * 100us.
  2660		 *
  2661		 * This mode is NOT available on the DWC_usb31 IP.
  2662		 */
  2663	
  2664		cmd = DWC3_DEPCMD_ENDTRANSFER;
  2665		cmd |= force ? DWC3_DEPCMD_HIPRI_FORCERM : 0;
  2666		cmd |= DWC3_DEPCMD_CMDIOC;
  2667		cmd |= DWC3_DEPCMD_PARAM(dep->resource_index);
  2668		memset(&params, 0, sizeof(params));
  2669		ret = dwc3_send_gadget_ep_cmd(dep, cmd, &params);
  2670		WARN_ON_ONCE(ret);
  2671		dep->resource_index = 0;
  2672	
  2673		if (dwc3_is_usb31(dwc) || dwc->revision < DWC3_REVISION_310A) {
  2674			dep->flags |= DWC3_EP_END_TRANSFER_PENDING;
  2675			udelay(100);
  2676		}
  2677	}
  2678	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux