From patchwork Wed Aug 28 14:47:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 19570 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f199.google.com (mail-ye0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BC13025E58 for ; Wed, 28 Aug 2013 14:48:14 +0000 (UTC) Received: by mail-ye0-f199.google.com with SMTP id l13sf6486047yen.2 for ; Wed, 28 Aug 2013 07:48:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=00OLTIGe6RYSTQnBgsPWocQgosjswfSHWYVmmTRIx8I=; b=V9zhqJqqAAvMiUYCoC2I2HyYgq4Il3HWDgroV0Drn9el0T3x0suVYUrUWvo1BZVRyk wz/qvMRJxvw2uekgzA4ReXANI/N8i0NGaeHnRIBk+sFiVBKrB90tLo/0AcUP+k9CngmZ 2j1ymMOSm9YgohsykKI1aLlWpGzDDrYtrkQEWHf51ciJw6xXj/xCdcLoIDBXGdi/jJQS 4pa+XnbZAhg/eqs0BFZufJ77v427pUANTFU7KA0ZHGtHj5eemLE4YJSTY+Dt9XfHtlhY uNx3a6ERDH4a3D2lEpaEh6pyRgcFaa2Uh/Bgv8j7zi6+jBcXZbF7HgJ4C+Y6GU+m+6P1 BIhA== X-Received: by 10.236.18.196 with SMTP id l44mr5805406yhl.52.1377701294514; Wed, 28 Aug 2013 07:48:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.104.177 with SMTP id gf17ls436221qeb.4.gmail; Wed, 28 Aug 2013 07:48:14 -0700 (PDT) X-Received: by 10.52.163.234 with SMTP id yl10mr121506vdb.47.1377701294357; Wed, 28 Aug 2013 07:48:14 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id mq14si6609222vcb.56.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 07:48:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so4317365vcb.28 for ; Wed, 28 Aug 2013 07:48:14 -0700 (PDT) X-Gm-Message-State: ALoCoQmpZIj+uCdyF7yu/e7cAytqr6zIdc+Zqo5q0JrnskOzRceV2F989RWgx1u3+LwenD1QVsBj X-Received: by 10.58.171.4 with SMTP id aq4mr1313277vec.26.1377701294206; Wed, 28 Aug 2013 07:48:14 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp359938vcz; Wed, 28 Aug 2013 07:48:13 -0700 (PDT) X-Received: by 10.194.24.168 with SMTP id v8mr20874425wjf.28.1377701293092; Wed, 28 Aug 2013 07:48:13 -0700 (PDT) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by mx.google.com with ESMTPS id fa11si1828326wic.33.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 07:48:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.175 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.212.175; Received: by mail-wi0-f175.google.com with SMTP id hi5so1361048wib.8 for ; Wed, 28 Aug 2013 07:48:12 -0700 (PDT) X-Received: by 10.194.60.73 with SMTP id f9mr2699430wjr.65.1377701292486; Wed, 28 Aug 2013 07:48:12 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id a8sm5590498wie.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 07:48:11 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, andre.przywara@linaro.org, Julien Grall Subject: [PATCH V1 07/29] xen: Use the right string comparison function in device tree Date: Wed, 28 Aug 2013 15:47:21 +0100 Message-Id: <1377701263-3319-8-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1377701263-3319-1-git-send-email-julien.grall@linaro.org> References: <1377701263-3319-1-git-send-email-julien.grall@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When of_node_cmp and of_compat_cmp was introduced in commit fb97eb6 "xen/arm: Create a hierarchical device tree", they were copied from the wrong Linux header. Signed-off-by: Julien Grall Acked-by: Ian Campbell --- xen/common/device_tree.c | 6 +++--- xen/include/xen/device_tree.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index a5abdaa..be592d2 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -144,7 +144,7 @@ bool_t __init device_tree_node_compatible(const void *fdt, int node, return 0; while ( len > 0 ) { - if ( !dt_compat_cmp(prop, match, mlen) ) + if ( !dt_compat_cmp(prop, match) ) return 1; l = strlen(prop) + 1; prop += l; @@ -549,7 +549,7 @@ dt_find_property(const struct dt_device_node *np, for ( pp = np->properties; pp; pp = pp->next ) { - if ( strcmp(pp->name, name) == 0 ) + if ( dt_prop_cmp(pp->name, name) == 0 ) { if ( lenp ) *lenp = pp->length; @@ -594,7 +594,7 @@ bool_t dt_device_is_compatible(const struct dt_device_node *device, return 0; while ( cplen > 0 ) { - if ( dt_compat_cmp(cp, compat, strlen(compat)) == 0 ) + if ( dt_compat_cmp(cp, compat) == 0 ) return 1; l = strlen(cp) + 1; cp += l; diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 69ee0cd..7cbf736 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -229,8 +229,8 @@ extern const struct dt_device_node *dt_interrupt_controller; */ struct dt_device_node * __init dt_find_interrupt_controller(const char *compat); -#define dt_node_cmp(s1, s2) strcmp((s1), (s2)) -#define dt_compat_cmp(s1, s2, l) strnicmp((s1), (s2), l) +#define dt_node_cmp(s1, s2) strcasecmp((s1), (s2)) +#define dt_compat_cmp(s1, s2) strcasecmp((s1), (s2)) /* Default #address and #size cells */ #define DT_ROOT_NODE_ADDR_CELLS_DEFAULT 1