From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4C51C77B7F for ; Sat, 6 May 2023 08:39:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231351AbjEFIjf (ORCPT ); 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 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