Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp20944ybh; Wed, 11 Mar 2020 19:50:06 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu+VBwWnkhbJiKXKYDr43TGqfYd/BGjzNsscBJzCJf+6LAkvW9JWrBbljlU14fMS/7JkXbf X-Received: by 2002:a05:6830:1f54:: with SMTP id u20mr4763771oth.322.1583981406215; Wed, 11 Mar 2020 19:50:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583981406; cv=none; d=google.com; s=arc-20160816; b=f2qX0TXAnUXBWhgF6V0fnlfMaNmsg6h2ElI4HRhjH3Iy802zKHxPu42rb0PS33u6mb Wcxdt2Ds9vdJjFLXG06u1PCeCxD/QT3N1pZd7UsmBeW9+s39G/3Hwu8gIbhT/xy5Ntz3 BnepctedjoFFst3DdIHhHMos1aMa2ZK40LRaVCcSRI6Wfq22z2Wwd7UASIKrIP+1FIKS HeGAo3Zu7/IPukbQ5m1wUiH84+ShNJDpm1x5aymb+gLApcMSCSSi6UGNktWG+GNyjUy/ dpj/svC5qTKAZWthNVOGGZWFHcU9C0CfIKUu/n4jrUMFzrAEUo8VDdO8QH8eqpJaKzTg kKpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=QLA/ZeP5E+/XKg+thdAk/GAfXLemsbPUzfmLzefR4iU=; b=v3YLyiTO56bvQtRdSyo8/NZHvyALq28qYdM2Css/PCLFhl1nwDgH5go8alsyaGYFF2 olqHbo0nE0BHGoRRfyc0ajzGKXvv6k2V/aa3VbHrH1dawDS1Dehtgs3VWy7iedJ/vFtC l7mO3JQCMJoZ1ol3lIZk16lQbCC9PeGuyB66mOpvOzLU62Rt+XRlIgycPX2j76C9tWn9 ncKZtyfKQHn4QXIYDI4Y6QVs87Aw1FvdkdnuRg7RwLx5emoKZFqx+KdJWEeVz/lVTl40 lIaUQPbSRhGSq2SNBEaIwYoQS0Us7+G6kwlqTto8Pe5Y75228kcMpKTpwCdQ9myGbMbP FkTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=BsqWiVno; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l16si791716oti.106.2020.03.11.19.49.51; Wed, 11 Mar 2020 19:50:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=BsqWiVno; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387656AbgCLCs6 (ORCPT + 99 others); Wed, 11 Mar 2020 22:48:58 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37605 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387486AbgCLCs6 (ORCPT ); Wed, 11 Mar 2020 22:48:58 -0400 Received: by mail-wr1-f65.google.com with SMTP id 6so5459662wre.4 for ; Wed, 11 Mar 2020 19:48:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=QLA/ZeP5E+/XKg+thdAk/GAfXLemsbPUzfmLzefR4iU=; b=BsqWiVnoFjNmsxzp4AMqJLWxCydHypxZEk71wcYFG27kREUTPwDKA+TuKbuksONw83 7BIxQtqhyuhbbvnWcUlW2QTX6z0kA8Uuj3OdRXcEgiZjqcCphd2yCSuKLAe7oRpWri16 ueq6XSYxnckqKM1gfXhDBXGP/9INNfN7En+dQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=QLA/ZeP5E+/XKg+thdAk/GAfXLemsbPUzfmLzefR4iU=; b=KWB0J6hTkaWEs4DAoXFaRdDm0hAFz63lxCuFFAEz85YIW2bX3GpIqG7Q02b+MyGycx uCBY4JrSSKqcAK7zEMW8t+LgolzqYYdxUpDzU/o1/HXaXUdAc7FS4Srvxs0YKPI/hFSB 2tjDaBxsRu3syLmAV5ftslH7U0BAsafd7/BIOnzlvPEuTQ0FlIbpehbGP9/rQC9gtsTl u2uORBOEIJhxNqUN/kiu4b3Lwc74t9J28A0eb2otdctV7pooq4Mr134iKkvf3IlnzISG gXOx9Mwu0UqIFRTfqEGdIkUTQTSnd4NH4KzGaRe8lxg9ioqeAVHU15s86goXhv0rtZTI ga/A== X-Gm-Message-State: ANhLgQ23T8Ieu9pVf94XcWc/BNtj3xQjxbgXKcTOj7g+RrbWzhibKAQT q6dKzLf0cFzDQeYHWMDyQXsoGQ== X-Received: by 2002:adf:8bda:: with SMTP id w26mr7667756wra.126.1583981336263; Wed, 11 Mar 2020 19:48:56 -0700 (PDT) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id 9sm10759451wmx.32.2020.03.11.19.48.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Mar 2020 19:48:55 -0700 (PDT) Subject: Re: [PATCH] checkpatch: always allow C99 SPDX License Identifer comments To: Joe Perches , Andy Whitcroft , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com References: <20200311191128.7896-1-scott.branden@broadcom.com> <2c4b42d1fb0bdb6604a72b2a10d49f9eae4b0ff4.camel@perches.com> From: Scott Branden Message-ID: <7056bd62-4251-f9bb-2b97-15f93a1e7142@broadcom.com> Date: Wed, 11 Mar 2020 19:48:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <2c4b42d1fb0bdb6604a72b2a10d49f9eae4b0ff4.camel@perches.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joe, On 2020-03-11 7:26 p.m., Joe Perches wrote: > On Wed, 2020-03-11 at 12:11 -0700, Scott Branden wrote: >> Always allow C99 comment styles if SPDK-License-Identifier is in comment >> even if C99_COMMENT_TOLERANCE is specified in the --ignore options. > Why is this useful? This is useful because if you run checkpatch with --ignore=C99_COMMENT_TOLERANCE right now it will warn on almost every .c file in the linux kernel due to the decision to use // SPDX-License-Identifier: at the start of every c file With this change checkpatch will stop complaining about this single outlier // in the file and allow you to enforce no other C99 // style comments in the patch. It would have been a lot nicer if /* SPDX-License-Identifier: xxxx */ was used instead... > >> Signed-off-by: Scott Branden >> --- >> scripts/checkpatch.pl | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl >> index a63380c6b0d2..c8b429dd6b51 100755 >> --- a/scripts/checkpatch.pl >> +++ b/scripts/checkpatch.pl >> @@ -3852,8 +3852,8 @@ sub process { >> } >> } >> >> -# no C99 // comments >> - if ($line =~ m{//}) { >> +# no C99 // comments except for SPDX-License-Identifier >> + if ($line =~ m{//} && $rawline !~ /SPDX-License-Identifier:/) { >> if (ERROR("C99_COMMENTS", >> "do not use C99 // comments\n" . $herecurr) && >> $fix) {