Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3491537pxb; Mon, 4 Apr 2022 18:41:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTUVM9k0hKiQ4mNnblxJ5J+nVg4k/lcP7u7FXiJsSldBdaMEOQ8KPHzuN4fmKp5uRnxUxb X-Received: by 2002:a17:902:8a94:b0:156:1b99:f9d6 with SMTP id p20-20020a1709028a9400b001561b99f9d6mr938561plo.49.1649122901486; Mon, 04 Apr 2022 18:41:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649122901; cv=none; d=google.com; s=arc-20160816; b=Xb7VjQ4QtJN8uGxACPQDjbMlOi1n5/dV41FB8471FBjqwL46/W3hb9PAXuGGtth70y Nfnol9Z0AceNCONSI3XdngHYXYlzZuAPa53Fr3yOZZjfM1bZ3hzzFk5XoMMK+QiTcw7d QpL52fOmU/0Fv62DA9BAPB0xuSASNOT3fUEAyK9ecfk5TT4SxHq3svbyKckYOeKsXGJv 0p9aZoyen8pCn2iyZT6uwBY1UGdwYJsSS9o5M4oDBiNiKFMhOa7AFpd/D8xTfKjpiBSF SEa3aXdYfAtDoE+XWvfVi74z0+tMzbFdA5+TASav6T7m2TCeu503kXWmoo5sF6+67J59 7llg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=vxio1nXIi0toCjNvCN0k5c32WbYvfg3EjWeXF/XpezE=; b=yMe/LgnPouu4Fn0rdNqd/IFwFEaBCJxbxgpKeKWCBuuigVv1WhREcxHLkVxbsvftAa lzNQgk3q2gv69po4f+oDOSNEWdIs20KG+8s7rVc6RQuWAniUp1k1ISBub8gx5fA8xRFh tld2NtwLwRC+evV4R9TEsqTfU4j0Li5PYLubHGbRoZ3CoyRH8VlanmRgtdTRcpr/1vT1 vh3Sf3SlvuFGa3XX1fzBESmqD6hpC+tJ8F+Jq4B9oL7Jf0Sc6wxXpPLLBWeO5/jsuTN7 ltSgYf9V72MNv1gKq+pOBmwvwj3RP6C4xnFyUw7C45c12e4K8LJGWh7jyT7+tDxOh5Y5 1Zxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="eT2H/knZ"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g4-20020a655804000000b0039919e929e5si5399140pgr.813.2022.04.04.18.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 18:41:41 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="eT2H/knZ"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 93D89286F5B; Mon, 4 Apr 2022 17:38:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352667AbiDDJiW (ORCPT + 99 others); Mon, 4 Apr 2022 05:38:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355515AbiDDJiO (ORCPT ); Mon, 4 Apr 2022 05:38:14 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24D6730542; Mon, 4 Apr 2022 02:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649064979; x=1680600979; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=z66BBs6gd1wX1NuShMNR221afgtnYZTW8DgJ5qOqV3Y=; b=eT2H/knZ5YlHmkJk+RzuJgnTRWX2TyaouWHm49QnsSONrCnPSHL+XXAn 6+8oaezJ81FhVrvhuKGn3Mo3ldy5QZKtL0aEa2mHAueoWyByqjYjoaEGg lVR6TR9LEqTQpCYe/rDYKssj0yYTjW0lfWIvdaRzwtGeqpmb5fcAR8OHA LZZ08SO400FjgOULaH+uc90nnU9vl2+Ad9h9kSsn/7ripy2FGAlP2d+IN c0A/KCuQwTeLjtUODdwJpPKIui0nMiVXXPSpI8aQnX7mn1rLPQ03PHL7/ T2f/SmCv8k9anbYwcJ1v41vJ0eST1/GFjO6TY0FE/PSNbReSXpaio4ptY g==; X-IronPort-AV: E=McAfee;i="6200,9189,10306"; a="247988806" X-IronPort-AV: E=Sophos;i="5.90,234,1643702400"; d="scan'208";a="247988806" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2022 02:36:18 -0700 X-IronPort-AV: E=Sophos;i="5.90,234,1643702400"; d="scan'208";a="504845794" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.162]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2022 02:36:15 -0700 Received: by lahna (sSMTP sendmail emulation); Mon, 04 Apr 2022 12:36:12 +0300 Date: Mon, 4 Apr 2022 12:36:12 +0300 From: Mika Westerberg To: Jakob Koschel Cc: Andreas Noever , Michael Jamet , Yehezkel Bernat , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." Subject: Re: [PATCH] thunderbolt: replace usage of found with dedicated list iterator variable Message-ID: References: <20220324072700.63787-1-jakobkoschel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220324072700.63787-1-jakobkoschel@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 24, 2022 at 08:27:00AM +0100, Jakob Koschel wrote: > To move the list iterator variable into the list_for_each_entry_*() > macro in the future it should be avoided to use the list iterator > variable after the loop body. > > To *never* use the list iterator variable after the loop it was > concluded to use a separate iterator variable instead of a > found boolean [1]. > > This removes the need to use a found variable and simply checking if > the variable was set, can determine if the break/goto was hit. > > Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ > Signed-off-by: Jakob Koschel Applied to thunderbolt.git/next, thanks!