Re: [PATCH V3 1/1] dt: add of_get_child_count helper function

From: Dong Aisheng
Date: Sun Feb 12 2012 - 01:50:51 EST


On Sun, Feb 12, 2012 at 12:37:46AM +0400, Sergei Shtylyov wrote:
> >diff --git a/include/linux/of.h b/include/linux/of.h
> >index a75a831..ae242ef 100644
> >--- a/include/linux/of.h
> >+++ b/include/linux/of.h
> >@@ -195,6 +195,17 @@ extern struct device_node *of_get_next_child(const struct device_node *node,
> > for (child = of_get_next_child(parent, NULL); child != NULL; \
> > child = of_get_next_child(parent, child))
> >
> >+static inline int of_get_child_count(const struct device_node *np)
> >+{
> >+ struct device_node *child = NULL;
> >+ int num = 0;
> >+
> >+ while ((child = of_get_next_child(np, child)) != NULL)
>
> Doesn't scripts/checkpatch.pl complain here?
>
That complain actually is not caused by this patch.
I have already sent a patch to fix that issue.
But seemed to get a NACK.
Please refer to:
https://lkml.org/lkml/2011/12/20/236

Regards
Dong Aisheng
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/