Re: [PATCH 03/35] media: uvcvideo: Refactor iterators

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would find a hint for a variable change more appropriate in the patch subject
instead of the word “iterators”.


…
> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
…
> @@ -2175,16 +2177,16 @@ int uvc_xu_ctrl_query(struct uvc_video_chain *chain,
>  	int ret;
>
>  	/* Find the extension unit. */
…
> +	entity = NULL;
> +	list_for_each_entry(iter, &chain->entities, chain) {
…

I suggest to move this assignment into the definition for the affected local variable.


By the way:
I see another source code adjustment opportunity in this function implementation.
https://elixir.bootlin.com/linux/v6.9-rc4/source/drivers/media/usb/uvc/uvc_ctrl.c#L2165

Can it be nicer to use labels “free_data” and “unlock” (instead of “done”)?
How do you think about to increase the application of scope-based resource management here?

Regards,
Markus





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux