Re: [PATCH] media: uvcvideo: Skip frame descriptors with a zero computed size
Ricardo Ribalda <[email protected]>
| Newsgroups | org.kernel.vger.linux-media,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CANiDSCuk3PQwJAGAGiF_n8=Eshy-xxew=sWfvD1xm4uK+ZjurA@mail.gmail.com> |
Hi Natasha On Tue, 18 Aug 2026 at 12:32, Natasha Klaus <[email protected]> wrote: > > Understood on the placement, thanks. > > One finding while building your refactor: it does not compile as written. > Dropping the uvc_dbg() removes the last use of alts in uvc_parse_frame(), and > the kernel treats that as an error: > > drivers/media/usb/uvc/uvc_driver.c:233:36: error: unused variable 'alts' > [-Werror=unused-variable] > > I removed the now-dead declaration, which adds a hunk you did not specify. Say > if you would rather keep alts and identify the device explicitly in the > dev_warn() instead. > > I also wrote the dev_warn() text, since you specified the level but not the > wording: > > dev_warn(&streaming->intf->dev, > "UVC non compliance: FRAME descriptor is %d bytes, expected at least %u.\n", > buflen, 26 + 4 * n); I believe that I wrote :) : + dev_warn(&streaming->intf->dev, + "UVC non compliance: device %d videostreaming interface %d FRAME error\n", + dev->udev->devnum, alts->desc.bInterfaceNumber); But anyway... I think dev_warn with intf->dev is more than enough. I prefer your message. Thanks for that > > Happy to change it. > > To carry your refactor as 1/3 with you as author I need your Signed-off-by. > Could you send it, or tell me if you would rather I take authorship with a > Suggested-by: line pointing at your message. Suggested-by is more than enough. Thanks! > > Natasha -- Ricardo Ribalda