Devicetree
 help / color / mirror / Atom feed
From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	michal.simek-g5w7nrANp4BDPfheJLI6IQ@public.gmane.org
Subject: Re: [PATCH] of: Fix comparison of "compatible" properties
Date: Wed, 17 Mar 2010 23:18:47 -0700 (PDT)	[thread overview]
Message-ID: <20100317.231847.112586488.davem@davemloft.net> (raw)
In-Reply-To: <20100318010001.6814.88310.stgit@angua>

From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Date: Wed, 17 Mar 2010 19:01:00 -0600

> Commit 7c7b60cb87547b1664a4385c187f029bf514a737
> "of: put default string compare and #a/s-cell values into common header"
> 
> Breaks various things on powerpc due to using strncasecmp instead of
> strcasecmp for comparing against "compatible" strings.
> 
> This causes things like the 4xx PCI code to fail miserably due to the
> partial matches in code like this:
> 
>        for_each_compatible_node(np, NULL, "ibm,plb-pcix")
>                ppc4xx_probe_pcix_bridge(np);
>        for_each_compatible_node(np, NULL, "ibm,plb-pci")
>                ppc4xx_probe_pci_bridge(np);
> 
> This reverts us to use strcasecmp. I do wonder why microblase and sparc
> want the partial matches though. For sparc it could be historical, but
> microblaze is probably doing the wrong thing so this patch also changes
> the microblaze behaviour to use not allow partial matches.  Michal will
> surely beat me over the head with a cluestick if I'm wrong, in which
> case I'll fix this patch.
> 
> It's not quite right to do partial name match. Entries in a compatible
> list are meant to be matched whole. If a device is compatible with both
> "foo" and "foo1", then the device should have both strings in its
> "compatible" property.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
>       (for patch description)
> Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>

Acked-by: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

  reply	other threads:[~2010-03-18  6:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18  1:01 [PATCH] of: Fix comparison of "compatible" properties Grant Likely
2010-03-18  6:18 ` David Miller [this message]
     [not found]   ` <20100317.231847.112586488.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-03-18  6:25     ` Benjamin Herrenschmidt
2010-03-18  7:49 ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100317.231847.112586488.davem@davemloft.net \
    --to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=michal.simek-g5w7nrANp4BDPfheJLI6IQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox