Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1398717rwr; Fri, 5 May 2023 13:33:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6E3yKAnhhByNU1LeQO8A7tTEOar/GD0xlkMuWyXD0Mq2eJHiEn9x6/Uxk1TVMv//Ur+Uc+ X-Received: by 2002:a17:902:e547:b0:1a6:a327:67e1 with SMTP id n7-20020a170902e54700b001a6a32767e1mr3347630plf.57.1683318788596; Fri, 05 May 2023 13:33:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683318788; cv=none; d=google.com; s=arc-20160816; b=tWoCmv2skmLqsS8oK/juUFr6ZA76w9zk7TE7w2OEK9K8Rwat6kulpvhtwkSCvxIBFm GrPWK336mzaIjzCbW5le5s2SawOZno6VBkWICntYTR6M7FNM5Iah9MjrHUPS9GXtDU4N N6rU+PP/AY2Uh6/epk6YplLIQ0e5fIDSlrteUktwiMAf5basESBTQenJSOhAAbVo95jQ p6PCvcjp4lM0YzsXccvfYvzLg2MMXjaOgfsOG6tq4NGdTtSvLyf+iwCbPRG0S8BW83hB 2i0nVS5J8ouaBaqR5BCHlq+3TXsghTR4sVFALQVkJo3rtLbyMgu4TSUiZzy8I/g1bPET UMOg== 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=aL4O4xBkvv61r8l6fiCzi2l8LZqK+hvp7Gt2L2M0kwA=; b=0ESN9zjuRSlJyrpn4FbxoPTHgV0cdjXDQuqcxJTYbIOgK8xI1+7rXDyMLRV6BmxHQD zURp9MEbmeCPc7tMmHSm+0Y9Ve7zEqOZ9yiCzvYsTA3zTQAzBUnjbBURWfRbjXpSfG2T gM4lGfTCXHAx/0iTYtNfjrzkmv2bZ0NQ0sgIUoVF0d9jVL4E8Ogbq7yaW0qB2Q1SXb0E bJMTdgfG1oAh4OnYR2B8cGy9rWl0ERC1HI0uRbOpDoMy3C0QvTsQd1EB9IEnUDKzlfLJ NNNhK1kz4M2o9CuW8XWouM0ozFr1inE6pCslHW70iafN22WyhENLMCRtg7nbGpkEXY1s r3bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Oykg45fT; 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 y7-20020a17090322c700b001aaee4e18dbsi2651052plg.379.2023.05.05.13.32.55; Fri, 05 May 2023 13:33:08 -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=@linux-foundation.org header.s=google header.b=Oykg45fT; 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 S230473AbjEEUXD (ORCPT + 99 others); Fri, 5 May 2023 16:23:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230489AbjEEUXB (ORCPT ); Fri, 5 May 2023 16:23:01 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B596D7 for ; Fri, 5 May 2023 13:23:00 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9659e9bbff5so393163266b.1 for ; Fri, 05 May 2023 13:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1683318179; x=1685910179; 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=aL4O4xBkvv61r8l6fiCzi2l8LZqK+hvp7Gt2L2M0kwA=; b=Oykg45fTdrjAbY7eTF+V20gWgchrThB6dOjgbfRUrV1Kck6I16pUPviTyqrqjHqAiP TnC7UCf+c5OdiFhpfpupimUE29Y1qAdpBx0xAl3K5IQI7MO3FSiWS9bpRvLEJhjcTOaV kdakVLv/4CObDj6PG19nXp0JJSbAj+kKnOwwM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683318179; x=1685910179; 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=aL4O4xBkvv61r8l6fiCzi2l8LZqK+hvp7Gt2L2M0kwA=; b=dz/4f4ssqZ0DPTb56T86Y85xvQFQOQLS6Ahtfn/EbG9UBtpe6i9An7Ipoh2nxEsqKm M/8vR+X+glETpLE6/tmC5glc6mOzpUEN3j/u/k+sk1wXSWI3jH4XadCau8o5+OgyxjAF NtmPASadmSvJpmUMhhcE0ZfUIXJ7GIkaXT50iagm401+Gu2+yBqksS+niAP2WsWkSSGr vwP3Kh/Dn4OoT+vZgI57Ex/MC6cBBwv1/0D/vE+QzAQ+5WnNfRDtDwBr/IeefjlID5GH d1qnsNly+jivzmnDYKWf0iv1UGpproGQCiO3A0gq29nrpw8Yr8/sZviP3Nfhr1PfpdIF aVjg== X-Gm-Message-State: AC+VfDzaDWhBpHAwSuyOzwK4tJBfE/tN/V1OfT2eCETYsSzdmisSgpkp +Y8a+ZsTX4GR10Uj9fuAVd2CyaANvDfV1o/mHh4hIQ== X-Received: by 2002:a17:906:7947:b0:94e:dd68:aba1 with SMTP id l7-20020a170906794700b0094edd68aba1mr2398310ejo.67.1683318178654; Fri, 05 May 2023 13:22:58 -0700 (PDT) Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com. [209.85.218.42]) by smtp.gmail.com with ESMTPSA id a19-20020a170906469300b0095004c87676sm1349431ejr.199.2023.05.05.13.22.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 May 2023 13:22:58 -0700 (PDT) Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-9659e9bbff5so393158666b.1 for ; Fri, 05 May 2023 13:22:57 -0700 (PDT) X-Received: by 2002:a17:906:9b89:b0:965:a5b5:e075 with SMTP id dd9-20020a1709069b8900b00965a5b5e075mr2580600ejc.75.1683318177525; Fri, 05 May 2023 13:22:57 -0700 (PDT) MIME-Version: 1.0 References: <20230504200527.1935944-1-mathieu.desnoyers@efficios.com> <20230504200527.1935944-13-mathieu.desnoyers@efficios.com> <3b017a9f-220d-4da8-2cf6-7f0d6175b30c@efficios.com> <3cc72a67-d648-0040-6f60-37663797e360@efficios.com> In-Reply-To: From: Linus Torvalds Date: Fri, 5 May 2023 13:22:40 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 12/13] blk-mq.h: Fix parentheses around macro parameter use To: Mathieu Desnoyers Cc: Andrew Morton , linux-kernel@vger.kernel.org, Jens Axboe , linux-block@vger.kernel.org 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 Fri, May 5, 2023 at 1:08=E2=80=AFPM Mathieu Desnoyers wrote: > > The reason why I think the lvalue of a "=3D" operator can be argued to be > "special" is because it is simply invalid to apply many of the C > operators to an lvalue (e.g. +, -, /, ...), Mathieu, you are simply objectively wrong. See here: #define m1(x) (x =3D 2) #define m2(x) ((x) =3D 2) and then try using the argument "a =3D b" to those macros. Guess which one flags it as an error ("lvalue required") and which one does= not? m2 is the only "good" one. Yes, m1 works in 99% of all cases in practice, but if you want a safer macro, you *will* add the parentheses. So *STOP*ARGUING* based on an incorrect "lowest precedence" basis. Even for the "lowest precedence" case, you have the *same* precedence. The fact is, assignment is not in any way special operation in macros, and does not deserve - and should absolutely not have - any special "doesn't need parentheses around argument" rules. Linus