linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: leif.lindholm@linaro.org (Leif Lindholm)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/7] arm: efi: use strcmp instead of strncmp for fdt parsing
Date: Fri, 18 Jul 2014 15:00:51 +0100	[thread overview]
Message-ID: <1405692053-7514-6-git-send-email-leif.lindholm@linaro.org> (raw)
In-Reply-To: <1405692053-7514-1-git-send-email-leif.lindholm@linaro.org>

The existing shared EFI arm/arm64 stub code uses strncmp when parsing
the device tree. Since this function is missing from arm zImage, use
strcmp instead, rather than growing the zImage further.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---
 drivers/firmware/efi/libstub/fdt.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/efi/libstub/fdt.c b/drivers/firmware/efi/libstub/fdt.c
index a56bb35..399374b 100644
--- a/drivers/firmware/efi/libstub/fdt.c
+++ b/drivers/firmware/efi/libstub/fdt.c
@@ -58,14 +58,13 @@ efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt,
 	prev = 0;
 	for (;;) {
 		const char *type;
-		int len;
 
 		node = fdt_next_node(fdt, prev, NULL);
 		if (node < 0)
 			break;
 
-		type = fdt_getprop(fdt, node, "device_type", &len);
-		if (type && strncmp(type, "memory", len) == 0) {
+		type = fdt_getprop(fdt, node, "device_type", NULL);
+		if (type && strcmp(type, "memory") == 0) {
 			fdt_del_node(fdt, node);
 			continue;
 		}
-- 
1.7.10.4

  parent reply	other threads:[~2014-07-18 14:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18 14:00 [PATCH 0/7] arm: add UEFI support Leif Lindholm
2014-07-18 14:00 ` [PATCH 1/7] arm: break part of __soft_restart out into separate function Leif Lindholm
2014-07-18 14:00 ` [PATCH 2/7] arm: add new asm macro update_sctlr Leif Lindholm
2014-07-18 14:00 ` [PATCH 3/7] arm: add strstr to compressed string.c Leif Lindholm
2014-07-18 14:00 ` [PATCH 4/7] arm: Disable stack protection for decompressor/stub Leif Lindholm
2014-07-18 14:00 ` Leif Lindholm [this message]
2014-07-18 14:00 ` [PATCH 6/7] arm: add [U]EFI support Leif Lindholm
2014-07-18 14:00 ` [PATCH 7/7] init: efi: arm: enable (U)EFI runtime services on arm Leif Lindholm

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=1405692053-7514-6-git-send-email-leif.lindholm@linaro.org \
    --to=leif.lindholm@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).