All of lore.kernel.org
 help / color / mirror / Atom feed
* [linuxtv-media-pending:next 144/157] drivers/media/usb/em28xx/em28xx-cards.c:3889:2-3: Unneeded semicolon
@ 2026-03-26 18:50 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-03-26 18:50 UTC (permalink / raw)
  To: Bradford Love; +Cc: oe-kbuild-all, linux-media, Hans Verkuil

tree:   https://git.linuxtv.org/media-ci/media-pending.git next
head:   ebeec2b000a90cd8aae86d1931ff5ef23af8284e
commit: 8e53399c63c3152fd572596acedcdaea4cabbc45 [144/157] media: em28xx: Add support for Empia em2828X bridge
config: riscv-randconfig-r064-20260326 (https://download.01.org/0day-ci/archive/20260327/202603270214.pyo7p8m7-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)

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/202603270214.pyo7p8m7-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/media/usb/em28xx/em28xx-cards.c:3889:2-3: Unneeded semicolon
--
>> drivers/media/usb/em28xx/em28xx-core.c:635:2-3: Unneeded semicolon

vim +3889 drivers/media/usb/em28xx/em28xx-cards.c

  3771	
  3772	static void em28xx_check_usb_descriptor(struct em28xx *dev,
  3773						struct usb_device *udev,
  3774						struct usb_interface *intf,
  3775						int alt, int ep,
  3776						bool *has_vendor_audio,
  3777						bool *has_video,
  3778						bool *has_dvb)
  3779	{
  3780		const struct usb_endpoint_descriptor *e;
  3781		int sizedescr, size;
  3782	
  3783		/*
  3784		 * NOTE:
  3785		 *
  3786		 * Old logic with support for isoc transfers only was:
  3787		 *  0x82	isoc		=> analog
  3788		 *  0x83	isoc		=> audio
  3789		 *  0x84	isoc		=> digital
  3790		 *
  3791		 * New logic with support for bulk transfers
  3792		 *  0x82	isoc		=> analog
  3793		 *  0x82	bulk		=> analog
  3794		 *  0x83	isoc*		=> audio
  3795		 *  0x84	isoc		=> digital
  3796		 *  0x84	bulk		=> analog or digital**
  3797		 *  0x85	isoc		=> digital TS2
  3798		 *  0x85	bulk		=> digital TS2
  3799		 *  0x8a	isoc		=> digital video
  3800		 * (*: audio should always be isoc)
  3801		 * (**: analog, if ep 0x82 is isoc, otherwise digital)
  3802		 *
  3803		 * The new logic preserves backwards compatibility and
  3804		 * reflects the endpoint configurations we have seen
  3805		 * so far. But there might be devices for which this
  3806		 * logic is not sufficient...
  3807		 */
  3808	
  3809		e = &intf->altsetting[alt].endpoint[ep].desc;
  3810	
  3811		if (!usb_endpoint_dir_in(e))
  3812			return;
  3813	
  3814		sizedescr = le16_to_cpu(e->wMaxPacketSize);
  3815		size = sizedescr & 0x7ff;
  3816	
  3817		if (udev->speed == USB_SPEED_HIGH)
  3818			size = size * hb_mult(sizedescr);
  3819	
  3820		/* Only inspect input endpoints */
  3821	
  3822		switch (e->bEndpointAddress) {
  3823		case 0x81:	/* unknown function */
  3824			return;
  3825		case 0x82:
  3826			*has_video = true;
  3827			if (usb_endpoint_xfer_isoc(e)) {
  3828				dev->analog_ep_isoc = e->bEndpointAddress;
  3829				dev->alt_max_pkt_size_isoc[alt] = size;
  3830			} else if (usb_endpoint_xfer_bulk(e)) {
  3831				dev->analog_ep_bulk = e->bEndpointAddress;
  3832			}
  3833			return;
  3834		case 0x83:
  3835			if (usb_endpoint_xfer_isoc(e))
  3836				*has_vendor_audio = true;
  3837			else
  3838				dev_err(&intf->dev,
  3839					"error: skipping audio endpoint 0x83, because it uses bulk transfers !\n");
  3840			return;
  3841		case 0x84:
  3842			if (*has_dvb && (usb_endpoint_xfer_bulk(e))) {
  3843				*has_dvb = true;
  3844				dev->dvb_ep_bulk = e->bEndpointAddress;
  3845			} else if (*has_video && (usb_endpoint_xfer_bulk(e))) {
  3846				dev->analog_ep_bulk = e->bEndpointAddress;
  3847			} else {
  3848				if (usb_endpoint_xfer_isoc(e)) {
  3849					if (size > dev->dvb_max_pkt_size_isoc) {
  3850						/*
  3851						 * 2) some manufacturers (e.g. Terratec)
  3852						 * disable endpoints by setting
  3853						 * wMaxPacketSize to 0 bytes for all
  3854						 * alt settings. So far, we've seen
  3855						 * this for DVB isoc endpoints only.
  3856						 */
  3857						*has_dvb = true;
  3858						dev->dvb_ep_isoc = e->bEndpointAddress;
  3859						dev->dvb_max_pkt_size_isoc = size;
  3860						dev->dvb_alt_isoc = alt;
  3861					}
  3862				} else {
  3863					*has_dvb = true;
  3864					dev->dvb_ep_bulk = e->bEndpointAddress;
  3865				}
  3866			}
  3867			return;
  3868		case 0x85:
  3869			if (usb_endpoint_xfer_isoc(e)) {
  3870				if (size > dev->dvb_max_pkt_size_isoc_ts2) {
  3871					dev->dvb_ep_isoc_ts2 = e->bEndpointAddress;
  3872					dev->dvb_max_pkt_size_isoc_ts2 = size;
  3873					dev->dvb_alt_isoc = alt;
  3874				}
  3875			} else {
  3876				dev->dvb_ep_bulk_ts2 = e->bEndpointAddress;
  3877			}
  3878			return;
  3879		case 0x8a:
  3880			*has_video = true;
  3881			*has_dvb = true;
  3882			if (usb_endpoint_xfer_isoc(e)) {
  3883				dev->analog_ep_isoc = e->bEndpointAddress;
  3884				dev->alt_max_pkt_size_isoc[alt] = size;
  3885			} else if (usb_endpoint_xfer_bulk(e)) {
  3886				dev->analog_ep_bulk = e->bEndpointAddress;
  3887			}
  3888			return;
> 3889		};
  3890	}
  3891	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-03-26 18:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 18:50 [linuxtv-media-pending:next 144/157] drivers/media/usb/em28xx/em28xx-cards.c:3889:2-3: Unneeded semicolon kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.