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

Olof Johansson olof at lixom.net
Wed Jul 4 08:36:12 EST 2007


On Tue, Jul 03, 2007 at 05:15:11PM -0500, Scott Wood wrote:

> 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? 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?

Device trees will never be perfect, 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.

-Olof



More information about the Linuxppc-dev mailing list