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 0C317C433F5 for ; Sat, 9 Apr 2022 00:09:36 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x6TrJDjsNdaHOXcWU5EwUWURE5zco2Hzt1j8r6eqhDo=; b=3ZEjlk2TKMuBRX aUtkGL5zS3n1YL+1BOEPNJcAKPYITAxGHmcNbY8uvGHB0VsASnvDaqzFtUgFgq2amaMDXoJJ6mHjp Vv9Ghfl9R2A2X9li7VXAEp9MgL9XvHA21EzGuGWVEV6cCqMfnGFD+ddkcbH/x57jteg3BqXHzd+wg GGqNsG97D1pQB81s31fYmnZk6UcrBNP5CZRp5d6e+iEwQxMj5ozWwnyaqNhPpCd4iqMxH6Q04xcDP OklsLWXo+fKstpmwx6kaNODV3nnzdQHNwua2H+sDqNNbWtsGc3cvcqwYUI4cDaD0+agWRJlDaoHMw 3tHOukvTRUmjeyZL1qdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncyeW-001Xgz-Lf; Sat, 09 Apr 2022 00:08:32 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncyeS-001Xg6-Pf for linux-arm-kernel@lists.infradead.org; Sat, 09 Apr 2022 00:08:30 +0000 Received: by mail-ej1-x633.google.com with SMTP id dr20so20137886ejc.6 for ; Fri, 08 Apr 2022 17:08:26 -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=RvZAa7SKDRUob+n4fTMpikTEqqS+v/QxENsH8RtzPww=; b=Hf3GAkOQzv9e8PvaX4T37CgoPYyjwun300cYmypPebz99NbqI5XWgZUUr/cRfgCQ0q yEyPv3iui1C1/grSAXRrWRuN8dbz6cBQEpg3lM9C37EBvM5sQDouUxhFabNcQizQcdU8 1s+r7XOnue2u+UMcpKJu/o5yZnpvCQoIqy1MlxgC7F/5F2fvQ+eQEk2tTjLrTRaQwq71 fGM/L62bKnVvaOGDbo+8C5lRYbmkPMu3xXTxHpTBlvwi8Nl0ZlKE28458OZhFawR3t/T U/DFqLcUt7Ns/zgPRVKNPT4qAkIRo6ipV/fvzLQk22ztkCl4kIxx7nuo9Oa47HrHOD0G Hjmw== 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=RvZAa7SKDRUob+n4fTMpikTEqqS+v/QxENsH8RtzPww=; b=lmXsHVupfVx2DdMX4/5FK4vd+rDooEzdTaFfVCRc4hLQN2TP2ZvVFdNWw7ZJ0eZWpi yeu50OXbpXg97yS7/sStP9TLtV0AeWOAhDKVLS639wNV7qSq5VxANZ+ZABEe7+myAfMm 5I/jlhuMHLBTH2gfcvy+rdyQ9wwrzSo1vI1t4whrK09IPKnZgq+UwDHEc8yTpJb2soPw vpRuDisN9EA20j2Ad5ElYJsrSn6HUOdLYJDr7aIajcKXrKu2a9zoQRpG2E8W8n75Pgua eoqw1Fjou+bjsky/aQELK3/xS2f9KxUy5wrY7rML604la3wvAtZXY7zoxv907rR0mOSp YknA== X-Gm-Message-State: AOAM531y+MhZ2sx1j90CBsqUY6+xfwkbMvtkh4Dum5ChM7do3n2MauVQ SBgkuF9Q3F2LCiAVoAB46h8= X-Google-Smtp-Source: ABdhPJxa+uwu4gunlQPwRdiolDxha0utOQH8M/7X9mDxxlHZQFL3dCLpiHOPKltrB32NP/LUIeS0CA== X-Received: by 2002:a17:907:6e04:b0:6e0:95c0:47b8 with SMTP id sd4-20020a1709076e0400b006e095c047b8mr20688094ejc.483.1649462905357; Fri, 08 Apr 2022 17:08:25 -0700 (PDT) Received: from skbuf ([188.26.57.45]) by smtp.gmail.com with ESMTPSA id v2-20020a509d02000000b00412d53177a6sm11146780ede.20.2022.04.08.17.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Apr 2022 17:08:24 -0700 (PDT) Date: Sat, 9 Apr 2022 03:08:22 +0300 From: Vladimir Oltean To: Jakob Koschel Cc: Jakub Kicinski , "David S. Miller" , Paolo Abeni , Andrew Lunn , Vivien Didelot , Florian Fainelli , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com, Ariel Elior , Manish Chopra , Edward Cree , Martin Habets , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Jiri Pirko , Casper Andersson , Bjarni Jonasson , Colin Ian King , Michael Walle , Christophe JAILLET , Arnd Bergmann , Eric Dumazet , Di Zhu , Xu Wang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Mike Rapoport , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." Subject: Re: [PATCH net-next 02/15] net: dsa: sja1105: Remove usage of iterator for list_add() after loop Message-ID: <20220409000822.mbz34qevh7babqo5@skbuf> References: <20220407102900.3086255-1-jakobkoschel@gmail.com> <20220407102900.3086255-3-jakobkoschel@gmail.com> <20220407205426.6a31e4b2@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220408_170828_891668_096BE022 X-CRM114-Status: GOOD ( 14.83 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Apr 09, 2022 at 01:58:29AM +0200, Jakob Koschel wrote: > Hello Jakub, > > Also the list_add() could be converted to list_add_tail(). > > Good point, I wasn't sure if that's considered as something that should be > done as a separate change. I'm happy to include it in v2. By now you probably studied more list access patterns than I did, but I wrote that deliberately using list_add(..., pos->prev) rather than list_add_tail(), because even though the code is the same, I tend to think of the "head" argument of list_add_tail() as being the actual head of the list, and therefore the head->prev being the tail of the list (hence the name), something which doesn't hold true here where we're inserting in the middle of the list. Anyway it's just a name and that's what felt natural to me at the time, I won't oppose the change, but do make it a separate change and not clump it together with the unrelated list_for_each_entry() -> list_for_each() change. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel