Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp362160rdg; Thu, 12 Oct 2023 07:48:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGM4o3tJpscYFv+Ed54WFVkoXQyEjlNBa24AGjpQK3ZBXT5JRoTcVtx8zXt/rpNjsQT+rXh X-Received: by 2002:a17:902:da83:b0:1c6:e1d:8be0 with SMTP id j3-20020a170902da8300b001c60e1d8be0mr36889065plx.2.1697122127546; Thu, 12 Oct 2023 07:48:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697122127; cv=none; d=google.com; s=arc-20160816; b=UODLMbUt1IfGVR8uq1Js1DJZ4x96LPKqAZSeP9RaDfGQC3HQyDh95Ooo535Xjc4PeF CSAiyl60g52WtC0aDQ5dYUjIyHDRDAA2GEboci1++Lh3Qz1x1hU70hKu/r0rtoxmxNye 4sCdDc3Yfciun73Ccf6uCA8SEbZDKpNdZkHqEPGi7Zfw7lXg5wjW+Bf3B2yUCBttQF1x KV9hr9BZ1OHlyPGVP/g5y2HfjDhPi98Wc7rzeo16ViTDyj4Na4HFkPIdqnvLdt42wxMu 6/leW5YWnHWFOjVL1+Df540adsXZjVVXxETUBb/wPTTwg2acx0B9A+FrP/O4tF2oZmFs v1tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=080VzJnEfuArzcwOSGOgr9RGcKQ8sqJMtLBI1FPOkBI=; fh=Cl8PR82hb6iB1QjwozkTx9HiawgI8FcKZNGT4UfgAm0=; b=x7tegQb+BvR+zeV5pC1Mc7cun/DCWXL/BPBtD5Ce4dxFHU0BVY0vKgBCjQ2Qyhkh+6 In6pe90bquspKxGxvZMAbOMoV6/5G0qzpWxNtR//uSO0PSB4PbohfOFC08VGXxbpLRZw xI8PYcL3zQDrXg6eG833GAQ+olM1G6nJYih85JFSLyqQ+MTdMAM4xKkaCvHx0yCHNAeY 9kWTuFu7HK3e1vcnPjv3vOp6eFqvSDIhdSHe69EfT/62LTtevSuksI9WtKogVltZqmW1 /hFyVypVUwAStJsMMazxSvJ2ib1n2a/geCQ16n/2ecqHLn6TZCfewekLx2/pa6YHhtzw Cwbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id f6-20020a170902e98600b001c5d09c7b0dsi2279200plb.458.2023.10.12.07.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 07:48:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 25E4C819BB50; Thu, 12 Oct 2023 07:48:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347110AbjJLOsd convert rfc822-to-8bit (ORCPT + 99 others); Thu, 12 Oct 2023 10:48:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234913AbjJLOsc (ORCPT ); Thu, 12 Oct 2023 10:48:32 -0400 Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB3B0BB; Thu, 12 Oct 2023 07:48:30 -0700 (PDT) Received: from omf15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id DD3C7160680; Thu, 12 Oct 2023 14:48:28 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf15.hostedemail.com (Postfix) with ESMTPA id 29DF017; Thu, 12 Oct 2023 14:48:25 +0000 (UTC) Message-ID: Subject: Re: [PATCH v3] Documentation/process/coding-style.rst: space around const From: Joe Perches To: Miguel Ojeda , dan.j.williams@intel.com Cc: corbet@lwn.net, gregkh@linuxfoundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux@roeck-us.net, max.kellermann@ionos.com, workflows@vger.kernel.org Date: Thu, 12 Oct 2023 07:48:25 -0700 In-Reply-To: <20231012115039.1680561-1-ojeda@kernel.org> References: <65271731e25f4_7258329472@dwillia2-xfh.jf.intel.com.notmuch> <20231012115039.1680561-1-ojeda@kernel.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Rspamd-Queue-Id: 29DF017 X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Rspamd-Server: rspamout06 X-Stat-Signature: o4bafx189b39fosaj9tugy1ng4t4hk6t X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18cEtRlNQpeQGZ7fw6pYLI6AhZUUOJ6xzw= X-HE-Tag: 1697122105-37381 X-HE-Meta: U2FsdGVkX18LWY7kGsCiHQheQS4LqScy5dMW4qcBmdEHxO9ovUtXsMDNt3FkAATB6QEVj6OE5VKr4UAFNsAIwCqNYT78sS4IRUUdbpxEdwKbbQiuvZYmLA0q2w62E505D9p82THAebCe0EGd52BqQclvNnrB5jm3bYx30j0SfbAxRC90tUbNKQy0c3xbr70M0yWot2aDEWRaqUOjn3XUH8cUDtBfDujq+ldDZInBI6tHkpR6v5xxZk3rcr+RtUDYYT1F8yAEHIkHPJ0TLX5zI3adAfzmscsrlj8yQVrLZBgZUW4dEFQMHoHH+Hx0aj/d X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 12 Oct 2023 07:48:45 -0700 (PDT) On Thu, 2023-10-12 at 13:50 +0200, Miguel Ojeda wrote: > On Wed, 11 Oct 2023 14:44:17 -0700, Dan Williams wrote: > > > > I notice that clang-format reflows that example to: > > > > const void *a; > > void *const b; > > void **const c; > > void *const *const d; > > int strcmp(const char *a, const char *b); > > > > ...but someone more clang-format savvy than me would need to propose the > > changes to the kernel's .clang-format template to match the style > > suggestion. > > I think we could use: > > diff --git a/.clang-format b/.clang-format > index 0bbb1991defe..9eeb511c0814 100644 > --- a/.clang-format > +++ b/.clang-format > @@ -671,6 +671,7 @@ SortIncludes: false > SortUsingDeclarations: false > SpaceAfterCStyleCast: false > SpaceAfterTemplateKeyword: true > +SpaceAroundPointerQualifiers: Both > SpaceBeforeAssignmentOperators: true > SpaceBeforeCtorInitializerColon: true > SpaceBeforeInheritanceColon: true > > At least that makes it match the documentation example -- I got this: > > const void *a; > void * const b; > void ** const c; > void * const * const d; > int strcmp(const char *a, const char *b); > > But it is only supported in version >= 12, so we need to wait for the > minimum LLVM version bump. Do older versions of clang-format ignore entries they don't understand?