Hi Minas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20180309]
[cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2 v4.16-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Minas-Harutyunyan/usb-dwc2-gadget-Update-ISOC-DDMA-flow/20180317-012732
config: i386-randconfig-x075-201810 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/usb/dwc2/gadget.c: In function 'dwc2_gadget_start_isoc_ddma':
>> drivers/usb/dwc2/gadget.c:944:3: warning: this 'if' clause does not guard... 
>> [-Wmisleading-indentation]
      if (dwc2_hsotg_wait_bit_set(hsotg, GINTSTS,
      ^~
   drivers/usb/dwc2/gadget.c:948:4: note: ...this statement, but the latter is 
misleadingly indented as if it were guarded by the 'if'
       dwc2_writel(DXEPINT_OUTTKNEPDIS,
       ^~~~~~~~~~~
   drivers/usb/dwc2/gadget.c: In function 
'dwc2_gadget_complete_isoc_request_ddma':
   drivers/usb/dwc2/gadget.c:2233:4: warning: this 'if' clause does not 
guard... [-Wmisleading-indentation]
       if (sumofpid != 0)
       ^~
   drivers/usb/dwc2/gadget.c:2235:5: note: ...this statement, but the latter is 
misleadingly indented as if it were guarded by the 'if'
        break;
        ^~~~~
   drivers/usb/dwc2/gadget.c:2237:4: warning: this 'if' clause does not 
guard... [-Wmisleading-indentation]
       if (sumofpid != 5)
       ^~
   drivers/usb/dwc2/gadget.c:2239:5: note: ...this statement, but the latter is 
misleadingly indented as if it were guarded by the 'if'
        break;
        ^~~~~
   drivers/usb/dwc2/gadget.c:2241:4: warning: this 'if' clause does not 
guard... [-Wmisleading-indentation]
       if (sumofpid != 7)
       ^~
   drivers/usb/dwc2/gadget.c:2243:5: note: ...this statement, but the latter is 
misleadingly indented as if it were guarded by the 'if'
        break;
        ^~~~~

vim +/if +944 drivers/usb/dwc2/gadget.c

   887  
   888  /*
   889   * dwc2_gadget_start_isoc_ddma - start isochronous transfer in DDMA
   890   * @hs_ep: The isochronous endpoint.
   891   *
   892   * Prepare descriptor chain for isochronous endpoints. Afterwards
   893   * write DMA address to HW and enable the endpoint.
   894   */
   895  static void dwc2_gadget_start_isoc_ddma(struct dwc2_hsotg_ep *hs_ep)
   896  {
   897          struct dwc2_hsotg *hsotg = hs_ep->parent;
   898          struct dwc2_hsotg_req *hs_req, *treq;
   899          int index = hs_ep->index;
   900          int ret;
   901          u32 dma_reg;
   902          u32 depctl;
   903          u32 ctrl;
   904          struct dwc2_dma_desc *desc;
   905          int dpi;
   906  
   907          if (list_empty(&hs_ep->queue)) {
   908                  hs_ep->target_frame = TARGET_FRAME_INITIAL;
   909                  dev_dbg(hsotg->dev, "%s: No requests in queue\n", 
__func__);
   910                  return;
   911          }
   912  
   913          /* Descriptor count per interval (dpi): for IN set to 1, for OUT
   914           * set to mult, i.e. 1 descritor per each packet in frame
   915           */
   916          dpi = 1;
   917          if (!hs_ep->dir_in)
   918                  dpi = hs_ep->mc;
   919  
   920          /* Initialize descriptor chain by Host Busy status */
   921          for (ret = 0; ret < dpi * MAX_DMA_DESC_NUM_GENERIC; ret++) {
   922                  desc = &hs_ep->desc_list[ret];
   923                  desc->status = 0;
   924                  desc->status |= (DEV_DMA_BUFF_STS_HBUSY
   925                                      << DEV_DMA_BUFF_STS_SHIFT);
   926          }
   927  
   928          hs_ep->next_desc = 0;
   929          list_for_each_entry_safe(hs_req, treq, &hs_ep->queue, queue) {
   930                  ret = dwc2_gadget_fill_isoc_desc(hs_ep, hs_req->req.dma,
   931                                                   hs_req->req.length);
   932                  if (ret)
   933                          break;
   934          }
   935  
   936          depctl = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index);
   937          dma_reg = hs_ep->dir_in ? DIEPDMA(index) : DOEPDMA(index);
   938  
   939          /* write descriptor chain address to control register */
   940          dwc2_writel(hs_ep->desc_list_dma, hsotg->regs + dma_reg);
   941  
   942          /* Wait for EOPF interrupt for current (u)frame */
   943          if (dpi > 1) {
 > 944                  if (dwc2_hsotg_wait_bit_set(hsotg, GINTSTS,
   945                                              GINTSTS_EOPF, 100))
   946                          dev_warn(hsotg->dev,
   947                                   "%s: timeout GINTSTS.EOPF\n", 
__func__);
   948                          dwc2_writel(DXEPINT_OUTTKNEPDIS,
   949                                      hsotg->regs + 
DOEPINT(hs_ep->index));
   950          }
   951  
   952          ctrl = dwc2_readl(hsotg->regs + depctl);
   953          ctrl |= DXEPCTL_EPENA | DXEPCTL_CNAK;
   954          dwc2_writel(ctrl, hsotg->regs + depctl);
   955  }
   956  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to