Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3112344pxm; Mon, 28 Feb 2022 12:15:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwazLjpBoMQjWhp/Mt/LuQgn69y2mp3pkPdRXoZOK4AIcAlTCqfL4vU6RjBi5FEoQqQqcJN X-Received: by 2002:a17:906:564d:b0:6cf:54ec:72ca with SMTP id v13-20020a170906564d00b006cf54ec72camr16202107ejr.110.1646079355703; Mon, 28 Feb 2022 12:15:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646079355; cv=none; d=google.com; s=arc-20160816; b=qvbghy2l5x3JCKTJvNe8SnVSGWtSNfIR8sPM2G7b8TYqlRsdfhrCrp1zDxSFnCH9ol 4b0QAClmvd7R3nzI4gtugxduPp5POXeT4py3E4e4EMKwP+6F1vEPA5VH/s7x6Yi9ggbk RYH3CGIioOQ5a0kXEZEsog5Lqd9XgKEi9ONDsiHb9I2RhAAKM7GVEqKnedf39/aFGOUD fhZoyUn1fglYSiac8zhJ4iycLTRq9N3Nq3xRMQKF3DrQhsVkpL6NwDzMuBEtAXaBGZxg 9RsDrX9H2KFUBBq8xBgARPD1diqA72Y3MwWHXp2uCaPStShItlNc8jgSygN2mYrqLcEe ZQRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Rhevy6fb5H45VxDHjLDNCxtPhjJ0u7uFLdfSx9pxlIs=; b=mPGImVpCx8xUE8pbNhc7uYDEK/fJmO0ncjZfdmMOXA+liDm3HEzt5GRaClIeS/fTUk 96XPMSW7Xn3duJnjQq9E3EmrPvYNAT6SMQTctO08GdLwwj8/Vwps401kFrKRbf5QS4Lg KiEt0/0i5mQRrykrP4YIdgsfswgU4ernhDziUmbeBP5A+Ws5fnS+zyfAqZaPmlAXYpZP PBCPc42CwK3oLXxoEmJ1yJnTV3DWxDqVnOil363Qc3qiHI/CUUDDhaHeoqfYdGxiNkMD Xj7qjYa60HK3KZi3JbWRmgXPyUss2P8HPjlVOkkkN1bcpIOC+iLWoQ1Q8FHNHeM2RFza VpUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=SFiiDask; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 hh8-20020a170906a94800b006b29d8e3865si6941344ejb.215.2022.02.28.12.15.33; Mon, 28 Feb 2022 12:15:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=SFiiDask; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229899AbiB1UQE (ORCPT + 72 others); Mon, 28 Feb 2022 15:16:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbiB1UP5 (ORCPT ); Mon, 28 Feb 2022 15:15:57 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E93E427D7 for ; Mon, 28 Feb 2022 12:15:17 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id i11so23363185lfu.3 for ; Mon, 28 Feb 2022 12:15:17 -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; bh=Rhevy6fb5H45VxDHjLDNCxtPhjJ0u7uFLdfSx9pxlIs=; b=SFiiDaskyFzzbW4jCoUqiJYglpNWscp1lwtLHE93w8dRI3h8eXZkrLgebAKqQfA9oZ haXikdZXvfEB810zRURGwChdn/CvMC8Q7Pab3hpE0iVI/nf3FVJvcryQMcC1uZhcoZUU P6IZH9h2w6s9V+B5fc5q6pR5l/tJkcQrm5JJ0= 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; bh=Rhevy6fb5H45VxDHjLDNCxtPhjJ0u7uFLdfSx9pxlIs=; b=eppPsGZzN1SU4W6jEkOMneL2NrdEt8v1f2Cgx/cmROEgW+IC8rbABCINHys30iJRPL z2M8B3IW2dOsfZlUDMPjrgU9bL/1/6lRJForWGbcxpCltcWCOtbjIo9XV4LmD5lxatON /VfpR8bWStkcXzhn9U8vl4aT2XIlUnXzJnOWj3REo5+a/DSsuiMFFBpcZ6IReaIQagMS Ng+GK/W3bGYNo3aZzykG23W2bBVMjnojqO3k/eJ7HQx/HwH6ChpLm0FstnmWNmqf9KhW 00SK7QKbPNneQvp9HdHjuXEzOIyZ6/EKPUnHu/lxL8/H2Qj38yTEIc051oe5XNVSHOcM g5yg== X-Gm-Message-State: AOAM5326rR55pP56PcyxuIy3rKZJcuS0aZ508vmWza7ksljrfktnRcs5 yfa+rLMPt+w5+RrpoE9l/XA1HrD5xqY5A41IDDQ= X-Received: by 2002:a05:6512:14a:b0:443:136c:ea0a with SMTP id m10-20020a056512014a00b00443136cea0amr14349216lfo.62.1646079315454; Mon, 28 Feb 2022 12:15:15 -0800 (PST) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com. [209.85.167.53]) by smtp.gmail.com with ESMTPSA id o22-20020a05651c051600b002463aa0ccbdsm1501954ljp.46.2022.02.28.12.15.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Feb 2022 12:15:13 -0800 (PST) Received: by mail-lf1-f53.google.com with SMTP id j7so23329439lfu.6 for ; Mon, 28 Feb 2022 12:15:11 -0800 (PST) X-Received: by 2002:a2e:924d:0:b0:246:370c:5618 with SMTP id v13-20020a2e924d000000b00246370c5618mr15110351ljg.358.1646079300900; Mon, 28 Feb 2022 12:15:00 -0800 (PST) MIME-Version: 1.0 References: <20220228110822.491923-1-jakobkoschel@gmail.com> <20220228110822.491923-3-jakobkoschel@gmail.com> <2e4e95d6-f6c9-a188-e1cd-b1eae465562a@amd.com> In-Reply-To: From: Linus Torvalds Date: Mon, 28 Feb 2022 12:14:44 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr To: =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: Jakob Koschel , alsa-devel@alsa-project.org, linux-aspeed@lists.ozlabs.org, "Gustavo A. R. Silva" , linux-iio@vger.kernel.org, nouveau@lists.freedesktop.org, Rasmus Villemoes , dri-devel , Cristiano Giuffrida , amd-gfx list , samba-technical@lists.samba.org, linux1394-devel@lists.sourceforge.net, drbd-dev@lists.linbit.com, linux-arch , CIFS , KVM list , linux-scsi , linux-rdma , linux-staging@lists.linux.dev, "Bos, H.J." , Jason Gunthorpe , intel-wired-lan@lists.osuosl.org, kgdb-bugreport@lists.sourceforge.net, bcm-kernel-feedback-list@broadcom.com, Dan Carpenter , Linux Media Mailing List , Kees Cook , Arnd Bergman , Linux PM , intel-gfx , Brian Johannesmeyer , Nathan Chancellor , linux-fsdevel , Christophe JAILLET , v9fs-developer@lists.sourceforge.net, linux-tegra , Thomas Gleixner , Andy Shevchenko , Linux ARM , linux-sgx@vger.kernel.org, linux-block , Netdev , linux-usb@vger.kernel.org, linux-wireless , Linux Kernel Mailing List , Linux F2FS Dev Mailing List , tipc-discussion@lists.sourceforge.net, Linux Crypto Mailing List , dma , linux-mediatek@lists.infradead.org, Andrew Morton , linuxppc-dev , Mike Rapoport Content-Type: text/plain; charset="UTF-8" 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-wireless@vger.kernel.org On Mon, Feb 28, 2022 at 12:10 PM Linus Torvalds wrote: > > We can do > > typeof(pos) pos > > in the 'for ()' loop, and never use __iter at all. > > That means that inside the for-loop, we use a _different_ 'pos' than outside. The thing that makes me throw up in my mouth a bit is that in that typeof(pos) pos the first 'pos' (that we use for just the typeof) is that outer-level 'pos', IOW it's a *different* 'pos' than the second 'pos' in that same declaration that declares the inner level shadowing new 'pos' variable. If I was a compiler person, I would say "Linus, that thing is too ugly to live", and I would hate it. I'm just hoping that even compiler people say "that's *so* ugly it's almost beautiful". Because it does seem to work. It's not pretty, but hey, it's not like our headers are really ever be winning any beauty contests... Linus