Messages in this thread | | | From | Linus Torvalds <> | Date | Thu, 24 Feb 2022 09:56:26 -0800 | Subject | Re: [RFC PATCH 03/13] usb: remove the usage of the list iterator after the loop |
| |
On Thu, Feb 24, 2022 at 2:33 AM Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > > So, to follow the proposed solution in this thread, the following change > is the "correct" one to make, right?
That would indeed be my preference.
If we ever are able to change
list_for_each_entry(tmp, &ep->queue, queue)...
to simply declare 'tmp' as the right type itself, then the e need to do
struct gr_request *tmp;
outside the loop goes away, and this kind of "set a variable that is declared in the outside context" becomes the only way to do things.
Linus
| |