From: Paul Mackerras <paulus@samba.org>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Should of_device_is_compatible() use strcmp() rather than strncasecmp()?
Date: Wed, 4 Jul 2007 13:28:27 +1000 [thread overview]
Message-ID: <18059.5083.741194.497123@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <468ABF4A.60001@freescale.com>
Scott Wood writes:
> Is there any particular reason that of_device_is_compatible uses
> strncasecmp()? Besides the OF spec saying that names (and thus
> compatibles) are case sensitive, the "n" part screws up matching when a
> subset of a string is not a more generic version thereof. For example,
> ucc_geth v. ucc_geth_phy, or fsl,cpm v. fsl,cpm-enet.
>
> Does anything actually rely on this behavior?
Things did in the past rely on the case-insensitive comparison but
probably don't any more. I recall an issue with "ata" vs. "ATA" on
the powerbook 3400.
As for the "n" part, I don't recall exactly why that was done. I
think we should change it to use strcmp and fix any drivers that
break.
Paul.
next prev parent reply other threads:[~2007-07-04 3:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-03 21:27 Should of_device_is_compatible() use strcmp() rather than strncasecmp()? Scott Wood
2007-07-03 21:54 ` Segher Boessenkool
2007-07-03 22:15 ` Scott Wood
2007-07-03 22:36 ` Olof Johansson
2007-07-03 22:33 ` Scott Wood
2007-07-03 22:52 ` Segher Boessenkool
2007-07-03 22:41 ` Segher Boessenkool
2007-07-04 3:28 ` Paul Mackerras [this message]
2007-07-04 12:09 ` Segher Boessenkool
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=18059.5083.741194.497123@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.com \
/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;
as well as URLs for NNTP newsgroup(s).