From patchwork Fri Sep 13 12:49:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 20026 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4706B20358 for ; Fri, 13 Sep 2013 12:49:43 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id b4sf1188997qen.9 for ; Fri, 13 Sep 2013 05:49:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=YHdN0NuSNtxf+/zcOzGgtqLP7Z6GmIUTGEt4D+jO3Aa+TQKb7khSvvti9xfd972aIj nEHuy0XMBk67O4rquq9NWbbN/mlI4SnLrW+bRBP1i7qc0t+axHS5PS4ketkqpRZHwTHa vWgPVb+69R3su5CQ1LZPrcG/+OSIip81HCGOl38GKRCd/x6OYIwG/Nk2MgCs1jgFNqh5 t74/hm42u6ZpHSmxZNx+ExftDEhZWC4KvasfUWNROgw5noqB6iz0i9hcV7mfgb93Ee+Q yCOVtQWNXUPUud8MnbhzDXZqfC45tMMeRtIgBACOkbhauQzjoqYPW2vVBzh9Fuq6xDI+ LpZA== X-Gm-Message-State: ALoCoQkDa34/BVDNNbIRYRvCMBLviRIjwxZmCts/0nG7d/aVlBiOb8Q77fh7Nt4a9fGxmxn68ncc X-Received: by 10.236.6.134 with SMTP id 6mr5254163yhn.7.1379076582834; Fri, 13 Sep 2013 05:49:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.83 with SMTP id s19ls1163221qeu.7.gmail; Fri, 13 Sep 2013 05:49:42 -0700 (PDT) X-Received: by 10.52.116.74 with SMTP id ju10mr9924586vdb.20.1379076582584; Fri, 13 Sep 2013 05:49:42 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id tj6si3085015vcb.43.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:49:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 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.179; Received: by mail-vc0-f179.google.com with SMTP id ht10so891470vcb.10 for ; Fri, 13 Sep 2013 05:49:42 -0700 (PDT) X-Received: by 10.220.91.16 with SMTP id k16mr7125275vcm.21.1379076582466; Fri, 13 Sep 2013 05:49:42 -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 u4csp78762vcz; Fri, 13 Sep 2013 05:49:41 -0700 (PDT) X-Received: by 10.15.94.201 with SMTP id bb49mr18209639eeb.23.1379076580956; Fri, 13 Sep 2013 05:49:40 -0700 (PDT) Received: from mail-ea0-f180.google.com (mail-ea0-f180.google.com [209.85.215.180]) by mx.google.com with ESMTPS id f46si3776541eeo.249.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:49:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.180 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.215.180; Received: by mail-ea0-f180.google.com with SMTP id h10so544963eaj.25 for ; Fri, 13 Sep 2013 05:49:40 -0700 (PDT) X-Received: by 10.14.224.198 with SMTP id x46mr3112325eep.53.1379076580052; Fri, 13 Sep 2013 05:49:40 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id p5sm14678420eeg.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:49:39 -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 v4 02/27] xen/dts: Prefix device tree macro by dt_ Date: Fri, 13 Sep 2013 13:49:09 +0100 Message-Id: <1379076574-28316-3-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1379076574-28316-1-git-send-email-julien.grall@linaro.org> References: <1379076574-28316-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.179 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) */