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

Re: [Xen-devel] [PATCH 09/10] xen: arm: Drop device_tree_node_compatible



On Wed, 18 Jun 2014, Julien Grall wrote:
> On 06/18/2014 03:47 PM, Ian Campbell wrote:
> > On Wed, 2014-06-18 at 15:43 +0100, Stefano Stabellini wrote:
> >> On Mon, 16 Jun 2014, Ian Campbell wrote:
> >>> Instead use fdt_node_check_compatible from libfdt.
> >>
> >> Unfortunately the two functions are not equivalent:
> >> fdt_node_check_compatible uses memcmp while device_tree_node_compatible
> >> uses strcasecmp that ignores cases.
> > 
> > I hadn't spotted this.
> > 
> > They can't both be spec complaint I think. I expect
> > fdt_node_check_compatible (from libfdt) is more likely to be the one
> > which is correct.
> 
> In dt_device_is_compatible we use strcasecmp as Linux does.
> 
> For Linux, it looks like the use a less restrictive way in generic code
> (i.e strcasecmp) and more restrictive on SPARC (i.e strcmp)
> 
> I can't find anything in the spec to say which one is better. But I
> think we want to stay compatible with Linux we have to keep
> device_tree_node_compatible and use it in place of
> fdt_node_check_compatible.
> 
> We could also modify the latter function for our convenience.

Who wants to open Pandora's box and send an email to the LKML?

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.