Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp103876rdg; Tue, 10 Oct 2023 05:38:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrO47wcV17tiJ1jGkaxcYFRFUzsG1ZyASwOP79e4zHyd8aGvGh+zGmkg4B4pK+8MEND4a0 X-Received: by 2002:a17:90b:38b:b0:274:9121:382 with SMTP id ga11-20020a17090b038b00b0027491210382mr21090353pjb.22.1696941492612; Tue, 10 Oct 2023 05:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696941492; cv=none; d=google.com; s=arc-20160816; b=ADzjmvrxJUBKgTHv7oq33MY3FE2OHYOkuywwe3bbXNrKdkhS6Dao05/lOA3B3vM9PU EGnwr/dSfIPrzhl3xlhbdr0U4t+bEEdcZI65X46q2RNn5CVIChAW62Ao9GvbPgJNynXl 9jrUJoiYrMTe/u/2f1pKvizU1aK+hhb8MgCENtL6vzCo828pet/m/6h49b3Jn9ueqUug Dl1TRo0k24N3UgjNsLcjMUci9pn/ZBQRMWvecdF3vpFupMiOwQnHEZ+4EKC1OJaQmtz9 XNQOM0jNwRcWIoUPErxrmEAOhQOul1px02xp3iRXL53UW82A3BnFsMwkweZw8xcqQ8qP QFDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=k4/y4+WqXxPWWY4DJoQqsX6cm/BWdxBdkg8qaOC0znU=; fh=B9OehVzqs9CKf/ekQbaf3vjAiPsgNId4NJkXSq5UH+A=; b=NqLvNKpwPVTQK5R+8RpDg9UmfjI4fRL1h75i58Y9rdixSZmh4u2bGhAvXRF6mR/5nc NT3GEGlyOJMVhPuqhZ8Bx+2396qEPg0SHq01BDhdnxmWZsd43IybcSon/CpSaxuMjZHq 6yNl8x17acvLpsfY2lArT/CnJoSDRLtwmumit6G8QkwzRqG4xh22kAXUjYlinlRMjgQx w8C215rPw+jZL3dTPMsBc4TjxFCwnpCFke6c+bHzOewjwARgFXM6OgEMfAPRkcIvyE0w rgvc3q2ukWIQ4gMl5lspRQ9iqoZfJLjRec0Q4b6Jc52cKTv0ONlJmgdOEZAUzGgQlMmg +ckQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TqKV5e0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id v202-20020a6361d3000000b0059beadab759si1393179pgb.652.2023.10.10.05.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 05:38:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TqKV5e0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 50A42808D6B8; Tue, 10 Oct 2023 05:37:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231633AbjJJMhD (ORCPT + 99 others); Tue, 10 Oct 2023 08:37:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230220AbjJJMhC (ORCPT ); Tue, 10 Oct 2023 08:37:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F357A9; Tue, 10 Oct 2023 05:37:00 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 918CEC433C8; Tue, 10 Oct 2023 12:36:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696941420; bh=uTuZlHTdf11b/WwV6szwYXMNO8RPeQdbA34U8sdyAuE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TqKV5e0KNjGJ3hn18FgW9v5T/cmaP+FpdD5cMOvABX0HHx0kIiQCnfeKpsMIe+dZl iRzynzgQBbprPz0dFk0GRumWi84K+Y8/dOqCHoaS/9n97Jq3BSRCEsbSkOsxF5QiZh fc6TFJWa9H+/5pbdmjlZ85KOKCba3AmyecjG2pgA= Date: Tue, 10 Oct 2023 14:36:57 +0200 From: Greg KH To: Max Kellermann Cc: linux@roeck-us.net, joe@perches.com, Jonathan Corbet , workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] Documentation/process/coding-style.rst: space around const Message-ID: <2023101044-stark-improper-6531@gregkh> References: <20231010122935.999586-1-max.kellermann@ionos.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010122935.999586-1-max.kellermann@ionos.com> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 10 Oct 2023 05:37:12 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 02:29:35PM +0200, Max Kellermann wrote: > There are currently no rules on the placement of "const", but a recent > code submission revealed that there is clearly a preference for spaces > around them. > > checkpatch.pl has no check at all for this; though it does sometimes > complain, but only because it erroneously thinks that the "*" (on > local variables) is an unary dereference operator, not a pointer type. > > Current coding style for const pointers-to-pointers: > > "*const*": 2 occurrences > "* const*": 3 > "*const *": 182 > "* const *": 681 > > Just const pointers: > > "*const": 2833 occurrences > "* const": 16615 > > Changed in v2: removed "volatile" on gregkh's request. > > Link: https://lore.kernel.org/r/264fa39d-aed6-4a54-a085-107997078f8d@roeck-us.net/ > Link: https://lore.kernel.org/r/f511170fe61d7e7214a3a062661cf4103980dad6.camel@perches.com/ > Signed-off-by: Max Kellermann > --- > Documentation/process/coding-style.rst | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst > index 6db37a46d305..71d62d81e506 100644 > --- a/Documentation/process/coding-style.rst > +++ b/Documentation/process/coding-style.rst > @@ -271,6 +271,17 @@ adjacent to the type name. Examples: > unsigned long long memparse(char *ptr, char **retptr); > char *match_strdup(substring_t *s); > > +Use space around the ``const`` keyword (except when adjacent to > +parentheses). Example: > + > +.. code-block:: c > + > + const void *a; > + void * const b; > + void ** const c; > + void * const * const d; > + int strcmp(const char *a, const char *b); > + > Use one space around (on each side of) most binary and ternary operators, > such as any of these:: > > -- > 2.39.2 > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot