Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2274756pxb; Fri, 25 Mar 2022 14:25:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLhB4TT5wcnHsgPbZFSQEZP5glvZDZhboR2ng36mZfW20APkACbtxDE/G7++RO3436Rl7q X-Received: by 2002:a17:90a:e7cc:b0:1c7:bb20:924e with SMTP id kb12-20020a17090ae7cc00b001c7bb20924emr12493642pjb.226.1648243547851; Fri, 25 Mar 2022 14:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648243547; cv=none; d=google.com; s=arc-20160816; b=MAXXpZl4DYPrx9/x/JQD0aI5ZGxLYI+gE+ayHF8CywCNuN5yNx0z+Y+GOutMTo3qX5 MiUuAi5Bhcepsq/KaeifHbEp5e0cQ5Qixksr3YvKwsB3ed5KIwb5/R8ypscWfNXpRpeJ NcEeqIsKwRLVWHWNrHGGg5WoJO0RrOYZRzgymA9C89WCHD39jxUyqFkO3bsLldt/lKDB za1Pn1f+hW5QZe573vsRLIqDZgK10n63G6w5uiNsZc7BTlh7xN7G7qnJ66HeGn5Pp7k3 EZwD5brkkkM69L4EE7OQkwt+8zP6yUZwlQHXXN6MCBZajvPHo9DaIzayNoNTXDJaUpx0 DZzA== 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=uzAuqtwkm46GspJerldWifZpeS2uUUcdgFDDV4iF0Yc=; b=lSRMkqi6OmgF8NfwHcTCP4aC0zLzl48RkFfB566jnkslxn7JLGC+uqsB1Kox2TuVeU iDeTYdmEflBpnNd9KsN08mXUoCuhjJoq+chA9hpHq8Mkbj1WTwTzwaxKu+mbWrp6mFiv /veA2/wGLixVoc4yakdf+Zqd1kUWBRl72gkdWU7+SA/zxP9kjeAFcTUw/zoZS/9qYBYL YZx1gS/wAABelmLBc80LMcJ7d9jyoABfzBY4PBsKH+xrUPbXNWPeD6Ue6DvHamzhny82 9zMJ2hiA5EE59ueItXIJz1R026zOLkwR42vaLR86YsKpNf/RYA8rlj6pZo0nGDWBlJgC 1FEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kCPIJahk; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i14-20020a170902c94e00b001547f38cd5bsi3698164pla.30.2022.03.25.14.25.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 14:25:47 -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=@gmail.com header.s=20210112 header.b=kCPIJahk; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9E987BD7D0; Fri, 25 Mar 2022 13:57:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232430AbiCYU7S (ORCPT + 99 others); Fri, 25 Mar 2022 16:59:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232386AbiCYU7R (ORCPT ); Fri, 25 Mar 2022 16:59:17 -0400 Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6014CB9192; Fri, 25 Mar 2022 13:57:42 -0700 (PDT) Received: by mail-oi1-x22f.google.com with SMTP id b188so9437281oia.13; Fri, 25 Mar 2022 13:57:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uzAuqtwkm46GspJerldWifZpeS2uUUcdgFDDV4iF0Yc=; b=kCPIJahkmzOtz09iL0VBxsl721inkNgOH3ZtvZsKBaopkIMxhCt9wXBCVZYMOlR09o NJPOZusdSDjEUe1v1RHURtfLqkJdx3KH4JphrNnOXpWQEU96pRFb1VqPwVgAvJxtdEpG bopMeVKGXfzygIfBVJOPU5wPvbIk6pW02zSNwJrXOqVnKl17SVYljisZiwRj1uSUCgDu dQ0OCgdtwemBhxEYLAz4q8qK1XAix5DlRTSObG3pXdeNz7Czed057mimeD8qSS8xYrNI qtA0mmZaonjBAf6+nYub+v08IcolTB1yB9z8WdlukM8astVozXDIy9Sva2nvkMUQ8a+j R/+A== 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=uzAuqtwkm46GspJerldWifZpeS2uUUcdgFDDV4iF0Yc=; b=5QRPida1CkAgPqKxYDPKyL5AGhpcay0D+8HmNO1SiTxFjHLGzciUSujfDLHosbKlfd zm5SDNDpVkJmbx7jD0C0S9bOIXJQnm2kSnEiLr7l3zdLpsBBgPoOonkLbq8aYh3BJnmg VHr+x8edA+RZsGRc7ln88aUpaD2GJ+rjHu9F4L+kE+OeozN/AbmA0ZVK18Spazjmf9Xx nBgY3BJbW1WtsznTEeGdT0iG3kw7WWgTbRntca7wlEhgNTtJmwcHVi+oNrehikxM9Fn8 6lBzI/2Y+QACUDIK9ppyWitE7EfRkl3HDu3cXR598XIj65/1mHZgHhFlz6L5QMPY81ec Ug+g== X-Gm-Message-State: AOAM531UEaLP8RW8fgjXG1OS7+xE9CF9wSgX20T8r+CpKsZIV8JvzoV6 pvK4jOOaSF4hPHk8SI1k3Qk= X-Received: by 2002:a05:6808:1485:b0:2dc:d320:ce57 with SMTP id e5-20020a056808148500b002dcd320ce57mr6621661oiw.298.1648241861726; Fri, 25 Mar 2022 13:57:41 -0700 (PDT) Received: from t14s.localdomain ([179.232.121.194]) by smtp.gmail.com with ESMTPSA id v8-20020a05683018c800b005cb39fc3e15sm3129743ote.13.2022.03.25.13.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 13:57:41 -0700 (PDT) Received: by t14s.localdomain (Postfix, from userid 1000) id 2F1001D1F05; Fri, 25 Mar 2022 17:57:39 -0300 (-03) Date: Fri, 25 Mar 2022 17:57:39 -0300 From: Marcelo Ricardo Leitner To: Jakob Koschel Cc: Vlad Yasevich , Neil Horman , "David S. Miller" , Jakub Kicinski , Paolo Abeni , linux-sctp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." Subject: Re: [PATCH] sctp: replace usage of found with dedicated list iterator variable Message-ID: References: <20220324072257.62674-1-jakobkoschel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220324072257.62674-1-jakobkoschel@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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:22:57AM +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 Acked-by: Marcelo Ricardo Leitner