From: kernel test robot <lkp@intel.com>
To: Srikanth Chary Chennoju <srikanth.chary-chennoju@amd.com>,
gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com,
m.grzeschik@pengutronix.de, Chris.Wulff@biamp.com, tiwai@suse.de
Cc: oe-kbuild-all@lists.linux.dev, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, punnaiah.choudary.kalluri@amd.com,
Srikanth Chary Chennoju <srikanth.chary-chennoju@amd.com>
Subject: Re: [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers
Date: Sat, 5 Jul 2025 11:02:37 +0800 [thread overview]
Message-ID: <202507051018.998T0Yqk-lkp@intel.com> (raw)
In-Reply-To: <20250704114013.3396795-4-srikanth.chary-chennoju@amd.com>
Hi Srikanth,
kernel test robot noticed the following build warnings:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus linus/master v6.16-rc4 next-20250704]
[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/Srikanth-Chary-Chennoju/usb-gadget-zero-support-for-super-speed-plus/20250704-194150
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20250704114013.3396795-4-srikanth.chary-chennoju%40amd.com
patch subject: [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers
config: i386-randconfig-063-20250705 (https://download.01.org/0day-ci/archive/20250705/202507051018.998T0Yqk-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250705/202507051018.998T0Yqk-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507051018.998T0Yqk-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/usb/gadget/function/f_sourcesink.c:382:43: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@ got unsigned int @@
drivers/usb/gadget/function/f_sourcesink.c:382:43: sparse: expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
drivers/usb/gadget/function/f_sourcesink.c:382:43: sparse: got unsigned int
drivers/usb/gadget/function/f_sourcesink.c:385:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@ got unsigned int @@
drivers/usb/gadget/function/f_sourcesink.c:385:41: sparse: expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
drivers/usb/gadget/function/f_sourcesink.c:385:41: sparse: got unsigned int
drivers/usb/gadget/function/f_sourcesink.c:421:43: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@ got unsigned int isoc_maxpacket @@
drivers/usb/gadget/function/f_sourcesink.c:421:43: sparse: expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
drivers/usb/gadget/function/f_sourcesink.c:421:43: sparse: got unsigned int isoc_maxpacket
drivers/usb/gadget/function/f_sourcesink.c:422:43: sparse: sparse: invalid assignment: |=
drivers/usb/gadget/function/f_sourcesink.c:422:43: sparse: left side has type restricted __le16
drivers/usb/gadget/function/f_sourcesink.c:422:43: sparse: right side has type unsigned int
drivers/usb/gadget/function/f_sourcesink.c:427:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@ got unsigned int isoc_maxpacket @@
drivers/usb/gadget/function/f_sourcesink.c:427:41: sparse: expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
drivers/usb/gadget/function/f_sourcesink.c:427:41: sparse: got unsigned int isoc_maxpacket
drivers/usb/gadget/function/f_sourcesink.c:428:41: sparse: sparse: invalid assignment: |=
drivers/usb/gadget/function/f_sourcesink.c:428:41: sparse: left side has type restricted __le16
drivers/usb/gadget/function/f_sourcesink.c:428:41: sparse: right side has type unsigned int
drivers/usb/gadget/function/f_sourcesink.c:443:43: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@ got unsigned int isoc_maxpacket @@
drivers/usb/gadget/function/f_sourcesink.c:443:43: sparse: expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
drivers/usb/gadget/function/f_sourcesink.c:443:43: sparse: got unsigned int isoc_maxpacket
drivers/usb/gadget/function/f_sourcesink.c:447:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 static [addressable] [assigned] [toplevel] [usertype] wBytesPerInterval @@ got unsigned int @@
drivers/usb/gadget/function/f_sourcesink.c:447:51: sparse: expected restricted __le16 static [addressable] [assigned] [toplevel] [usertype] wBytesPerInterval
drivers/usb/gadget/function/f_sourcesink.c:447:51: sparse: got unsigned int
drivers/usb/gadget/function/f_sourcesink.c:452:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@ got unsigned int isoc_maxpacket @@
drivers/usb/gadget/function/f_sourcesink.c:452:41: sparse: expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
drivers/usb/gadget/function/f_sourcesink.c:452:41: sparse: got unsigned int isoc_maxpacket
drivers/usb/gadget/function/f_sourcesink.c:456:49: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 static [addressable] [assigned] [toplevel] [usertype] wBytesPerInterval @@ got unsigned int @@
drivers/usb/gadget/function/f_sourcesink.c:456:49: sparse: expected restricted __le16 static [addressable] [assigned] [toplevel] [usertype] wBytesPerInterval
drivers/usb/gadget/function/f_sourcesink.c:456:49: sparse: got unsigned int
>> drivers/usb/gadget/function/f_sourcesink.c:460:53: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 static [addressable] [toplevel] [usertype] dwBytesPerInterval @@ got unsigned int @@
drivers/usb/gadget/function/f_sourcesink.c:460:53: sparse: expected restricted __le32 static [addressable] [toplevel] [usertype] dwBytesPerInterval
drivers/usb/gadget/function/f_sourcesink.c:460:53: sparse: got unsigned int
drivers/usb/gadget/function/f_sourcesink.c:462:51: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 static [addressable] [toplevel] [usertype] dwBytesPerInterval @@ got unsigned int @@
drivers/usb/gadget/function/f_sourcesink.c:462:51: sparse: expected restricted __le32 static [addressable] [toplevel] [usertype] dwBytesPerInterval
drivers/usb/gadget/function/f_sourcesink.c:462:51: sparse: got unsigned int
vim +460 drivers/usb/gadget/function/f_sourcesink.c
330
331 static int
332 sourcesink_bind(struct usb_configuration *c, struct usb_function *f)
333 {
334 struct usb_composite_dev *cdev = c->cdev;
335 struct f_sourcesink *ss = func_to_ss(f);
336 int id;
337 int ret;
338
339 /* allocate interface ID(s) */
340 id = usb_interface_id(c, f);
341 if (id < 0)
342 return id;
343 source_sink_intf_alt0.bInterfaceNumber = id;
344 source_sink_intf_alt1.bInterfaceNumber = id;
345
346 /* sanity check the bulk module parameters */
347 if (ss->bulk_maxburst > 15)
348 ss->bulk_maxburst = 15;
349
350 /* allocate bulk endpoints */
351 ss->in_ep = usb_ep_autoconfig(cdev->gadget, &fs_source_desc);
352 if (!ss->in_ep) {
353 autoconf_fail:
354 ERROR(cdev, "%s: can't autoconfigure on %s\n",
355 f->name, cdev->gadget->name);
356 return -ENODEV;
357 }
358
359 ss->out_ep = usb_ep_autoconfig(cdev->gadget, &fs_sink_desc);
360 if (!ss->out_ep)
361 goto autoconf_fail;
362
363 /*
364 * Fill in the SS bulk descriptors from the module parameters.
365 * We assume that the user knows what they are doing and won't
366 * give parameters that their UDC doesn't support.
367 */
368 ss_source_comp_desc.bMaxBurst = ss->bulk_maxburst;
369 ss_sink_comp_desc.bMaxBurst = ss->bulk_maxburst;
370
371 /* sanity check the isoc module parameters */
372 if (ss->isoc_interval < 1)
373 ss->isoc_interval = 1;
374 if (ss->isoc_interval > 16)
375 ss->isoc_interval = 16;
376 if (ss->isoc_mult > 2)
377 ss->isoc_mult = 2;
378 if (ss->isoc_maxburst > 15)
379 ss->isoc_maxburst = 15;
380
381 /* fill in the FS isoc descriptors from the module parameters */
382 fs_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket > 1023 ?
383 1023 : ss->isoc_maxpacket;
384 fs_iso_source_desc.bInterval = ss->isoc_interval;
385 fs_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket > 1023 ?
386 1023 : ss->isoc_maxpacket;
387 fs_iso_sink_desc.bInterval = ss->isoc_interval;
388
389 /* allocate iso endpoints */
390 ss->iso_in_ep = usb_ep_autoconfig(cdev->gadget, &fs_iso_source_desc);
391 if (!ss->iso_in_ep)
392 goto no_iso;
393
394 ss->iso_out_ep = usb_ep_autoconfig(cdev->gadget, &fs_iso_sink_desc);
395 if (!ss->iso_out_ep) {
396 usb_ep_autoconfig_release(ss->iso_in_ep);
397 ss->iso_in_ep = NULL;
398 no_iso:
399 /*
400 * We still want to work even if the UDC doesn't have isoc
401 * endpoints, so null out the alt interface that contains
402 * them and continue.
403 */
404 fs_source_sink_descs[FS_ALT_IFC_1_OFFSET] = NULL;
405 hs_source_sink_descs[HS_ALT_IFC_1_OFFSET] = NULL;
406 ss_source_sink_descs[SS_ALT_IFC_1_OFFSET] = NULL;
407 }
408
409 if (ss->isoc_maxpacket > 1024)
410 ss->isoc_maxpacket = 1024;
411
412 /* support high speed hardware */
413 hs_source_desc.bEndpointAddress = fs_source_desc.bEndpointAddress;
414 hs_sink_desc.bEndpointAddress = fs_sink_desc.bEndpointAddress;
415
416 /*
417 * Fill in the HS isoc descriptors from the module parameters.
418 * We assume that the user knows what they are doing and won't
419 * give parameters that their UDC doesn't support.
420 */
421 hs_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket;
422 hs_iso_source_desc.wMaxPacketSize |= ss->isoc_mult << 11;
423 hs_iso_source_desc.bInterval = ss->isoc_interval;
424 hs_iso_source_desc.bEndpointAddress =
425 fs_iso_source_desc.bEndpointAddress;
426
427 hs_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket;
428 hs_iso_sink_desc.wMaxPacketSize |= ss->isoc_mult << 11;
429 hs_iso_sink_desc.bInterval = ss->isoc_interval;
430 hs_iso_sink_desc.bEndpointAddress = fs_iso_sink_desc.bEndpointAddress;
431
432 /* support super speed hardware */
433 ss_source_desc.bEndpointAddress =
434 fs_source_desc.bEndpointAddress;
435 ss_sink_desc.bEndpointAddress =
436 fs_sink_desc.bEndpointAddress;
437
438 /*
439 * Fill in the SS isoc descriptors from the module parameters.
440 * We assume that the user knows what they are doing and won't
441 * give parameters that their UDC doesn't support.
442 */
443 ss_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket;
444 ss_iso_source_desc.bInterval = ss->isoc_interval;
445 ss_iso_source_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;
446 ss_iso_source_comp_desc.bMaxBurst = ss->isoc_maxburst;
447 ss_iso_source_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
448 (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1);
449 ss_iso_source_desc.bEndpointAddress =
450 fs_iso_source_desc.bEndpointAddress;
451
452 ss_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket;
453 ss_iso_sink_desc.bInterval = ss->isoc_interval;
454 ss_iso_sink_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;
455 ss_iso_sink_comp_desc.bMaxBurst = ss->isoc_maxburst;
456 ss_iso_sink_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
457 (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1);
458 ss_iso_sink_desc.bEndpointAddress = fs_iso_sink_desc.bEndpointAddress;
459
> 460 ssp_iso_source_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
461 (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
462 ssp_iso_sink_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
463 (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
464
465 ret = usb_assign_descriptors(f, fs_source_sink_descs,
466 hs_source_sink_descs, ss_source_sink_descs,
467 ss_source_sink_descs);
468 if (ret)
469 return ret;
470
471 DBG(cdev, "%s: IN/%s, OUT/%s, ISO-IN/%s, ISO-OUT/%s\n",
472 f->name, ss->in_ep->name, ss->out_ep->name,
473 ss->iso_in_ep ? ss->iso_in_ep->name : "<none>",
474 ss->iso_out_ep ? ss->iso_out_ep->name : "<none>");
475 return 0;
476 }
477
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-07-05 3:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 11:40 [PATCH 0/3] Add support for Superspeed plus EndPoint for Bulk and Isochronous transfers Srikanth Chary Chennoju
2025-07-04 11:40 ` [PATCH 1/3] usb:gadget:zero: support for super speed plus Srikanth Chary Chennoju
2025-07-04 12:04 ` Greg KH
2025-07-07 10:41 ` Chary Chennoju, Srikanth
2025-08-11 15:35 ` Chary Chennoju, Srikanth
2025-08-11 15:58 ` Greg KH
2025-07-04 11:40 ` [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers Srikanth Chary Chennoju
2025-07-04 13:47 ` Alan Stern
2025-07-07 10:49 ` Chary Chennoju, Srikanth
2025-07-07 13:45 ` Alan Stern
2025-07-07 14:01 ` Chary Chennoju, Srikanth
2025-08-11 15:36 ` Chary Chennoju, Srikanth
2025-08-11 16:10 ` Alan Stern
2025-07-04 11:40 ` [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers Srikanth Chary Chennoju
2025-07-04 12:03 ` Greg KH
2025-07-07 10:38 ` Chary Chennoju, Srikanth
2025-08-11 15:37 ` Chary Chennoju, Srikanth
2025-07-05 3:02 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202507051018.998T0Yqk-lkp@intel.com \
--to=lkp@intel.com \
--cc=Chris.Wulff@biamp.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.grzeschik@pengutronix.de \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=punnaiah.choudary.kalluri@amd.com \
--cc=srikanth.chary-chennoju@amd.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox