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 35B42C77B73 for ; Tue, 6 Jun 2023 13:18:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237722AbjFFNSR (ORCPT ); Tue, 6 Jun 2023 09:18:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235439AbjFFNSQ (ORCPT ); Tue, 6 Jun 2023 09:18:16 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25F7810CC for ; Tue, 6 Jun 2023 06:18:15 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4f4b384c09fso7513077e87.3 for ; Tue, 06 Jun 2023 06:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1686057493; x=1688649493; 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=gQYiv9iBeJR6BRvT30OiFSN3A91DJVAqnexlmDBaw+Bi1xVIFbwzsBKO+uYE0zveUT T3pIOV9siNvfbSB4N9uhePioDUu+KOLS7PJGheh39V06cqnhvDDAQqWxqtrT8ZQ6XAiu hakU+yhM9VJSMCHdegvwkrW341c1WdD1Fa0OA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686057493; x=1688649493; 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=P6RUAqKbmVcbAvU/dTLeRtDO97vI23ttH6Q+am7MaeH7y53b+zPEz1HNhZ5ErqN51y Ry9jNjev7XjSgprLZjlb1LQkSunQBRczQYB1tbvxxxochhUpReYAvZ3PT9kFp8Bylqaz vRW9n42bdcGyM0Yccop8jZDRPPvJKrPDpiCzNEE3KpZbDr3gNOHviYC4zodymLYscXPF p2hyvKqfJbYp3pPkenw+LmPdeQmyw8O3Y3IDEvDYI9ND/9AuvSi4dr9jnbXHefC0cd0/ NsJc7BOWqchTnPEqWaRtcRmsjZNtrRnY0pHi47M34bFiI6FRnGt6i4wsuRvVt+okom+i PNPA== X-Gm-Message-State: AC+VfDzsFx9jGHWsInvBFaYQxc1Avjr+W4CZKrNXblpgeGMEQZskm8wx 1KrL+2/AwslCaxFPE4fLiHH+1tgEM//pN2V+maOcMjAO X-Google-Smtp-Source: ACHHUZ6m7Lp+wBzSIEPWKDupX6vHb9tflNuXYB+a+uD1F0Bj6LebUenTunpEsz2GSeARDIdt05WUOA== X-Received: by 2002:a19:c507:0:b0:4f1:496a:de8e with SMTP id w7-20020a19c507000000b004f1496ade8emr899945lfe.27.1686057493292; Tue, 06 Jun 2023 06:18:13 -0700 (PDT) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id w27-20020a05651204db00b004f60f2979e6sm1471804lfq.83.2023.06.06.06.18.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jun 2023 06:18:13 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-4f63ab1ac4aso628806e87.0 for ; Tue, 06 Jun 2023 06:18:12 -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-toolchains@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