Thread (9 messages) flat view 9 messages, 4 authors, 2007-07-04

Re: Should of_device_is_compatible() use strcmp() rather than strncasecmp()?

From: Segher Boessenkool <hidden>
Date: 2007-07-03 22:41:59

quoted
How about a CONFIG_NOT_BROKEN_DEVICE_TREE that disables this and  
other
legacy stuff?  If unset, warnings will be printed whenever broken  
things
are detected.  Boards which need proper device tree parsing can  
select
the config option.

I'd prefer the other way around (CONFIG_BROKEN_DEVICE_TREE), but it'd
need to default y at first, and kconfig has no unselect command  
that I
can see...
What's the value add in doing this?
None.  The kernel should either allow or not allow certain
classes of brokenness; and if it does allow it, it is better
to only allow it in those cases where it expects the brokenness
(i.e., on certain platforms, in this case).
The code to handle both cases still
has to be in there (just under ifdef now). Is there actually any harm
in doing case-insensitive matching today, where things break because
there are conflicting properties with different cases?
There is a big potential harm in not looking at case for the
part of the name before the comma (upper case is stock symbol,
lower case isn't).  An actual real life example?  Dunno, I'm
sure we'll find some if we change to case-sensitive matching.
Device trees will never be perfect,
But the kernel applies workarounds _way_ too generously.  This
is starting to cause more problems than it solves.
and it's idiotic of the kernel to
expect them to be. Even with the dts files, there are several of them
that have errors in them. There will be more in the future as well.
Sure, especially since the kernel allows all kinds of wrong
things and second guesses what is meant.  Sometimes it guesses
right, and then the device tree is shipped, since "it works so
it must be right".


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help