Re: [PATCH 2/2] of: search the best compatible match first in __of_match_node()

2014-02-17 Thread Kevin Hao
On Mon, Feb 17, 2014 at 05:58:34PM +, Grant Likely wrote: > This seems wrong also. The compatible order should be checked for even > when m->name or m->type are set. You actually need to score the entries > to do this properly. The pseudo-code should look like this: > > uint best_score = ~0;

Re: [PATCH 2/2] of: search the best compatible match first in __of_match_node()

2014-02-17 Thread Grant Likely
On Fri, 14 Feb 2014 09:53:40 -0600, Rob Herring wrote: > On Thu, Feb 13, 2014 at 11:22 PM, Kevin Hao wrote: > > Currently, of_match_node compares each given match against all node's > > compatible strings with of_device_is_compatible. > > > > To achieve multiple compatible strings per node with o

Re: [PATCH 2/2] of: search the best compatible match first in __of_match_node()

2014-02-17 Thread Grant Likely
On Fri, 14 Feb 2014 13:22:46 +0800, Kevin Hao wrote: > Currently, of_match_node compares each given match against all node's > compatible strings with of_device_is_compatible. > > To achieve multiple compatible strings per node with ordering from > specific to generic, this requires given matches

Re: [PATCH 2/2] of: search the best compatible match first in __of_match_node()

2014-02-14 Thread Stephen N Chivers
3 AM > Subject: Re: [PATCH 2/2] of: search the best compatible match first > in __of_match_node() > > On Thu, Feb 13, 2014 at 11:22 PM, Kevin Hao wrote: > > Currently, of_match_node compares each given match against all node's > > compatible strings with of_device_is_comp

Re: [PATCH 2/2] of: search the best compatible match first in __of_match_node()

2014-02-14 Thread Kumar Gala
On Feb 14, 2014, at 9:53 AM, Rob Herring wrote: > On Thu, Feb 13, 2014 at 11:22 PM, Kevin Hao wrote: >> Currently, of_match_node compares each given match against all node's >> compatible strings with of_device_is_compatible. >> >> To achieve multiple compatible strings per node with ordering

Re: [PATCH 2/2] of: search the best compatible match first in __of_match_node()

2014-02-14 Thread Kumar Gala
On Feb 14, 2014, at 9:53 AM, Rob Herring wrote: > On Thu, Feb 13, 2014 at 11:22 PM, Kevin Hao wrote: >> Currently, of_match_node compares each given match against all node's >> compatible strings with of_device_is_compatible. >> >> To achieve multiple compatible strings per node with ordering

Re: [PATCH 2/2] of: search the best compatible match first in __of_match_node()

2014-02-14 Thread Rob Herring
On Thu, Feb 13, 2014 at 11:22 PM, Kevin Hao wrote: > Currently, of_match_node compares each given match against all node's > compatible strings with of_device_is_compatible. > > To achieve multiple compatible strings per node with ordering from > specific to generic, this requires given matches to