Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp251982rdg; Thu, 12 Oct 2023 04:57:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJBl7lhpw3KVh91xyn5ELw39QH9PnAn4SySQ82zuy2MSch5PcEE7EXqtR5x5NGokzg7Lp1 X-Received: by 2002:a05:6870:1b12:b0:1e9:a4c8:1da7 with SMTP id hl18-20020a0568701b1200b001e9a4c81da7mr3147486oab.20.1697111863772; Thu, 12 Oct 2023 04:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697111863; cv=none; d=google.com; s=arc-20160816; b=RenHgwtwQ5Hop8b8T4lnh1pjxeNo8SP6Llt6WD47c7awrqunO2S1JC84VpWdlLf2hE 2t9uwhl1hlYi0xRPuGXzGc3PW1Nn5fHd9GHn85VNN/tsUqhTT2GD0aS2JGhaBBirefMD xOizftUHaoxvDQ1NbpO5ZZNFm5g9rGWnYGvlrhEXs8HkcbLrGPuShq2d6FNDO18jc32y WQXOhdwNltxKTs5zvaLwbqAUam0RIdoCtaHH/0AVXNucuhUpYmAIBAmHwgkMlOA9DdQe xSJQFAvrog4xGt9uJD5NGOyio4x6TA926NrrffWj8wQfEn91zHtepiCvVJpHE31yVH/e Lggg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3Zkpx5QMyplENXd914QZeOG/3Sb9c8AnPbyfmCle3ug=; fh=/TGWdPMjQIMUqlrRzYCvi8t/sXionKigNABMC352GCc=; b=OVoZ2A9zzTM4C1PKXsaXqj4ZmPqI7jOgOmzTDs6KZBHiKoMpz19Ttzd7UbUHWvlrWv g+3Vmg8QIXjU9SwsBHExY546kdO2Umjf4XsY/hA5PbxTB9sh/9RG5n2bZ3H4RJN40Klp 6MS1YTPK/tBOynhUv8hGYOzFECjEQcU7uMbnZk4zfXjAujrocuGDHmVh/+Cc1AU9UghD paawqZrYJvYF5yt6j4jsxA9ru/httP6dMvYriZX82xYDbNBMfV23r9RFwhtLd5yclyhZ KqA9xzF4xnOpb0EUhzPCYAhUorYLlKGc7Cc/1B8OhBiDTzMYP283kIVG/0mznZvVVGYK YIbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CMlfZNUF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id y10-20020a63180a000000b00573f9a427d9si2052458pgl.717.2023.10.12.04.57.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 04:57:43 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CMlfZNUF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5F1B7818F4BE; Thu, 12 Oct 2023 04:57:37 -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 S1378590AbjJLL4x (ORCPT + 99 others); Thu, 12 Oct 2023 07:56:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379449AbjJLL4U (ORCPT ); Thu, 12 Oct 2023 07:56:20 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30D1F4497; Thu, 12 Oct 2023 04:52:58 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B74BC433C7; Thu, 12 Oct 2023 11:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697111463; bh=4Y7rKxiCW01/9GQcbtlTps0JwLRbYTYOda2S200SdyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CMlfZNUFFNjNNGnSL4zV2wmeRzpu1PDENqmw8/a5GL9RGEkHwBPZPjxI3lSAWHaqr v1Jn6MD0CvycLDWeJtP747k6A25vufz653mr9ZEgww2siCTlcS2k+avMPi2/2xIAt5 B+xbjoZ3qkHOeCSrRQldqOR9rsQ4vBJN2+U7INmyqFZ7jdUrPQpSVVjr8Mvq76eyKH p+ElPXV/Gkp0LPqoQXZ61Y8ktFZqMdDrW0UC/HtT+4Uq0Ijao0AdLaLLAUKnlMN2hv DOqVa2IPVuBEXN1HY89YlwmvdR7HH4ZOhP1pzAsTIhTURMuY/380oQDjNDfbirzLNn KlgAf+2nb681A== From: Miguel Ojeda To: dan.j.williams@intel.com Cc: corbet@lwn.net, gregkh@linuxfoundation.org, joe@perches.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux@roeck-us.net, max.kellermann@ionos.com, workflows@vger.kernel.org, Miguel Ojeda Subject: RE: [PATCH v3] Documentation/process/coding-style.rst: space around const Date: Thu, 12 Oct 2023 13:50:39 +0200 Message-ID: <20231012115039.1680561-1-ojeda@kernel.org> In-Reply-To: <65271731e25f4_7258329472@dwillia2-xfh.jf.intel.com.notmuch> References: <65271731e25f4_7258329472@dwillia2-xfh.jf.intel.com.notmuch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 04:57:37 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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. (Thanks for the ping, Joe!) Cheers, Miguel