Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1957323rwr; Sat, 6 May 2023 02:02:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6DpkDhJsONP17heEbj0CA2H7VjNQyWN8eWoMZf3Ba1LJBw5RO+cciSyDzawP7X8OFg5aZJ X-Received: by 2002:a17:902:f391:b0:1a1:dd2a:fe6c with SMTP id f17-20020a170902f39100b001a1dd2afe6cmr3581269ple.53.1683363779180; Sat, 06 May 2023 02:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683363779; cv=none; d=google.com; s=arc-20160816; b=j+1wzGycf9wI+Fg7Ld128JnDI97U/QFJCoMMqBzbaJrj+E4eFp7gkLTcTo0ZIxXVux dCDiOKRLJKn6F9Noen8TCShAdLM9u9d4wNyWgY/oMdjZOP05JWYocA7uauHy9MHwoPgT 1PfxYknMa/z7xCPM/REFESYd9V9q1DxMBYE7tY3jpL2cEFvWzBMvE2KUjNgUor8rauCp yFtP/dtdLRk9nLRK7UHeO8vdhMp6ase5qs8kmWV6IjnJOmiXOMXFip+EEG1A+/xCHzCt mMWDJr73WQlDvQ8YyZIqiKejhYwsMuEEYRC1LM998jp5TXd7Vds5S9OgWj541jE1PHKl XqXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=TCkMoIH8sA2TjhBEN8SLNQJjJahZIEahDj81J3N40WY=; b=0fVuaLKTEUpxI38HzpKPAcA6hUYXPTPYQMCU27tqpp7nxwW8ALZVEcJiQ4+NK2OUlH XskFJaf0C4kUvZj2O+ae4oWhhS5hTLGf0fYvTUnjI753+7iHhL168j+HQnd9rskAZzzP 2MkNQyfCXZDwNaSWmYFAjX9/4E1ZFDpYGzFLCjxW2o4HcYHUAX/qVDZCaVf7BAF55T94 xT0AlCW5U8/i6XQ84BmlUMQQogeJTN98Wd8xW8LfHTunbCl8PbJ2fQFU/eAEmd+MDxXt GcOTtdoR3aETpTTaI6ykJbA1kZTeKbfLgjyuvQlTcBit62Xte6UppWNKyM4fmU63Jwr5 zWVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DnG+TnlS; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o13-20020a170902d4cd00b001a6fce122basi3819886plg.322.2023.05.06.02.02.46; Sat, 06 May 2023 02:02:59 -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=@kernel.org header.s=k20201202 header.b=DnG+TnlS; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231143AbjEFIjf (ORCPT + 99 others); Sat, 6 May 2023 04:39:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjEFIjd (ORCPT ); Sat, 6 May 2023 04:39:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84B9210B for ; Sat, 6 May 2023 01:39:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1307361961 for ; Sat, 6 May 2023 08:39:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB60AC433EF; Sat, 6 May 2023 08:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683362371; bh=E1OI6VFi/ffnOvki9cGJPS5IS5qEue6LkIXtPgppa5E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=DnG+TnlSAjYKWUdoYcNGlP73sW/zpXQvIuUuRF9g6vnCP5JMSL5suSjmAjFKS4NKR 6kEjEGVE1pJbQkqGtmYsZn+XVh9PJExWkH0DBZac91X7Y9rH9ZtABqMKSLviFcpJDQ mvxy7jPIVArBTvZXsrhkAdBCuOd2NceQN/b4oRvd+aUlRhWB+HFtoXOBwyHthr6yHe rnv9oC8F4DxCuCCDb1qeL54rV5Vlav9Mp/SxBBISTTZMMyVS1WE2Loa6hn2LnhyXHY y/PwN2X/BrrpJjttPr2DL/ekfIjp7F0HGRRNDv4lfR0B6JEnIds1uDJzh04wTL9uSY 4HiQPxJsI30PA== Message-ID: Date: Sat, 6 May 2023 10:39:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH] w1: replace usage of found with dedicated list iterator variable Content-Language: en-US To: Jakob Koschel , Evgeniy Polyakov Cc: linux-kernel@vger.kernel.org, Mike Rapoport , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." References: <20220324073227.66486-1-jakobkoschel@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <20220324073227.66486-1-jakobkoschel@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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/2022 08:32, 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/w1/w1.c | 32 +++++++++++++++----------------- > 1 file changed, 15 insertions(+), 17 deletions(-) Hi, I am going through old w1 patches and wanted to apply this, but it pops a checkpatch warning about indentation. Can you fix the warning and send a new version? Best regards, Krzysztof