From patchwork Tue Sep 10 14:48:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 19904 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0928625E85 for ; Tue, 10 Sep 2013 14:49:27 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id 6sf9362790qea.3 for ; Tue, 10 Sep 2013 07:49:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; 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=xjMtWMPmzJfClVAOgw6gMY+/tIwUFU5Rcx3T6tinCDg=; b=Aavavn/x6abaVFoNBiv8hveAtr4ykIhWU9ziEFcn28hoVx0GzcKh5pq8itkmCgYu1w 7n5P+J9VX738v6buxlbrDr55AJSKs3OQg6/H1Bczv5Ha4lPJ1Z58FUzO8YN5YsTZHQ4Y 0u/r6GlV1JL1mOIz325l3KWBViWH4P9WcEhrRpytKzG03cEgd8vrD+K4bwnN3Ff2jafl 9sQjF6XE5i3PaE3RcSKBVk1qJsN2DjsLr3jeyAnWiV9JPITaz/YsMGhRPrO4MbUhhVVP coz7hXg9RWEs3XqVR+S4zRueGwhhpukt9jQZ0NTZMKY4KchFiJocNBS2fZ5HegpwA9Cy K2Jw== X-Received: by 10.236.138.108 with SMTP id z72mr871103yhi.18.1378824566833; Tue, 10 Sep 2013 07:49:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.3.169 with SMTP id d9ls2416839qed.61.gmail; Tue, 10 Sep 2013 07:49:26 -0700 (PDT) X-Received: by 10.58.73.202 with SMTP id n10mr23403375vev.7.1378824566588; Tue, 10 Sep 2013 07:49:26 -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 o5si4504136vdw.154.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:26 -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 ib11so5273978vcb.0 for ; Tue, 10 Sep 2013 07:49:26 -0700 (PDT) X-Gm-Message-State: ALoCoQmEPrxYUIznA2+ZVJ2sojoRbAFoCM8AVa3RlvvzvjlNQml9lwF44JzooD+Hyj1+cYwTHTR6 X-Received: by 10.52.122.68 with SMTP id lq4mr10650787vdb.21.1378824566452; Tue, 10 Sep 2013 07:49:26 -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 u4csp4646vcz; Tue, 10 Sep 2013 07:49:25 -0700 (PDT) X-Received: by 10.15.48.197 with SMTP id h45mr39820361eew.0.1378824564062; Tue, 10 Sep 2013 07:49:24 -0700 (PDT) Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by mx.google.com with ESMTPS id l4si15290473eew.251.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:24 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.50 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.83.50; Received: by mail-ee0-f50.google.com with SMTP id d51so3951683eek.37 for ; Tue, 10 Sep 2013 07:49:22 -0700 (PDT) X-Received: by 10.14.183.2 with SMTP id p2mr13718230eem.44.1378824562769; Tue, 10 Sep 2013 07:49:22 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id i1sm31911644eeg.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:22 -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 v3 02/27] xen/dts: Prefix device tree macro by dt_ Date: Tue, 10 Sep 2013 15:48:50 +0100 Message-Id: <1378824555-16564-3-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1378824555-16564-1-git-send-email-julien.grall@linaro.org> References: <1378824555-16564-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: , There is 2 macros: for_each_device_node and for_each_property_of_node with a too generic name. Also replace all call-site with the new function names. Signed-off-by: Julien Grall --- xen/common/device_tree.c | 10 +++++----- xen/include/xen/device_tree.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index a5abdaa..2c2dc52 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -624,7 +624,7 @@ struct dt_device_node *dt_find_node_by_name(struct dt_device_node *from, struct dt_device_node *dt; dt = from ? from->allnext : dt_host; - for_each_device_node(dt, np) + dt_for_each_device_node(dt, np) if ( np->name && (dt_node_cmp(np->name, name) == 0) ) break; @@ -635,7 +635,7 @@ struct dt_device_node *dt_find_node_by_path(const char *path) { struct dt_device_node *np; - for_each_device_node(dt_host, np) + dt_for_each_device_node(dt_host, np) if ( np->full_name && (dt_node_cmp(np->full_name, path) == 0) ) break; @@ -672,7 +672,7 @@ dt_find_compatible_node(struct dt_device_node *from, struct dt_device_node *dt; dt = from ? from->allnext : dt_host; - for_each_device_node(dt, np) + dt_for_each_device_node(dt, np) { if ( type && !(np->type && (dt_node_cmp(np->type, type) == 0)) ) @@ -1009,7 +1009,7 @@ static const struct dt_device_node *dt_find_node_by_phandle(dt_phandle handle) { const struct dt_device_node *np; - for_each_device_node(dt_host, np) + dt_for_each_device_node(dt_host, np) if ( np->phandle == handle ) break; @@ -1679,7 +1679,7 @@ static void __init dt_alias_scan(void) if ( !aliases ) return; - for_each_property_of_node( aliases, pp ) + dt_for_each_property_node( aliases, pp ) { const char *start = pp->name; const char *end = start + strlen(start); diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 2e5564e..ca8371e 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -236,10 +236,10 @@ struct dt_device_node * __init dt_find_interrupt_controller(const char *compat); #define DT_ROOT_NODE_ADDR_CELLS_DEFAULT 2 #define DT_ROOT_NODE_SIZE_CELLS_DEFAULT 1 -#define for_each_property_of_node(dn, pp) \ +#define dt_for_each_property_node(dn, pp) \ for ( pp = dn->properties; pp != NULL; pp = pp->next ) -#define for_each_device_node(dt, dn) \ +#define dt_for_each_device_node(dt, dn) \ for ( dn = dt; dn != NULL; dn = dn->allnext ) /* Helper to read a big number; size is in cells (not bytes) */