From: Hans de Goede <hansg@kernel.org>
To: イムティヤズ <reza1234khan1234@gmail.com>, laurent.pinchart@ideasonboard.com
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] media: uvcvideo: Make uvc_event_control attribute name array const
Date: Tue, 29 Sep 2026 16:30:36 +0200 [thread overview]
Message-ID: <34d766fa-b573-4e33-9ded-fac8996be093@kernel.org> (raw)
In-Reply-To: <20260805093407.110571-1-reza1234khan1234@gmail.com>
Hi,
On 5-Aug-26 11:34, イムティヤズ wrote:
> The attrs array in uvc_event_control() is only ever read, never
> modified. Declare it as static const char *const so the pointer array
> itself is also immutable.
>
> Signed-off-by: イムティヤズ <reza1234khan1234@gmail.com>
> Assisted-by: opencode:auto/best-free
Thank you for your patch.
I have merged this into:
https://gitlab.freedesktop.org/linux-media/users/uvc/-/commits/for-next/
Regards,
Hans
> ---
> drivers/media/usb/uvc/uvc_status.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_status.c b/drivers/media/usb/uvc/uvc_status.c
> index b632cf5e3fe9..97c939206302 100644
> --- a/drivers/media/usb/uvc/uvc_status.c
> +++ b/drivers/media/usb/uvc/uvc_status.c
> @@ -165,7 +165,7 @@ static struct uvc_control *uvc_event_find_ctrl(struct uvc_device *dev,
> static bool uvc_event_control(struct urb *urb,
> const struct uvc_status *status, int len)
> {
> - static const char *attrs[] = { "value", "info", "failure", "min", "max" };
> + static const char *const attrs[] = { "value", "info", "failure", "min", "max" };
> struct uvc_device *dev = urb->context;
> struct uvc_video_chain *chain;
> struct uvc_control *ctrl;
prev parent reply other threads:[~2026-09-29 14:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 9:34 [PATCH] media: uvcvideo: Make uvc_event_control attribute name array const イムティヤズ
2026-08-06 9:06 ` Ricardo Ribalda
2026-08-06 9:45 ` イムティヤズ
[not found] ` <CANQ=N_CC=Wzzq5XG+a+7K5KDOOHo6Z=xBXWyK8AxYmKOVOY7uw@mail.gmail.com>
2026-08-10 8:27 ` Ricardo Ribalda
2026-09-29 14:30 ` Hans de Goede [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=34d766fa-b573-4e33-9ded-fac8996be093@kernel.org \
--to=hansg@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=reza1234khan1234@gmail.com \
/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