lkml.org 
[lkml]   [2022]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [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

    \
     
     \ /
      Last update: 2022-02-24 18:57    [W:3.839 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site