From patchwork Fri Jul 18 14:00:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 33858 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EFF4D20CA0 for ; Fri, 18 Jul 2014 14:03:47 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id s7sf9933963qap.2 for ; Fri, 18 Jul 2014 07:03:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=R/6en6OOhoW5lOGkYucAxLDRoVDNO3W+D8yf2v9qUlo=; b=iCyOj2PqXv+H6f2JQekRlJPm1rBTEeLbiJyd/8nzsXbmCG9gaB/9nWfUCyDF2Jhqx6 XXyvkTetNVWnMAKK8bMz/mV1D6TiE8By+YfD8H+BC6GgT8fgc+eOV7zhy3xxAy4MOqUp Nh3AcZMkJDlM+1NGk5l1Eb4HsU4J1n+0LkPvroybfI+U/f/vGGm97FEqIrbzyszAAX7z hVA+jH2sNYiWRAggSeWDV4iG7YEfj5YD+UbVs0PGxDiP4GjOAQHPHWkAhAHoUlny8ku6 mxOehaIiuGgq6YREk/2GqLphjh2402NMWtXDE1gQeNJVKhg3j+tfjVG748NT460DPVQD mNkw== X-Gm-Message-State: ALoCoQnorK8oeKGRjFG1XvsASTpqGkTdqdykA3ECQJaNySLhTQuBniPKcA23yEwmETw1jM5hJl1n X-Received: by 10.236.137.13 with SMTP id x13mr2194757yhi.32.1405692227596; Fri, 18 Jul 2014 07:03:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.166 with SMTP id d35ls956631qge.3.gmail; Fri, 18 Jul 2014 07:03:47 -0700 (PDT) X-Received: by 10.220.68.83 with SMTP id u19mr6158632vci.52.1405692227514; Fri, 18 Jul 2014 07:03:47 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id xv9si5785833vdb.0.2014.07.18.07.03.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 07:03:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so5939037vcb.30 for ; Fri, 18 Jul 2014 07:03:47 -0700 (PDT) X-Received: by 10.221.34.13 with SMTP id sq13mr6327261vcb.16.1405692227361; Fri, 18 Jul 2014 07:03:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp13850vcb; Fri, 18 Jul 2014 07:03:46 -0700 (PDT) X-Received: by 10.66.173.144 with SMTP id bk16mr5475209pac.34.1405692226306; Fri, 18 Jul 2014 07:03:46 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id lk6si6066117pab.166.2014.07.18.07.03.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 07:03:46 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1X88jq-0005na-IC; Fri, 18 Jul 2014 14:02:18 +0000 Received: from mail-wg0-f41.google.com ([74.125.82.41]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X88ix-0004zk-Iv for linux-arm-kernel@lists.infradead.org; Fri, 18 Jul 2014 14:01:24 +0000 Received: by mail-wg0-f41.google.com with SMTP id z12so3598662wgg.24 for ; Fri, 18 Jul 2014 07:00:59 -0700 (PDT) X-Received: by 10.194.59.49 with SMTP id w17mr6630657wjq.135.1405692059705; Fri, 18 Jul 2014 07:00:59 -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 ft17sm14465308wjc.14.2014.07.18.07.00.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 07:00:59 -0700 (PDT) From: Leif Lindholm To: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, linux@arm.linux.org.uk Subject: [PATCH 5/7] arm: efi: use strcmp instead of strncmp for fdt parsing Date: Fri, 18 Jul 2014 15:00:51 +0100 Message-Id: <1405692053-7514-6-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1405692053-7514-1-git-send-email-leif.lindholm@linaro.org> References: <1405692053-7514-1-git-send-email-leif.lindholm@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140718_070123_813860_21A6CCF1 X-CRM114-Status: GOOD ( 11.54 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.41 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.41 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: roy.franz@linaro.org, matt.fleming@intel.com, ard.biesheuvel@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 --- 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; }