[balbi-usb:testing/next 1/39] drivers/usb/dwc2/drd.c:80:36: error: 'struct dwc2_hsotg' has no member named 'test_mode'

[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:   74dbc49b08d37ed9d4fd440d8896626733f80564
commit: bc0f0d4a5853e32ba97a0318f774570428fc5634 [1/39] usb: dwc2: override PHY input signals with usb role switch support
config: nios2-randconfig-r002-20200724 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout bc0f0d4a5853e32ba97a0318f774570428fc5634
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/usb/dwc2/drd.c: In function 'dwc2_drd_role_sw_set':
>> drivers/usb/dwc2/drd.c:80:36: error: 'struct dwc2_hsotg' has no member named 'test_mode'
      80 |  if (role == USB_ROLE_NONE && hsotg->test_mode) {
         |                                    ^~
>> drivers/usb/dwc2/drd.c:114:5: error: implicit declaration of function 'dwc2_hsotg_core_disconnect'; did you mean 'dwc2_hsotg_core_connect'? [-Werror=implicit-function-declaration]
     114 |     dwc2_hsotg_core_disconnect(hsotg);
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |     dwc2_hsotg_core_connect
   cc1: some warnings being treated as errors

vim +80 drivers/usb/dwc2/drd.c

    68	
    69	static int dwc2_drd_role_sw_set(struct usb_role_switch *sw, enum usb_role role)
    70	{
    71		struct dwc2_hsotg *hsotg = usb_role_switch_get_drvdata(sw);
    72		unsigned long flags;
    73	
    74		/* Skip session not in line with dr_mode */
    75		if ((role == USB_ROLE_DEVICE && hsotg->dr_mode == USB_DR_MODE_HOST) ||
    76		    (role == USB_ROLE_HOST && hsotg->dr_mode == USB_DR_MODE_PERIPHERAL))
    77			return -EINVAL;
    78	
    79		/* Skip session if core is in test mode */
  > 80		if (role == USB_ROLE_NONE && hsotg->test_mode) {
    81			dev_dbg(hsotg->dev, "Core is in test mode\n");
    82			return -EBUSY;
    83		}
    84	
    85		spin_lock_irqsave(&hsotg->lock, flags);
    86	
    87		if (role == USB_ROLE_HOST) {
    88			if (dwc2_ovr_avalid(hsotg, true))
    89				goto unlock;
    90	
    91			if (hsotg->dr_mode == USB_DR_MODE_OTG)
    92				/*
    93				 * This will raise a Connector ID Status Change
    94				 * Interrupt - connID A
    95				 */
    96				dwc2_force_mode(hsotg, true);
    97		} else if (role == USB_ROLE_DEVICE) {
    98			if (dwc2_ovr_bvalid(hsotg, true))
    99				goto unlock;
   100	
   101			if (hsotg->dr_mode == USB_DR_MODE_OTG)
   102				/*
   103				 * This will raise a Connector ID Status Change
   104				 * Interrupt - connID B
   105				 */
   106				dwc2_force_mode(hsotg, false);
   107	
   108			/* This clear DCTL.SFTDISCON bit */
   109			dwc2_hsotg_core_connect(hsotg);
   110		} else {
   111			if (dwc2_is_device_mode(hsotg)) {
   112				if (!dwc2_ovr_bvalid(hsotg, false))
   113					/* This set DCTL.SFTDISCON bit */
 > 114					dwc2_hsotg_core_disconnect(hsotg);
   115			} else {
   116				dwc2_ovr_avalid(hsotg, false);
   117			}
   118		}
   119	
   120	unlock:
   121		spin_unlock_irqrestore(&hsotg->lock, flags);
   122	
   123		dev_dbg(hsotg->dev, "%s-session valid\n",
   124			role == USB_ROLE_NONE ? "No" :
   125			role == USB_ROLE_HOST ? "A" : "B");
   126	
   127		return 0;
   128	}
   129	

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