linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/61] Use strcasecmp() rather than strncasecmp() when determining device node compatibility.
@ 2007-07-18  1:31 Scott Wood
  2007-07-18  1:32 ` [PATCH 02/61] mpc8272ads.dts: Whitespace cleanup Scott Wood
                   ` (62 more replies)
  0 siblings, 63 replies; 129+ messages in thread
From: Scott Wood @ 2007-07-18  1:31 UTC (permalink / raw)
  To: linuxppc-dev

The current code assumes "foo-bar" must always be compatible with a node
compatible with "foo", which breaks device trees where this is not so.

The "case" part is also wrong according to Open Firmware, but it's more
likely to have drivers and/or device trees depending on it, and thus
needs to be handled more carefully.

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 arch/powerpc/kernel/prom.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 37ff99b..0b136a5 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -218,7 +218,7 @@ int __init of_flat_dt_is_compatible(unsigned long node, const char *compat)
 	if (cp == NULL)
 		return 0;
 	while (cplen > 0) {
-		if (strncasecmp(cp, compat, strlen(compat)) == 0)
+		if (strcasecmp(cp, compat) == 0)
 			return 1;
 		l = strlen(cp) + 1;
 		cp += l;
@@ -1099,7 +1099,7 @@ int of_device_is_compatible(const struct device_node *device,
 	if (cp == NULL)
 		return 0;
 	while (cplen > 0) {
-		if (strncasecmp(cp, compat, strlen(compat)) == 0)
+		if (strcasecmp(cp, compat) == 0)
 			return 1;
 		l = strlen(cp) + 1;
 		cp += l;
-- 
1.5.0.3

^ permalink raw reply related	[flat|nested] 129+ messages in thread

end of thread, other threads:[~2007-07-19 20:16 UTC | newest]

Thread overview: 129+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-18  1:31 [PATCH 01/61] Use strcasecmp() rather than strncasecmp() when determining device node compatibility Scott Wood
2007-07-18  1:32 ` [PATCH 02/61] mpc8272ads.dts: Whitespace cleanup Scott Wood
2007-07-18  1:32 ` [PATCH 03/61] Only include linux/ide.h if CONFIG_BLOCK is defined Scott Wood
2007-07-18  4:51   ` Kumar Gala
2007-07-18  1:32 ` [PATCH 04/61] 8xx: Work around CPU15 erratum Scott Wood
2007-07-19 15:01   ` Segher Boessenkool
2007-07-19 15:32     ` Scott Wood
2007-07-18  1:33 ` [PATCH 05/61] bootwrapper: Change cuImage .gitignore entry to cuImage.* Scott Wood
2007-07-18  1:42   ` David Gibson
2007-07-18 16:09     ` Scott Wood
2007-07-19  1:32       ` David Gibson
2007-07-18  1:33 ` [PATCH 06/61] 8xx: Don't call non-existent Soft_emulate_8xx from SoftwareEmulation Scott Wood
2007-07-18  5:05   ` Kumar Gala
2007-07-18 16:22     ` Scott Wood
2007-07-18 18:24       ` Kumar Gala
2007-07-18 19:52         ` Scott Wood
2007-07-18  1:33 ` [PATCH 07/61] bootwrapper: Set timebase_period_ns from dt_fixup_cpu_clocks Scott Wood
2007-07-18  8:17   ` Stephen Rothwell
2007-07-18  1:33 ` [PATCH 08/61] bootwrapper: dt_xlate_range() bugfixes Scott Wood
2007-07-18  1:33 ` [PATCH 09/61] bootwrapper: Add dt_is_compatible() Scott Wood
2007-07-18 16:20   ` Milton Miller
2007-07-18 18:24     ` Scott Wood
2007-07-18  1:33 ` [PATCH 10/61] bootwrapper: flatdevtree fixes Scott Wood
2007-07-18 16:20   ` Milton Miller
2007-07-18  1:33 ` [PATCH 11/61] bootwrapper: Add 16-bit I/O Scott Wood
2007-07-18  1:33 ` [PATCH 12/61] bootwrapper: Add TARGET_HAS_ETHn tests to ppcboot.h Scott Wood
2007-07-18  1:33 ` [PATCH 13/61] bootwrapper: Search the entire compatible list for serial devices Scott Wood
2007-07-18  1:33 ` [PATCH 14/61] bootwrapper: Don't call serial_edit_cmdline if getc isn't defined Scott Wood
2007-07-18  1:33 ` [PATCH 15/61] Declare udelay() in ops.h, and remove declarations in various users Scott Wood
2007-07-18  1:33 ` [PATCH 16/61] bootwrapper: Add CPM serial driver Scott Wood
2007-07-18  1:33 ` [PATCH 17/61] bootwrapper: Add 8xx support Scott Wood
2007-07-18  3:30   ` David Gibson
2007-07-18 16:13     ` Scott Wood
2007-07-19  1:32       ` David Gibson
2007-07-19 15:04         ` Scott Wood
2007-07-18  1:33 ` [PATCH 18/61] bootwrapper: Add PowerQUICC II (82xx with CPM) support Scott Wood
2007-07-18  1:35 ` [PATCH 20/61] Add early debug console for CPM serial ports Scott Wood
2007-07-18  1:35 ` [PATCH 21/61] Minor whitespace (space->tab) fixup in irq.c Scott Wood
2007-07-18  1:35 ` [PATCH 22/61] Rename mpc82xx_ads to mpc8272ads Scott Wood
2007-07-18  3:07   ` Mark Zhan
2007-07-18 16:10     ` Scott Wood
2007-07-18  5:09   ` Kumar Gala
2007-07-18  1:35 ` [PATCH 23/61] Rename mpc82xx_ads_show_cpuinfo to m82xx_show_cpuinfo Scott Wood
2007-07-18  5:20   ` Kumar Gala
2007-07-18  1:35 ` [PATCH 24/61] Change references from 82xx_ADS to 8272ADS Scott Wood
2007-07-18  1:35 ` [PATCH 25/61] Fix off-by-one error in CPM2 setbrg() Scott Wood
2007-07-18  1:35 ` [PATCH 26/61] cpm2: Add SCCs to cpm2_clk_setup() Scott Wood
2007-07-18  1:35 ` [PATCH 27/61] cpm2: Fix whitespace in cpm2_clk_setup() Scott Wood
2007-07-19  0:21   ` Arnd Bergmann
2007-07-18  1:35 ` [PATCH 28/61] Add cpm2_set_pin() Scott Wood
2007-07-18 15:02   ` Kumar Gala
2007-07-18 18:51     ` Scott Wood
2007-07-18  1:35 ` [PATCH 29/61] fsl_soc: Fix get_immrbase() to use ranges, rather than reg Scott Wood
2007-07-18  1:35 ` [PATCH 30/61] fsl_soc: Update the way get_brgfreq() finds things in the device tree Scott Wood
2007-07-18  5:28   ` Kumar Gala
2007-07-18 16:32     ` Scott Wood
2007-07-19 14:55       ` Kumar Gala
2007-07-19 20:16         ` Scott Wood
2007-07-19 15:09       ` Segher Boessenkool
2007-07-18  1:35 ` [PATCH 31/61] mpc8272ads: Check the board in the probe function Scott Wood
2007-07-18  3:31   ` David Gibson
2007-07-18  1:35 ` [PATCH 32/61] mpc82xx: Move PQ2 restart and halt functions out of mpc8272-specific code Scott Wood
2007-07-18  5:31   ` Kumar Gala
2007-07-18 16:33     ` Scott Wood
2007-07-18  1:35 ` [PATCH 33/61] mpc82xx: Remove a bunch of cruft that duplicates generic functionality Scott Wood
2007-07-18  1:35 ` [PATCH 34/61] cpm2: Use the global cpm2_immr rather than ioremapping() all over the place Scott Wood
2007-07-18  1:35 ` [PATCH 35/61] 82xx: Factor PCI PIC out of 8272ads code Scott Wood
2007-07-18  1:35 ` [PATCH 36/61] mpc82xx: Factor PCI init out of mpc8272ads Scott Wood
2007-07-18  1:35 ` [PATCH 37/61] cpm2: Rework 8272ads initialization, and eliminate init_fcc_ioports() Scott Wood
2007-07-19  0:04   ` Arnd Bergmann
2007-07-19  0:14     ` Arnd Bergmann
2007-07-19 15:02     ` Scott Wood
2007-07-18  1:35 ` [PATCH 38/61] cpm2: Update device trees Scott Wood
2007-07-18 12:22   ` Vitaly Bordug
2007-07-18 16:42     ` Scott Wood
2007-07-19 15:04     ` Segher Boessenkool
2007-07-18  1:35 ` [PATCH 39/61] mpc885ads: Whitespace cleanup (space->tab) Scott Wood
2007-07-18  5:38   ` Kumar Gala
2007-07-18  1:35 ` [PATCH 40/61] 8xx: Whitespace cleanup in commproc.c Scott Wood
2007-07-18  1:35 ` [PATCH 41/61] 8xx: Keep a global mpc8xx_immr mapping Scott Wood
2007-07-18  1:35 ` [PATCH 42/61] 8xx: commproc.c: Use better OF names Scott Wood
2007-07-18  1:35 ` [PATCH 43/61] 8xx: Always reset CPM if not using early console Scott Wood
2007-07-18  1:35 ` [PATCH 44/61] 8xx: Miscellaneous commproc.c cleanup Scott Wood
2007-07-18  1:35 ` [PATCH 45/61] 8xx: Add pin and clock setting functions Scott Wood
2007-07-18  1:36 ` [PATCH 46/61] mpc885ads: Rework initialization Scott Wood
2007-07-18  8:44   ` Vitaly Bordug
2007-07-18 16:40     ` Scott Wood
2007-07-18 18:24       ` Vitaly Bordug
2007-07-18 18:29         ` Scott Wood
2007-07-18 19:31         ` Scott Wood
2007-07-18  1:36 ` [PATCH 47/61] 8xx: Don't hardcode the vendor in cpuinfo Scott Wood
2007-07-18  1:36 ` [PATCH 48/61] 8xx: Use better OF names for PIC Scott Wood
2007-07-18  1:36 ` [PATCH 49/61] 8xx: Update device trees Scott Wood
2007-07-19 14:36   ` Segher Boessenkool
2007-07-19 16:57     ` Vitaly Bordug
2007-07-19 17:11       ` Segher Boessenkool
2007-07-19 18:56         ` Scott Wood
2007-07-19 19:04           ` Segher Boessenkool
2007-07-18  1:36 ` [PATCH 50/61] fsl_soc: Remove 8xx/cpm2 glue code Scott Wood
2007-07-18  1:36 ` [PATCH 51/61] cpm_uart: Be an of_platform device when using arch/powerpc Scott Wood
2007-07-18  8:53   ` Vitaly Bordug
2007-07-18 23:59   ` Arnd Bergmann
2007-07-18  1:36 ` [PATCH 52/61] cpm_uart: Issue STOP_TX command before initializing console Scott Wood
2007-07-18  8:00   ` Vitaly Bordug
2007-07-18 16:35     ` Scott Wood
2007-07-18 17:24       ` Vitaly Bordug
2007-07-18  1:36 ` [PATCH 53/61] 82xx: Set NOT_COHERENT_CACHE on 8272 with PCI Scott Wood
2007-07-18  3:28   ` David Gibson
2007-07-18  4:30     ` Kumar Gala
2007-07-18 20:08       ` Scott Wood
2007-07-19 14:58         ` Kumar Gala
2007-07-19 16:36           ` Scott Wood
2007-07-19 14:40   ` Segher Boessenkool
2007-07-18  1:36 ` [PATCH 54/61] Update mpc885ads defconfig Scott Wood
2007-07-18  1:36 ` [PATCH 55/61] Update mpc8272ads defconfig Scott Wood
2007-07-18  1:36 ` [PATCH 56/61] 82xx: Add pq2fads board support Scott Wood
2007-07-18 23:54   ` Arnd Bergmann
2007-07-19 14:59     ` Scott Wood
2007-07-18  1:36 ` [PATCH 57/61] fs_enet: Whitespace cleanup Scott Wood
2007-07-18  1:36 ` [PATCH 58/61] fs_enet: Don't share the interrupt Scott Wood
2007-07-18  1:36 ` [PATCH 59/61] fs_enet: mac-fcc: Eliminate __fcc-* macros Scott Wood
2007-07-18  1:36 ` [PATCH 60/61] fs_enet: Align receive buffers Scott Wood
2007-07-18  1:36 ` [PATCH 61/61] fs_enet: Be an of_platform device when using arch/powerpc Scott Wood
2007-07-18  1:58 ` [PATCH 01/61] Use strcasecmp() rather than strncasecmp() when determining device node compatibility Michael Ellerman
2007-07-18  6:39   ` Geert Uytterhoeven
2007-07-18  4:27 ` Kumar Gala
2007-07-18 16:17   ` Scott Wood
2007-07-18  6:07 ` Stephen Rothwell
2007-07-18 16:29 ` [PATCH 19/61] 8xx: Fix CONFIG_PIN_TLB Scott Wood

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).