[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqKgUQZT4g3fgPe-h8G-zWb1gnfxgT20BDrL+zS5u4URzg@mail.gmail.com>
Date: Tue, 26 Nov 2013 11:11:26 -0600
From: Rob Herring <robherring2@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Rob Herring <rob.herring@...xeda.com>,
Grant Likely <grant.likely@...aro.org>,
Andy Whitcroft <apw@...onical.com>
Subject: Re: [PATCH] checkpatch: add DT compatible string documentation check
On Tue, Nov 26, 2013 at 10:43 AM, Joe Perches <joe@...ches.com> wrote:
> On Tue, 2013-11-26 at 10:01 -0600, Rob Herring wrote:
>> From: Rob Herring <rob.herring@...xeda.com>
>
> Hi Rob.
>
>> This adds a simple check that any compatible strings in DeviceTree dts
>> files are present in Documentation/devicetree/bindings. This should be a
>> temporary check until we have more sophisticated binding schema checking.
> []
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
>> @@ -2034,6 +2034,21 @@ sub process {
>> "Use of $flag is deprecated, please use \`$replacement->{$flag} instead.\n" . $herecurr) if ($replacement->{$flag});
>> }
>>
>> +# check for compatible documentation
>> + if ($realfile =~ /\.dts/ && $rawline =~ /\+\s*compatible\s*=/) {
>> + my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,]+)\"/g;
>
> I believe there needs to be a \+\. in the brackets
> for lines like:
>
> arch/c6x/boot/dts/tms320c6678.dtsi: compatible = "ti,c64x+timer64";
I think we don't really want '+' (or '_') in compatible strings. That
would really a check against the documentation versus whether the dts
matches the documentation. So I probably should add a separate check
on use of documented, but deprecated compatible strings. Ideally, that
check would be on the binding doc, but since they are unstructured
currently, we'd have to do it on dts files.
> and
> arch/powerpc/boot/dts/mpc8313erdb.dts: compatible = "fsl,sec2.2", "fsl,sec2.1",
Yes, indeed.
Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists