From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7A4A12C0359 for ; Sat, 15 Feb 2014 03:28:11 +1100 (EST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: [PATCH 2/2] of: search the best compatible match first in __of_match_node() From: Kumar Gala In-Reply-To: Date: Fri, 14 Feb 2014 10:23:42 -0600 Message-Id: References: <1392355366-1445-1-git-send-email-haokexin@gmail.com> <1392355366-1445-3-git-send-email-haokexin@gmail.com> To: Rob Herring Cc: "devicetree@vger.kernel.org" , Kevin Hao , Stephen N Chivers , Rob Herring , Grant Likely , linuxppc-dev , Sebastian Hesselbarth List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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. >>=20 >> To achieve multiple compatible strings per node with ordering from >> specific to generic, this requires given matches to be ordered from >> specific to generic. For most of the drivers this is not true and = also >> an alphabetical ordering is more sane there. >>=20 >> Therefore, this patch introduces a function to match each of the = node's >> compatible strings against all given compatible matches without type = and >> name first, before checking the next compatible string. This implies >> that node's compatibles are ordered from specific to generic while >> given matches can be in any order. If we fail to find such a match >> entry, then fall-back to the old method in order to keep = compatibility. >>=20 >> Cc: Sebastian Hesselbarth >> Signed-off-by: Kevin Hao >=20 > Looks good to me. I'll put this in next for a few days. I'd really > like to see some acks and tested-by's before sending to Linus. >=20 > We could be a bit more strict here and fallback to the old matching if > the match table has any entries with name or type. I don't think that > should be necessary though. >=20 > Rob >=20 Can you push the revert to Linus sooner, since currently a ton of boards = wouldn=92t be working on the PPC side, so at least -rc3 has the = possibility of working for them. - k