Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2115061pxb; Fri, 25 Mar 2022 11:20:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgLFMFsCtspCdrcjQco8hDKSySKKy5jFN8Jqf7O6wSNPZn15ih9Y2Qo7aTnYuVZVEzYaDe X-Received: by 2002:a17:903:244d:b0:154:3772:6b32 with SMTP id l13-20020a170903244d00b0015437726b32mr12877492pls.70.1648232453245; Fri, 25 Mar 2022 11:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648232453; cv=none; d=google.com; s=arc-20160816; b=V66dySORSx8poqFcSOsw1VOvL742tpCqHGv9csfMT+IkHmcM2dqlp2rXX1y6cEQLs6 oBk11mMv2i7b8kA/8uPc1pMy8XyRkwgNAjH2wmR+/x2j3Nmsw2PIOBQVQZ15nnaP1ZGC rM4Bfb54goCjBHbkCB5Z/9/Fc6e8Bzg4hmJR6zUJQS2YMlMwC7Ml1EVlj6ed3gnnoaZf vBGeocnKlmVqaBlpf/W/AnhVafzaovw7ZtZTq5uA2MSWNedPPoEMGQBj+dnrpj97hkuU iBmEJhKYyHQIn5TG7nvneSog5u7uiBAeqMyf7Kpu+pEqkiLnNRvqgjy0xM4phCN1jSd/ nTrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ugHrK80HET8DZ+f74WXVZ6NolmaYIO5eOQX+LhNJahg=; b=cx3qf/xOIz5NcjKdlCxHyU936hp9qKSuBBykuwK244CO0SMnXSVj20DxuiOl1vdlWE 9mv9ay+ovh5JQaSS3j/xP/UOP0oNIkTFk/NwWEa01O+CRPCSiTfSMJbQ78Sj7vUoo5Fx dE4xeERx+xrG2nPN/Hbcs1oc6TA6OUlf5kYXdEu9Uef4Q1kDwQAeN/oVnSmKvcCr8h5F 5J7zZLVvi5J6YhNCeZg0mrnFrfRRYNrz7wcLb67utlqwQZaJL1fc60ehl6h3Fyjo2tT+ GlTrNNLgnJ4UIGRJjQWQ460vJLek8LK91VqmZ3XedMpXOjMCf41FYpTg/rspWgTxNQeG CMow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AJCj/zXj"; 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=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f15-20020a056a00238f00b004fa3a8dffa1si3912353pfc.88.2022.03.25.11.20.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:20:53 -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=@linaro.org header.s=google header.b="AJCj/zXj"; 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=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4331B16BFA8; Fri, 25 Mar 2022 10:48:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351129AbiCXO45 (ORCPT + 99 others); Thu, 24 Mar 2022 10:56:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347268AbiCXO44 (ORCPT ); Thu, 24 Mar 2022 10:56:56 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9CA77EA1C for ; Thu, 24 Mar 2022 07:55:23 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id r7-20020a1c4407000000b0038ccb70e239so39471wma.3 for ; Thu, 24 Mar 2022 07:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ugHrK80HET8DZ+f74WXVZ6NolmaYIO5eOQX+LhNJahg=; b=AJCj/zXjgICiAM6Sf8VVdd5x8Xm4KQgPnUhD7Eq/Kg/cYJh9gjSoxdFjIVApiwnMSn XyYmCURT4GW6P6ew6BgF2ylK/+uhwjIlgN6aaZ7Pzdp0bt2lPvKzFb+rX47jhI0XTlwB W3SaOfQHkaOHHCIpsqQqG57jkWC1Dl52pB5PGpcR0Sau6xYefwskTmXNuH8CXCX9MK+A 41nITgNnzJ0xoAkWgatllGKlTgUZI9H6nd5dI5jxvSQfj56scXisDkBUeiwuxHXvhwrW MaNE0KrJEMS2P/09t2E/ng0jgLuV/TraAlOF2HIu96aGvw228Aylx+sMHjnXJ/lfOYHK mLsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ugHrK80HET8DZ+f74WXVZ6NolmaYIO5eOQX+LhNJahg=; b=53iSi8xZkf+34AWwr1eAeqVVWYW5h5/mLUcntp6kwpfdLeeMYOsr1JVFdLm7pBy31e wFmu4HRWgjRW+hwHprQ5YM8U/kBjwnB6LiIVUAYgFGEnNUZuLOZQDi4b4saUzSiW2suX gIvVf3B2r8mJ6amezyejJyU3iysmrav3EhJ8NGVbQuaGjI6l/Ma5oH/FGBVc3hwauy0/ /VA4ObvCD2rNzycLBcHh3TVyhRAdRaWmX7FTACzvVFXZuNqj1Q0M6BjYyYYfE7BBoKc1 qtllY69pXp2M/wCfCsjz3lLjpHC7MmB49dojVFad/Ho4huKIV7D0oWMIq8CWJsdghRWe EF7A== X-Gm-Message-State: AOAM5334v9aUpblBCz6d+mtga89LkDLaoEH3K0OUz6g4YqqsKfzwiZjA 9bCceWxk0DI91+cBFF4mjPV7aQ== X-Received: by 2002:a7b:c381:0:b0:37b:e01f:c1c0 with SMTP id s1-20020a7bc381000000b0037be01fc1c0mr15024216wmj.98.1648133722411; Thu, 24 Mar 2022 07:55:22 -0700 (PDT) Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id f7-20020a1cc907000000b0038c756fe683sm6202357wmb.43.2022.03.24.07.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 07:55:21 -0700 (PDT) Date: Thu, 24 Mar 2022 14:55:19 +0000 From: Daniel Thompson To: Jakob Koschel Cc: Lee Jones , Jingoo Han , Helge Deller , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." Subject: Re: [PATCH] backlight: replace usage of found with dedicated list iterator variable Message-ID: <20220324145519.lcalgtmw3ih4y4li@maple.lan> References: <20220324070608.57057-1-jakobkoschel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220324070608.57057-1-jakobkoschel@gmail.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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:06:08AM +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 Reviewed-by: Daniel Thompson Daniel.