Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp174218pxr; Sun, 10 Apr 2022 10:51:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywqCokg6KSRa4uh3SBCmwCySow14BOD4FZq7XAYLcwxD5zUT7f0ZVfUwGhz/1x4cu8fqcb X-Received: by 2002:a50:9d49:0:b0:418:681b:f6d with SMTP id j9-20020a509d49000000b00418681b0f6dmr29446412edk.160.1649613093784; Sun, 10 Apr 2022 10:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649613093; cv=none; d=google.com; s=arc-20160816; b=gQKDP1sVmXBpVBskt1Mq7VdLpYdJq530lKZSFXTqVYizBThSHvKShvB/+cc6dxwkyg f/yhug7pqL4Vw9DyRlwtr50TloXtIy+QvEoI2N2oCqZnQxzv3KXhQTzqbfNwVIow+lyp VtNdYQzZS++gHXX8EVIdN1L1CoZi5NYxu7iWo117u6ZYnezWT+EunkI6gowRyjwvQ5fV MNzpKEUtnVRhAA62YAkyHGmlyNisgOIn/h4msXmzIz19FUUFLvMhAKamFxtcEI/kXpV8 Mmo5ivBaOTMkOgSULkdkVkg3jA0tv3XbxP4JwrUv3O9opcg1lLVapjYhPuyrB3aHdEMF BbQg== 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=RvZAa7SKDRUob+n4fTMpikTEqqS+v/QxENsH8RtzPww=; b=qSQyHAKFpq3aJsAjfmwkgENixC/pcWK0nO6IOFA0hBBV1g2B1l3IwFnglpJW8eQwom upvvm/bmoUe+1ALDjFmVO52X/IT/UW+gc1w4wOGkChPenGMYpT/XChgD6HIrk4bswX67 icp84K9vT69aCXGukTYWxtbCa729ijsnZm9NvPl/3l38hXZoFWeYX7z8uC3JmETlp+gb FvLwwjEhabqkxJshtmjaqumG53oip1NUE6pSt+ha2lUA+JCOQ2awXykdN2WVyv8aY/HV EO6kvvuuCB9a3Sjcyh8XCoOweI1iMBz06SXhUg+4E+4AoozvB656m5Q5Q36XmXkx1tiC ExUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Hf3GAkOQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i11-20020a50870b000000b0041d76eaac95si1859624edb.54.2022.04.10.10.51.09; Sun, 10 Apr 2022 10:51:33 -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=@gmail.com header.s=20210112 header.b=Hf3GAkOQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236762AbiDIAKd (ORCPT + 99 others); Fri, 8 Apr 2022 20:10:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230472AbiDIAKc (ORCPT ); Fri, 8 Apr 2022 20:10:32 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE018167CE; Fri, 8 Apr 2022 17:08:26 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id bg10so20257640ejb.4; 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=DuFlUL0AdFL9aigZWfRgz6nQhRNo13rTf8y59hasdKWvgqQQj4cpAPl+KjkaD37bmP /jEiVQkBqcza5+g2ZESLQ0KtoVfEI9zh+V/IjsDp7moEI5JS2bGv0c0uyzowyE8kuioH cgw/3PCBMBddKnGrhtR0m2aKKrtArvlWFsN13c0TYzm1kTSsje/SjQwg4+fgro0QWpel KLA04NHCWGi6APQGhcx3Qv2FGMY20ThlyewmpxuZdSF0rMNrUzifYeY3knaFl4xixvm8 0k8Jb7NSkS3ZPQBZK7eArm1ODWQCf6wfIuZ9qXBiXApTFQJ8DTpVZ5CXlWRimBFQo35T Gg1w== X-Gm-Message-State: AOAM532tfNyLkYKIiTPBRrbuNIg13bLQNYVaxEu71YEP0KQJjPmBe8I7 uXkP/WkwhfxcDxeOeUAHOi0= 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 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.