From: Markus Elfring <Markus.Elfring@web.de>
To: Chen Changcheng <chenchangcheng@kylinos.cn>,
linux-media@vger.kernel.org, Hans de Goede <hansg@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>
Subject: Re: [PATCH v2] media: uvcvideo: Use scope-based cleanup helper
Date: Mon, 5 Jan 2026 10:42:20 +0100 [thread overview]
Message-ID: <2738ac2f-a8b4-4d39-8bda-dab9927828c4@web.de> (raw)
In-Reply-To: <20260105005617.37511-1-chenchangcheng@kylinos.cn>
…
> Replace the manual kfree() with __free(kfree) annotation for data
> references. This aligns the code with the latest kernel style.
Align?
…
> ---
> drivers/media/usb/uvc/uvc_video.c | 23 ++++++++---------------
…
Some contributors would appreciate patch version descriptions.
https://lore.kernel.org/all/?q=%22This+looks+like+a+new+version+of+a+previously+submitted+patch%22
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc4#n310
…
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -291,7 +291,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
> struct uvc_streaming_control *ctrl, int probe, u8 query)
> {
> u16 size = uvc_video_ctrl_size(stream);
> - u8 *data;
> + u8 *data __free(kfree) = NULL;
> int ret;
…
How do you think about to reduce the scopes also for these local variables?
Regards,
Markus
prev parent reply other threads:[~2026-01-05 9:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 0:56 Chen Changcheng
2026-01-05 7:07 ` Krzysztof Kozlowski
2026-01-05 9:35 ` [PATCH v2] uvcvideo: simplify spin_lock using guards Chen Changcheng
2026-01-06 3:51 ` Laurent Pinchart
2026-01-06 8:11 ` [PATCH v2] media: uvcvideo: Use scope-based cleanup helper Chen Changcheng
2026-01-05 9:42 ` Markus Elfring [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=2738ac2f-a8b4-4d39-8bda-dab9927828c4@web.de \
--to=markus.elfring@web.de \
--cc=chenchangcheng@kylinos.cn \
--cc=hansg@kernel.org \
--cc=krzk@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®