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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 29352C433EF for ; Sat, 16 Apr 2022 19:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LSVRPXV+euuKGsJxz/RkXNIbZ1mJDWrm3Xj8MFqbq8U=; b=VKYxqIy4yy24jW NHiGT5bvnpNQMVoMK6bdgrG16IegxZGYz5c273H7PUc+MwzQxHzX+z6t8+cra9MdLWyipRy4Wji5t Cgz2xxrYjkqmBdBQD0zticlhJwp55HUjkwsmbP+gqd8YWaUYhSmHlEtU+cCAvxaLxLxB3UOQVN3eG FLW01EO2YTIWk0FUZYvMlhKlDxFqJqo/hdPLaThKJGcw9gWwH9Nv7EHn8kZlnrOwi7Lh2pydoxBYI KrflQYMs/wg4NqgxedlDZF7+DDG8s8gdz1Ghyvk8hNu+Jjg+VeMaE/PPYtS7+9yWhH1gPFHfLsc9b FMfKauyp6jS3jP4qFkwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfoF3-00DQmG-Tw; Sat, 16 Apr 2022 19:37:58 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfoEz-00DQlH-3e for linux-arm-kernel@lists.infradead.org; Sat, 16 Apr 2022 19:37:54 +0000 Received: by mail-pl1-x62e.google.com with SMTP id p10so9534129plf.9 for ; Sat, 16 Apr 2022 12:37:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=bBrIvj2RbZjYdFWgGo9Q0KH8nivE4RSBLo6+AjhmX8c=; b=lEOMeVgS1UMAn/xAIx5tnzWJc4+4PBnVnbIGYnQgj/K7x1Xjyp0bC5S4rQX/eJ5XJ+ Uvn4OHwJ93BV1qqJQ8Lz8Dh5SMvYbToBLlkhbRBgK8+8NJHX95bahxE8bIyrfhPfTOmB zyHMM6yt3Pc4IVFjxuzz0Zus9NOynBqBsxuzSkzBUVJ8d2KcICxb5bsLxJfdh9ArULCH DBWP0uXEP/didfNU/U9Mf6Cl0qPKeQnU6ukgCF3Xqk388QOUUIf8BLF1eyJLxPeXVZDA 4n4v4zJ7TEb5faKVZN/sBliY0tZGS+DMd9VhpsfLOYIHRRZbOy2e1qKh5A00PUzLphHZ kKkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=bBrIvj2RbZjYdFWgGo9Q0KH8nivE4RSBLo6+AjhmX8c=; b=lSs63phZ8ZfGzVB/z01eGk4rNfT8vh0xV0p3Ah0N9nih2PJCbSE9ORygZac7zyAck1 WJO4jBm1i+FIZJZpokDv6ApdjFkGqyX80GrStkjU+791BB4LdUY1JzgVhyx1w6Oms9dM /DqJeYexvEL0I4B3LNOXoIQocJ7HC5L1X39zmtpFeFg+OpekdaoHBH+iFvkMXble1oQE b+PoOS7yGdf5d5qBuxzPDWSRKNvdcL1fx2RSvjEc1l7q4LiUT22Jye7zH4FNqLTnxYiP wKT1G7airlHI+Dn07l6jK+YlpzLDIrT9TPuytwW3mR2ORY6QQEAffU+yLkmTxtmwxvbQ G0SQ== X-Gm-Message-State: AOAM532u6x1eX34kUh1bHaEq0V+J4to0dbhWKzqWo7YLn21yK45CbS90 JIqA4i7w+bSmMTkj60PS7fE= X-Google-Smtp-Source: ABdhPJytoSNnjDeE+7hBXKTSMpgdN3zwp9Rbobt1H/fmiDJUw3gNnLwtvKzHRCcSY93HciTZejk2EQ== X-Received: by 2002:a17:902:8c96:b0:158:9135:98d3 with SMTP id t22-20020a1709028c9600b00158913598d3mr4509598plo.171.1650137869043; Sat, 16 Apr 2022 12:37:49 -0700 (PDT) Received: from [192.168.1.3] (ip72-194-116-95.oc.oc.cox.net. [72.194.116.95]) by smtp.gmail.com with ESMTPSA id u10-20020a63b54a000000b00380ea901cd2sm8056884pgo.6.2022.04.16.12.37.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 Apr 2022 12:37:48 -0700 (PDT) Message-ID: Date: Sat, 16 Apr 2022 12:37:45 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH net-next v4 07/18] net: dsa: Replace usage of found with dedicated list iterator variable Content-Language: en-US To: Jakob Koschel , "David S. Miller" Cc: Jakub Kicinski , Paolo Abeni , Andrew Lunn , Vivien Didelot , Vladimir Oltean , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com, Ariel Elior , Manish Chopra , Edward Cree , Martin Habets , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Jiri Pirko , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Casper Andersson , Bjarni Jonasson , Christophe JAILLET , Arnd Bergmann , Colin Ian King , Eric Dumazet , Xu Wang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, bpf@vger.kernel.org, Mike Rapoport , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." References: <20220415122947.2754662-1-jakobkoschel@gmail.com> <20220415122947.2754662-8-jakobkoschel@gmail.com> From: Florian Fainelli In-Reply-To: <20220415122947.2754662-8-jakobkoschel@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220416_123753_193569_DDD39F3A X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/15/2022 5:29 AM, 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/ [1] > Signed-off-by: Jakob Koschel Reviewed-by: Florian Fainelli -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel