Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] media: uvcvideo: Make uvc_event_control attribute name array const
@ 2026-08-05  9:34 イムティヤズ
  2026-08-06  9:06 ` Ricardo Ribalda
  2026-09-29 14:30 ` Hans de Goede
  0 siblings, 2 replies; 5+ messages in thread
From: イムティヤズ @ 2026-08-05  9:34 UTC (permalink / raw)
  To: laurent.pinchart, hansg
  Cc: linux-media, イムティヤズ

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
---
 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;
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-29 14:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox