From patchwork Fri May 23 15:19:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 4233631 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2663D9F1CD for ; Fri, 23 May 2014 15:22:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89EEC203AA for ; Fri, 23 May 2014 15:22:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4620203A9 for ; Fri, 23 May 2014 15:22:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WnrH2-0002t3-6Z; Fri, 23 May 2014 15:20:44 +0000 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WnrGy-0002hI-LM for linux-arm-kernel@lists.infradead.org; Fri, 23 May 2014 15:20:41 +0000 Received: by mail-wi0-f172.google.com with SMTP id hi2so1015329wib.11 for ; Fri, 23 May 2014 08:20:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3epu3h3oFAHiwbR+lCTide384iKvLAcYjvmvRfnjASs=; b=ZWZs3p8IlMjo7Xs0HMfGEtw1yulRwdMhOMaS4ZHVvRGySs8rySih/tHOp8to8436Tx fIsSURCe3g2gHMJP6pMSsZZkepPUfpmj90pLhEQ/vrvu0JNqbp8JyLaAvkO4H/t8th3r X17CgnO3LEL3X6MOk6d37XSROtSbSp7po0fjPGhHoUccqyLYeUwscPVOjSjzJoJqDZOd R57zuapAHNDQxgjpiuinsl53qvuHhRmg97lEMHGDEg7/vAFQD0BOJb1sbEy3aEB9RoYr O/HhucOfYdN7avTpIFEpMFMbvo7T2ZBE/BZUCpO9s253rIfqLox14HwsiUKa/RRLNIuV KWlw== X-Gm-Message-State: ALoCoQkCnVRX7fN2QC/s0L6YA9zb1N0wc5Ippl5oS+eQakYEVLKgk7W1RV+dX/Hqmp377wC3kgFp X-Received: by 10.180.93.101 with SMTP id ct5mr3901792wib.23.1400858417303; Fri, 23 May 2014 08:20:17 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id bx2sm4244901wjb.47.2014.05.23.08.20.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 May 2014 08:20:16 -0700 (PDT) From: Leif Lindholm To: linux-efi@vger.kernel.org, matt.fleming@intel.com Subject: [PATCH] efi: arm64: memory node handling cleanup Date: Fri, 23 May 2014 16:19:45 +0100 Message-Id: <1400858385-32079-1-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140523_082040_847198_FAABDBA1 X-CRM114-Status: GOOD ( 10.66 ) X-Spam-Score: -0.7 (/) Cc: mark.rutland@arm.com, roy.franz@linaro.org, linux-arm-kernel@lists.infradead.org, msalter@redhat.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove unused variable, and convert strncmp() to strcmp(), since the former is not available in arm zImage. Signed-off-by: Leif Lindholm --- drivers/firmware/efi/fdt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/efi/fdt.c b/drivers/firmware/efi/fdt.c index 5c6a8e8..ab12870 100644 --- a/drivers/firmware/efi/fdt.c +++ b/drivers/firmware/efi/fdt.c @@ -63,15 +63,14 @@ static efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt, */ prev = 0; for (;;) { - const char *type, *name; - int len; + const char *type; 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; }