Re: [PATCH 04/11] usb: udc: assign epnum for each usb endpoint

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

 



Hi Linyu,

kernel test robot noticed the following build errors:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on usb/usb-next usb/usb-linus tegra/for-next linus/master v6.6-rc1 next-20230911]
[cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Linyu-Yuan/usb-gadget-add-anonymous-definition-in-struct-usb_gadget/20230911-123307
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link:    https://lore.kernel.org/r/20230911042843.2711-5-quic_linyyuan%40quicinc.com
patch subject: [PATCH 04/11] usb: udc: assign epnum for each usb endpoint
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20230911/202309111507.a1IUZf1O-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230911/202309111507.a1IUZf1O-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309111507.a1IUZf1O-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/usb/gadget/udc/tegra-xudc.c: In function 'tegra_xudc_alloc_ep':
>> drivers/usb/gadget/udc/tegra-xudc.c:3176:19: error: 'struct tegra_xudc_ep' has no member named 'ep'
    3176 |                 ep->ep.epnum = index / 2;
         |                   ^~
   drivers/usb/gadget/udc/tegra-xudc.c:3190:19: error: 'struct tegra_xudc_ep' has no member named 'ep'
    3190 |                 ep->ep.epnum = 0;
         |                   ^~


vim +3176 drivers/usb/gadget/udc/tegra-xudc.c

  3150	
  3151	static int tegra_xudc_alloc_ep(struct tegra_xudc *xudc, unsigned int index)
  3152	{
  3153		struct tegra_xudc_ep *ep = &xudc->ep[index];
  3154	
  3155		ep->xudc = xudc;
  3156		ep->index = index;
  3157		ep->context = &xudc->ep_context[index];
  3158		INIT_LIST_HEAD(&ep->queue);
  3159	
  3160		/*
  3161		 * EP1 would be the input endpoint corresponding to EP0, but since
  3162		 * EP0 is bi-directional, EP1 is unused.
  3163		 */
  3164		if (index == 1)
  3165			return 0;
  3166	
  3167		ep->transfer_ring = dma_pool_alloc(xudc->transfer_ring_pool,
  3168						   GFP_KERNEL,
  3169						   &ep->transfer_ring_phys);
  3170		if (!ep->transfer_ring)
  3171			return -ENOMEM;
  3172	
  3173		if (index) {
  3174			snprintf(ep->name, sizeof(ep->name), "ep%u%s", index / 2,
  3175				 (index % 2 == 0) ? "out" : "in");
> 3176			ep->ep.epnum = index / 2;
  3177			ep->usb_ep.name = ep->name;
  3178			usb_ep_set_maxpacket_limit(&ep->usb_ep, 1024);
  3179			ep->usb_ep.max_streams = 16;
  3180			ep->usb_ep.ops = &tegra_xudc_ep_ops;
  3181			ep->usb_ep.caps.type_bulk = true;
  3182			ep->usb_ep.caps.type_int = true;
  3183			if (index & 1)
  3184				ep->usb_ep.caps.dir_in = true;
  3185			else
  3186				ep->usb_ep.caps.dir_out = true;
  3187			list_add_tail(&ep->usb_ep.ep_list, &xudc->gadget.ep_list);
  3188		} else {
  3189			strscpy(ep->name, "ep0", 3);
  3190			ep->ep.epnum = 0;
  3191			ep->usb_ep.name = ep->name;
  3192			usb_ep_set_maxpacket_limit(&ep->usb_ep, 512);
  3193			ep->usb_ep.ops = &tegra_xudc_ep0_ops;
  3194			ep->usb_ep.caps.type_control = true;
  3195			ep->usb_ep.caps.dir_in = true;
  3196			ep->usb_ep.caps.dir_out = true;
  3197		}
  3198	
  3199		return 0;
  3200	}
  3201	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux