From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 1/5] xen: dt: add dt_for_each_irq_map helper Date: Fri, 8 May 2015 11:42:28 +0100 Message-ID: <554C9314.3020500@citrix.com> References: <1429532129.25195.422.camel@citrix.com> <1429532165-19069-1-git-send-email-ian.campbell@citrix.com> <55410945.2050802@citrix.com> <1431080863.2660.424.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431080863.2660.424.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , Julien Grall Cc: vijay.kilari@gmail.com, stefano.stabellini@eu.citrix.com, julien.grall@linaro.org, tim@xen.org, xen-devel@lists.xen.org, Chen Baozi , Suravee Suthikulanit List-Id: xen-devel@lists.xenproject.org On 08/05/15 11:27, Ian Campbell wrote: >>> diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h >>> index 57eb3ee..91bd23a 100644 >>> --- a/xen/include/xen/device_tree.h >>> +++ b/xen/include/xen/device_tree.h >>> @@ -528,6 +528,18 @@ int dt_device_get_raw_irq(const struct dt_device_node *device, >>> int dt_irq_translate(const struct dt_raw_irq *raw, struct dt_irq *out_irq); >>> >>> /** >>> + * dt_for_each_irq_map - Iterate over a nodes interrupt-map property >>> + * @dev: The node whose interrupt-map property should be iterated over >>> + * @cb: Call back to call for each entry >>> + * @data: Caller data passed to callback >>> + */ >>> +int dt_for_each_irq_map(const struct dt_device_node *dev, >>> + int (*cb)(const struct dt_device_node *, >>> + const struct dt_raw_irq *, >>> + void *), >> >> I would add a typedef for the callback. > > It's only used in this one place, so I don't think it's really needed > and the obvious name dt_for_each_irq_map_cb is super clumsy. > > Also you didn't say the same thing to the cb in the next patch ;-). I don't mind you if you don't add a typedef. It was only for avoid duplicating the type everytime. Regards, -- Julien Grall