From: Grant Likely <grant.likely@linaro.org>
To: Stephen Warren <swarren@wwwdotorg.org>,
Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <rob.herring@calxeda.com>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
Pawel Moll <Pawel.Moll@arm.com>,
Ian Campbell <ian.campbell@citrix.com>,
Kumar Gala <galak@kernel.crashing.org>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH V6 1/5] of: move documentation of of_parse_phandle_with_args
Date: Wed, 28 Aug 2013 21:42:56 +0100 [thread overview]
Message-ID: <20130828204257.068393E0B6B@localhost> (raw)
In-Reply-To: <1376515632-12594-1-git-send-email-swarren@wwwdotorg.org>
On Wed, 14 Aug 2013 15:27:08 -0600, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> Commit bd69f73 "of: Create function for counting number of phandles in
> a property" renamed of_parse_phandle_with_args(), and created a wrapper
> function that implemented the original name. However, the documentation
> of the original function was not moved, leaving it apparently documenting
> the newly renamed function.
>
> Move the documentation so that it is adjacent to the function it
> documents.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
Applied, thanks.
g.
> ---
> drivers/of/base.c | 64 +++++++++++++++++++++++++++----------------------------
> 1 file changed, 32 insertions(+), 32 deletions(-)
>
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 1c3c79c..e485489 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -1105,38 +1105,6 @@ struct device_node *of_parse_phandle(const struct device_node *np,
> }
> EXPORT_SYMBOL(of_parse_phandle);
>
> -/**
> - * of_parse_phandle_with_args() - Find a node pointed by phandle in a list
> - * @np: pointer to a device tree node containing a list
> - * @list_name: property name that contains a list
> - * @cells_name: property name that specifies phandles' arguments count
> - * @index: index of a phandle to parse out
> - * @out_args: optional pointer to output arguments structure (will be filled)
> - *
> - * This function is useful to parse lists of phandles and their arguments.
> - * Returns 0 on success and fills out_args, on error returns appropriate
> - * errno value.
> - *
> - * Caller is responsible to call of_node_put() on the returned out_args->node
> - * pointer.
> - *
> - * Example:
> - *
> - * phandle1: node1 {
> - * #list-cells = <2>;
> - * }
> - *
> - * phandle2: node2 {
> - * #list-cells = <1>;
> - * }
> - *
> - * node3 {
> - * list = <&phandle1 1 2 &phandle2 3>;
> - * }
> - *
> - * To get a device_node of the `node2' node you may call this:
> - * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args);
> - */
> static int __of_parse_phandle_with_args(const struct device_node *np,
> const char *list_name,
> const char *cells_name, int index,
> @@ -1239,6 +1207,38 @@ static int __of_parse_phandle_with_args(const struct device_node *np,
> return rc;
> }
>
> +/**
> + * of_parse_phandle_with_args() - Find a node pointed by phandle in a list
> + * @np: pointer to a device tree node containing a list
> + * @list_name: property name that contains a list
> + * @cells_name: property name that specifies phandles' arguments count
> + * @index: index of a phandle to parse out
> + * @out_args: optional pointer to output arguments structure (will be filled)
> + *
> + * This function is useful to parse lists of phandles and their arguments.
> + * Returns 0 on success and fills out_args, on error returns appropriate
> + * errno value.
> + *
> + * Caller is responsible to call of_node_put() on the returned out_args->node
> + * pointer.
> + *
> + * Example:
> + *
> + * phandle1: node1 {
> + * #list-cells = <2>;
> + * }
> + *
> + * phandle2: node2 {
> + * #list-cells = <1>;
> + * }
> + *
> + * node3 {
> + * list = <&phandle1 1 2 &phandle2 3>;
> + * }
> + *
> + * To get a device_node of the `node2' node you may call this:
> + * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args);
> + */
> int of_parse_phandle_with_args(const struct device_node *np, const char *list_name,
> const char *cells_name, int index,
> struct of_phandle_args *out_args)
> --
> 1.8.1.5
>
prev parent reply other threads:[~2013-08-28 20:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 21:27 [PATCH V6 1/5] of: move documentation of of_parse_phandle_with_args Stephen Warren
2013-08-14 21:27 ` [PATCH V6 2/5] of: move of_parse_phandle() Stephen Warren
2013-08-28 19:30 ` Linus Walleij
2013-08-30 20:09 ` Stephen Warren
2013-08-31 0:32 ` Rob Herring
2013-08-28 20:43 ` Grant Likely
2013-08-14 21:27 ` [PATCH V6 3/5] of: introduce of_parse_phandle_with_fixed_args Stephen Warren
2013-08-28 20:44 ` Grant Likely
2013-08-14 21:27 ` [PATCH V6 4/5] of: call __of_parse_phandle_with_args from of_parse_phandle Stephen Warren
2013-08-14 21:27 ` [PATCH V6 5/5] gpio: implement gpio-ranges binding document fix Stephen Warren
2013-08-28 20:47 ` Grant Likely
2013-08-29 7:09 ` Linus Walleij
2013-08-21 17:47 ` [PATCH V6 1/5] of: move documentation of of_parse_phandle_with_args Stephen Warren
2013-08-28 20:42 ` Grant Likely [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130828204257.068393E0B6B@localhost \
--to=grant.likely@linaro.org \
--cc=Pawel.Moll@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@kernel.crashing.org \
--cc=ian.campbell@citrix.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rob.herring@calxeda.com \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).