Re: [PATCH v2 44/49] usb: dwc2: Bit polling functionality update.

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

 



Hi Sevak,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on balbi-usb/next]
[cannot apply to v4.15-rc5 next-20171222]
[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/Grigor-Tovmasyan/usb-dwc2-fixes-enhancements-and-new-features/20171226-005211
base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
config: i386-randconfig-x005-201752 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/usb/dwc2/core.c: In function 'dwc2_flush_tx_fifo':
>> drivers/usb/dwc2/core.c:863:3: warning: 'greset' may be used uninitialized in this function [-Wmaybe-uninitialized]
      dev_warn(hsotg->dev, "%s() HANG! AHB Idle GRSTCTL=%0x\n",
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __func__, greset);
        ~~~~~~~~~~~~~~~~~
   drivers/usb/dwc2/core.c: In function 'dwc2_flush_rx_fifo':
   drivers/usb/dwc2/core.c:893:3: warning: 'greset' may be used uninitialized in this function [-Wmaybe-uninitialized]
      dev_warn(hsotg->dev, "%s() HANG! AHB Idle GRSTCTL=%0x\n",
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __func__, greset);
        ~~~~~~~~~~~~~~~~~

vim +/greset +863 drivers/usb/dwc2/core.c

   848	
   849	/**
   850	 * dwc2_flush_tx_fifo() - Flushes a Tx FIFO
   851	 *
   852	 * @hsotg: Programming view of DWC_otg controller
   853	 * @num:   Tx FIFO to flush
   854	 */
   855	void dwc2_flush_tx_fifo(struct dwc2_hsotg *hsotg, const int num)
   856	{
   857		u32 greset;
   858	
   859		dev_vdbg(hsotg->dev, "Flush Tx FIFO %d\n", num);
   860	
   861		/* Wait for AHB master IDLE state */
   862		if (dwc2_hsotg_wait_bit_set(hsotg, GRSTCTL, GRSTCTL_AHBIDLE, 10000)) {
 > 863			dev_warn(hsotg->dev, "%s() HANG! AHB Idle GRSTCTL=%0x\n",
   864				 __func__, greset);
   865			return;
   866		}
   867	
   868		greset = GRSTCTL_TXFFLSH;
   869		greset |= num << GRSTCTL_TXFNUM_SHIFT & GRSTCTL_TXFNUM_MASK;
   870		dwc2_writel(greset, hsotg->regs + GRSTCTL);
   871	
   872		if (dwc2_hsotg_wait_bit_clear(hsotg, GRSTCTL, GRSTCTL_TXFFLSH, 10000))
   873			dev_warn(hsotg->dev, "%s:  HANG! timeout GRSTCTL GRSTCTL_TXFFLSH\n",
   874				 __func__);
   875	
   876		/* Wait for at least 3 PHY Clocks */
   877		udelay(1);
   878	}
   879	

---
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 Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux