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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AD84C7EE24 for ; Tue, 6 Jun 2023 13:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231674AbjFFNSD (ORCPT ); Tue, 6 Jun 2023 09:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233726AbjFFNR4 (ORCPT ); Tue, 6 Jun 2023 09:17:56 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA009F3 for ; Tue, 6 Jun 2023 06:17:54 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-977c72b116fso499393666b.3 for ; Tue, 06 Jun 2023 06:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1686057473; x=1688649473; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+4m4td7TsrrilSTR7j+gHheVoaRExoQsmOFwSbyWIUo=; b=DY7rGVtAaWLwVUgmwFZLJZYI3PPxhWaRAQRrNjTUUSmIR017i55dGv+30XXnWPXI1D TFfyMWWcbdAi33jLUGtB0Dv3ZXCBLKYMFyQY+biI2BG8oAK5l8GpLMzOK3zMKfbEY65S mqMVkueVV6C2yNeIbyqxU7eSIYkWPZd7q20AU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686057473; x=1688649473; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+4m4td7TsrrilSTR7j+gHheVoaRExoQsmOFwSbyWIUo=; b=Qhz7tLcI71H8e/dlrwnWgUJ6+mMz+xdT0Hjp8Iz/dVWFJF5JVKPS1bYTxopszZqFUk vzlKYybO47iDN63H1Ll8FMP68S/vioiVSzV1mbhDVYGh4/pFN0Ydqnvkatp8/YU8pw7t uamw0YfXxNkNXUPSl/uZWQy4BQtp0dv2VjMElIp8tAwPLwxmkAIirSRIDLARDfwU2xqs jBra0DmBw49DFH4uo53MVuU/+5UItDOFjUgyQ7BrcEbEuetGjfMT9UcIdLM4xIWsOXH6 zw6YuQAQ4lrBH5CiA9j0FeaBh6hVJrIHN2Z5z5AVEEK1/nZLOPyU9k06sXV/ychYf1sY WBMA== X-Gm-Message-State: AC+VfDyi8G/DUM1Ly144UDI5IDkBz8EN+9zcekolazN6XAZAN0JtAiJj DICshsPzrt5abGlFZyGCYnFb27/SGqFGnaCBEGpY6zhZ X-Google-Smtp-Source: ACHHUZ4cfVqEOvEK0HfFh7rKE2MUYV5uCUwJpvUZELId456aLlSO+ClC9M163AnYUzAqj2oBwbWfEA== X-Received: by 2002:a17:906:d54f:b0:96a:1c2a:5a38 with SMTP id cr15-20020a170906d54f00b0096a1c2a5a38mr2800176ejc.11.1686057473260; Tue, 06 Jun 2023 06:17:53 -0700 (PDT) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com. [209.85.208.45]) by smtp.gmail.com with ESMTPSA id sd17-20020a170906ce3100b0095fbb1b72c2sm5560865ejb.63.2023.06.06.06.17.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jun 2023 06:17:52 -0700 (PDT) Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-51492ae66a4so8553160a12.1 for ; Tue, 06 Jun 2023 06:17:51 -0700 (PDT) X-Received: by 2002:aa7:d605:0:b0:514:92d7:7d69 with SMTP id c5-20020aa7d605000000b0051492d77d69mr1793652edr.27.1686057471469; Tue, 06 Jun 2023 06:17:51 -0700 (PDT) MIME-Version: 1.0 References: <20230526205204.861311518@infradead.org> <20230530092342.GA149947@hirez.programming.kicks-ass.net> <20230606094251.GA907347@hirez.programming.kicks-ass.net> In-Reply-To: <20230606094251.GA907347@hirez.programming.kicks-ass.net> From: Linus Torvalds Date: Tue, 6 Jun 2023 06:17:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/2] Lock and Pointer guards To: Peter Zijlstra Cc: keescook@chromium.org, gregkh@linuxfoundation.org, pbonzini@redhat.com, linux-kernel@vger.kernel.org, ojeda@kernel.org, ndesaulniers@google.com, mingo@redhat.com, will@kernel.org, longman@redhat.com, boqun.feng@gmail.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org, frederic@kernel.org, quic_neeraju@quicinc.com, joel@joelfernandes.org, josh@joshtriplett.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, rcu@vger.kernel.org, tj@kernel.org, tglx@linutronix.de, linux-toolchains@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 6, 2023 at 2:43=E2=80=AFAM Peter Zijlstra wrote: > > ( GCC refuses to accept _Pragma() inside an expression. If we really want this all, I think we'd just stop using -Wdeclaration-after-statement entirely. There are other uses for it, and people have asked for mixing declarations and code before. I think that particular straightjacket has been a good thing, but I also think that it's ok to just let it go as a hard rule, and just try to make it a coding style issue for the common case, but allow mixed declarations and code when it makes sense. For the whole "automatic release case it definitely makes sense, but it's not like it isn't possible useful elsewhere. I just don't want for it to become some global pattern for everything. That said, I still don't understand why you lke the name "guard" for this. I understand not liking "auto", but "guard" doesn't seem any better. In fact, much worse. Guarded expressions means something completely different both in real life and in computer science. I'm assuming there's some history there, but it makes no sense to me as a name here. Linus