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

From: Greg Kroah-Hartman
Date: Tue Apr 16 2024 - 03:18:56 EST


On Tue, Apr 16, 2024 at 09:03:36AM +0200, Markus Elfring wrote:
> 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?

Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list. I strongly suggest that you not do this anymore. Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all. The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback. Please feel free to also ignore emails
from them.

thanks,

greg k-h's patch email bot