On Wed Aug 5 15:34:07 2026 +0600, イムティヤズ 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: イムティヤズ <[email protected]>
> Assisted-by: LLM
> Reviewed-by: Ricardo Ribalda <[email protected]>
> Link: 
> https://patch.msgid.link/[email protected]
> Reviewed-by: Hans de Goede <[email protected]>
> Signed-off-by: Hans de Goede <[email protected]>
> Signed-off-by: Laurent Pinchart <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 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;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to