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]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux