[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqL4ZztUvSevr4Co55n6w10TZaydGDyp4HJxHszFNvkVxw@mail.gmail.com>
Date: Thu, 23 Feb 2017 12:45:05 -0600
From: Rob Herring <robh@...nel.org>
To: Joe Perches <joe@...ches.com>
Cc: "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Andy Whitcroft <apw@...onical.com>
Subject: Re: [PATCH] checkpatch.pl: Add SPDX license tag check for dts files
and headers
On Thu, Feb 23, 2017 at 11:51 AM, Joe Perches <joe@...ches.com> wrote:
> On Thu, 2017-02-23 at 09:56 -0600, Rob Herring wrote:
>> Add a check for using SPDX-License-Identifier tags to define the license of
>> .dts{i} and DT header files rather than using free form license text. This
>> check looks for GPL, BSD, or X11(really incorrectly labeled MIT license)
>> license text which are the commonly used DT licenses.
>
> Hi Rob.
>
>> Signed-off-by: Rob Herring <robh@...nel.org>
>> Cc: Andy Whitcroft <apw@...onical.com>
>> Cc: Joe Perches <joe@...ches.com>
>> ---
>> scripts/checkpatch.pl | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 982c52ca6473..ce802b3146e3 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -2139,6 +2139,7 @@ sub process {
>> my $commit_log_has_diff = 0;
>> my $reported_maintainer_file = 0;
>> my $non_utf8_charset = 0;
>> + my $licensefile = '';
>
> Maybe this should be $spdx_license_file
> but what's the actual reason to check if
> multiple license bits are in a single file?
Yes, just to get a single warning per file since the license matching
can get multiple hits.
Really what I'd like to do is warn if an SPDX tag is not present in
any added file. Having a check for something missing doesn't really
work well with checkpatch at least in a scalable way that I saw.
Rob
Powered by blists - more mailing lists