Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp564056pxr; Mon, 11 Apr 2022 01:00:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYnX956mdBOz63KM353VYOkWZMNwEhVUiDjjjBmlritJRoxL1WFnh/EPdRMlhQeVthoHPf X-Received: by 2002:a05:6a00:884:b0:4fe:134d:81cc with SMTP id q4-20020a056a00088400b004fe134d81ccmr31631294pfj.57.1649664000755; Mon, 11 Apr 2022 01:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649664000; cv=none; d=google.com; s=arc-20160816; b=R9XrtmisOY4bnvTpXn7cPXOBjOFq9vbMQO1UeM9b7v/GOh5mT3SUps+xRAAM6ArLsm rM/5Rpz2jR1Rwsf/2pDmqbh5t7rja7DkidETpI3nAwQaEZY9qmtqqJiFGCT2HLRA91/a ijr6Qb5xOGyX5eOr/sICu9lPFae579XaI/1scRIlX1KvYkjvlXRgCdiXpJYvrLzC4pXE 7McWaRCkTVEp+UyFUMMUtLf6T4PfAHrntj3w2rzC84VnNgmL2gYlrPtYnvbaQ7vJ5QUx tZY8QcC8bzmTZ0guUo5BdNB7XqhjWVnbbZsGu4IA4E2kMGJ1ijoMhLaffEk8S9+qfyhA yS/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=bh1s9uxexwTw1ELDK3yJyYhpuulAoc9fKiuOEPmNgmk=; b=qgjdNRvJk2aYF9TmA4wJnNqVDarZ7dzLQ9+GXtXASyzis5V8Y6GUQpU+3YdICeoQtn yNXG3+d17glM3GiiEgxdgGi834KpzhyyBwUiu+zC+z+M7AhlVbC7f0ywq6zgrx3y3Ipq jKBPIBqIRd2YBSM2BYkeOS1MYFwKNyxNR6IR2Tfvm1azDuxR0f/IZdPuxm6GrVXVh/bW xk2XcAB0NiCN+3rxnh3pK/CPxZ9ZIhDgyuuVzsEbF9JJrbZMRDR9tNga8RBjeJ0hnhCm KbzLkBWTxFuTN1Sxj2m9EaHEXKsTL1Sg6nmYFWMrdCuxeeDydu9xjvQGEQg8J5s1TRbJ oEJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qp89A0lA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u62-20020a638541000000b0039d1c1fdd0esi6404660pgd.10.2022.04.11.00.59.47; Mon, 11 Apr 2022 01:00:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qp89A0lA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244462AbiDKDDq (ORCPT + 99 others); Sun, 10 Apr 2022 23:03:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234168AbiDKDDp (ORCPT ); Sun, 10 Apr 2022 23:03:45 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB14A615B for ; Sun, 10 Apr 2022 20:01:33 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id be5so6734437plb.13 for ; Sun, 10 Apr 2022 20:01:33 -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:user-agent; bh=bh1s9uxexwTw1ELDK3yJyYhpuulAoc9fKiuOEPmNgmk=; b=Qp89A0lArNGWfGInm/+ZtR5F/BeXJGZYtTEShodbwkPxzFGm+OxKgjW0mRLNzh0QAS A6mJ20EnwS/OB8/ONbs02zT9QjnGhHDFq/9hC2nt3DC5fDlGcyst7kZLw++u7SqxQD+Z ZI1OnsI9qds3pWd11R3Q3uyHkuopQ70uNk/jMwSDrGQxlJy+pfFyj/VJ6FobEs95REsA M6wtASkwj8gtSm5XbRKDhUlry/uc/j/802nE95AmDYjQvSCIet2FESG0P7ARjy9MTifE tQYu9CrZA0yf5pWxeWwgfu+WLSwKt6nDyjVM8cplHasYZBHcCasHewRTRVIkPBdtyTFx FOGg== 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:user-agent; bh=bh1s9uxexwTw1ELDK3yJyYhpuulAoc9fKiuOEPmNgmk=; b=HGhumUY+q28rCCGEJZUzs+RhPeL84QxwmUc2S8jB0idbsRgPOPX2AZbHvCPeM2SR7c oRsataGU2bu/h+ho0x+dIwO7l8DUzOjBfnqBfYi49ALrIb3PhGfUfNu0vpmkfNNSplpr H922x3MCYFf5xf5oVh7wB0R/SaxWyqZFKIGb3NjvZ9NJFJeQFw2kNNBP8uY+dWwl2MTL XNkjcjyfBl/CRQFg1JoYYii1tcqqqVQsss2i5D8D6eBZB/NcT7J2YsDnltlPGSof3bax R89cwdC0fCU8UiUy7UFHRt6w1h2Lng91fDlkotsC+cqEIy/EvUf4emRTLDt0PqrfshMC pwxw== X-Gm-Message-State: AOAM531TEgk3ecye9sjU9ol8iEilnalr9h4qo27J/03S/PkOnjxfnA+j mRXyjxsOwqTZJO38xj6ckKWjvQSS7tIOqQ== X-Received: by 2002:a17:90b:38d1:b0:1c9:ba10:353b with SMTP id nn17-20020a17090b38d100b001c9ba10353bmr34159522pjb.9.1649646090350; Sun, 10 Apr 2022 20:01:30 -0700 (PDT) Received: from localhost ([223.184.83.228]) by smtp.gmail.com with ESMTPSA id d16-20020a17090ad99000b001bcbc4247a0sm18265124pjv.57.2022.04.10.20.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Apr 2022 20:01:29 -0700 (PDT) Date: Mon, 11 Apr 2022 08:31:28 +0530 From: Viresh Kumar To: Jakob Koschel Cc: Viresh Kumar , Nishanth Menon , Stephen Boyd , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." Subject: Re: [PATCH] opp: replace usage of found with dedicated list iterator variable Message-ID: <20220411030128.4n4bsxhdzxdasmn6@vireshk-i7> References: <20220324071815.61405-1-jakobkoschel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220324071815.61405-1-jakobkoschel@gmail.com> User-Agent: NeoMutt/20180716-391-311a52 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 24-03-22, 08:18, 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 > --- > drivers/opp/core.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) Applied. Thanks. -- viresh