Re: [PATCH] media: uvcvideo: Skip frame descriptors with a zero computed size

Natasha Klaus <[email protected]>
Newsgroups org.kernel.vger.linux-media,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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);

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.

Natasha
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.