From: Sergey Shtylyov <s.shtylyov@auroraos.dev>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Hans de Goede <hansg@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
<linux-media@vger.kernel.org>
Cc: Sergey Shtylyov <s.shtylyov@auroraos.dev>
Subject: [PATCH] media: uvcvideo: drop useless assignment in uvc_parse_format()
Date: Thu, 20 Aug 2026 23:11:25 +0300 [thread overview]
Message-ID: <20260820201128.35669-1-s.shtylyov@auroraos.dev> (raw)
Close to the end of uvc_parse_format(), the parameter buflen is decremented
(again) but that statement seems pointless as buflen isn't used afterwards.
Drop the useless assignment (gcc doesn't generate any code for it anyways).
Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
Signed-off-by: Sergey Shtylyov <s.shtylyov@auroraos.dev>
---
drivers/media/usb/uvc/uvc_driver.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index e289cc71ba98..0e78e8bcd320 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -520,7 +520,6 @@ static int uvc_parse_format(struct uvc_device *dev,
format->xfer_func = uvc_xfer_func(buffer[4]);
format->ycbcr_enc = uvc_ycbcr_enc(buffer[5]);
- buflen -= buffer[0];
buffer += buffer[0];
} else {
format->colorspace = V4L2_COLORSPACE_SRGB;
--
2.55.0
next reply other threads:[~2026-08-20 20:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 20:11 Sergey Shtylyov [this message]
2026-08-20 20:15 ` [PATCH] media: uvcvideo: drop useless assignment in uvc_parse_format() Sergey Shtylyov
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=20260820201128.35669-1-s.shtylyov@auroraos.dev \
--to=s.shtylyov@auroraos.dev \
--cc=hansg@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/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