Re: [PATCH 3/3] checks: Check node and property names are less than 32 characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



+devicetree-spec

On Sun, Jun 17, 2018 at 5:47 AM, David Gibson
<david@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, Jun 15, 2018 at 03:37:16PM -0600, Rob Herring wrote:
>> According to the DT Spec (and ePAPR), node and property names should be
>> 1-31 characters.
>>
>> Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
>
> I don't think this is a good idea.
>
>> ---
>> Surprisingly, there aren't just a ton of warnings introduced with this.
>> I'm not really sure where the 31 character limit came from. Maybe it
>> should be increased rather than trying to fix any long names. Either
>> way, we should have a check if there's a spec'ed limit.
>
> The 31 character limit comes from IEEE 1275.  But.. even long before
> flattened trees, device trees from both IBM and Apple frequently
> violated it.  I think we should probably just ditch this limitation
> from the spec.

Having no limit means names are only limited by variable constraints
of the cpu or OS/client and there's no way for the OS to know what the
max is. In reality, we don't need *anywhere* close to what would be a
maximum string length of a client. Do we really want it undefined in
the spec? Don't know about IBM and Apple DTs, but just doubling the
limit would eliminate all the warnings of the dts files in the kernel.

Even if it is not a spec limit, I think there should be a style or
best practice limit. We already have that type of check for the
character set, so why not the length?

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux