Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1598953pxp; Sat, 12 Mar 2022 15:27:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsrlCWIDE7KDX4GmIuSO+do6+buQZf8HimHNZCgBWE795PnU82LbqJdLER+5MtklxeS7Dy X-Received: by 2002:a63:c156:0:b0:37c:9955:ab24 with SMTP id p22-20020a63c156000000b0037c9955ab24mr14209392pgi.90.1647127663201; Sat, 12 Mar 2022 15:27:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647127663; cv=none; d=google.com; s=arc-20160816; b=WwNgQypAnqPnLl38OAnbKzlbz19M7GDjl1kMZKGkcG4nxM4DqdcxNZ8wM/Sogdcr12 94v2xc5VFHS7siUThyHTkMcgQenBpRmLun366BfVu/c0cC5mymMLq+0kTLA2AoGftD0s AmaTf0h5Nq0m+3r4ZcHrS/3CY9C8QSIs1JO0yC48bu3cfdamQkLHcs6t4tnuVKNOmynG bly3tmWY/LL8Z8+t5Z1KEuWBqVQI1hDX+L7P2RToHdvdUjoCpW6slM2din7t4uVasIZa NJpmDrHxMZ0nSRr/uENTpHXepzSstDUwX0PoNeOJ42kYnvZ9zRhLAbwXz14jCMcJPd/c PB6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Al6bnHgVgcqWGS7SzpEP6EcNnlitYzP4oWhkmGFLRYg=; b=vkYMIbghTkChsIYquw2g/SnL1lMKu9LDdmuuvo73D541H+o2zkaVDlf2IfbEfSQDYf ErwLR+VEQvWFwd1I/GS6H/PZdtNQmlMaVUXK71CcMOZzl/1FeYW5Y+nGQ86/b9mZVCWo 5H78XR/XZImEt+h00gM51XoaCWway0mPm5MsxFu8hP70gRRy5lx0yw8A9Psp4DqW4J+K 4llHq3WmHcX7k+70/CmaphfTxI/B9eZKAgue5JQ2AD9xSvo2nruNLqiNjZC3AKpKYzor dnWf9Qe9Nb9CUpsWepyID4RXeuuzgcZ+4rioh71cbMYCY0HihPzCgxRKGWMVgRteUkWX Vj+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=TUNQe6vd; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a186-20020a6390c3000000b0037ff088eadasi10948874pge.253.2022.03.12.15.27.28; Sat, 12 Mar 2022 15:27:43 -0800 (PST) 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=@linux-foundation.org header.s=google header.b=TUNQe6vd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232776AbiCLVpT (ORCPT + 99 others); Sat, 12 Mar 2022 16:45:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232773AbiCLVpS (ORCPT ); Sat, 12 Mar 2022 16:45:18 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1BCC6E4D3 for ; Sat, 12 Mar 2022 13:44:11 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id g17so20913246lfh.2 for ; Sat, 12 Mar 2022 13:44:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Al6bnHgVgcqWGS7SzpEP6EcNnlitYzP4oWhkmGFLRYg=; b=TUNQe6vdMdyq5Mk9RcZa0WrgFWSQNBekv3itbnQYPfxEcKkulC5M9G35QESGHx3lCs CkiAAaqI2HmrSs4euU/9PrCa+nGQ4kj+UavhRfZqSrLFd9YMMCelxwBYrKyghkz/zT4k cSm+n0RWPhJ3qKq/xEsoqAW/Ef3Ix0mfhyfWA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Al6bnHgVgcqWGS7SzpEP6EcNnlitYzP4oWhkmGFLRYg=; b=G0ugqZOBgfeUWnE9VpaIyF9aa0arRul6/+/B8KPXUAx1nSuE8CXuqESRaYJdaF8xDU ZwKXWfiAlNObzMpsdpPViv9U5ZBLZ6lyrDxmnFWcmzSgTGAPqRbftjifKNobafaERBcu w4nWyN978xMTvAUMdgzfRhsbWJGd1PXvsdYilQ+VK8pc6EdNfqdjOMSiWUVTsHpHcCGo GCNHtUHuD2twnD99S5zbDDTc+OtTc2F8ThLSPKQMUQYXFVBG2Ly7y8c51kF8Kj7uxsfG 0Xu4SCqWWpHGFfWPLFRkmoZcDf6NtGlgQ3eq/cbjglSVvqiOLeMeRBbOxt9ZL5U8+vNn okGw== X-Gm-Message-State: AOAM5316N9g28xd1GNzLmQ2V9LnZU2hv/cp7AnjFNI1leIjyoli4P7Dl 2w5HrmXrRR4XG0KfpovWOHNcRWEXg8c17Qvek+I= X-Received: by 2002:a19:f115:0:b0:448:277f:8e with SMTP id p21-20020a19f115000000b00448277f008emr9419260lfh.503.1647121449845; Sat, 12 Mar 2022 13:44:09 -0800 (PST) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id w24-20020a194918000000b004488e49f2f7sm185210lfa.127.2022.03.12.13.44.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Mar 2022 13:44:07 -0800 (PST) Received: by mail-lf1-f43.google.com with SMTP id bt26so20921775lfb.3 for ; Sat, 12 Mar 2022 13:44:06 -0800 (PST) X-Received: by 2002:a05:6512:b13:b0:448:90c6:dc49 with SMTP id w19-20020a0565120b1300b0044890c6dc49mr147974lfu.542.1647121446538; Sat, 12 Mar 2022 13:44:06 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Sat, 12 Mar 2022 13:43:50 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/6] list: add new MACROs to make iterator invisiable To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Xiaomeng Tong , Arnd Bergmann , Greg Kroah-Hartman , Jakob Koschel , Jann Horn , Kees Cook , Linux Kbuild mailing list , Linux Kernel Mailing List , Linux-MM , Netdev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Sat, Mar 12, 2022 at 2:24 AM Micha=C5=82 Miros=C5=82aw wrote: > > The source type is not needed for the macros [..] Ahh. Yeah, as long as we don't do typedefs, it looks like we don't need to pre-declare the member access types. I expected that to be required, because function declarations taking arguments need it, but that's because they create their own scope. Just doing it in a regular struct (or in this case union) declaration is fine. So we would only need that post-declaration. That said, your naming is wrong. It's not just about "self". It's any case where the type we iterate over is declared after the type that has the head. So I suspect it would be a lot better to just always do it, and not do that "self vs non-self" distinction. Linus