From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Federico Vaga <federico.vaga@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] base/core.c: improve comment of the function device_find_child()
Date: Fri, 12 Apr 2013 14:51:25 -0700 [thread overview]
Message-ID: <20130412215125.GA16042@kroah.com> (raw)
In-Reply-To: <1365767972-23727-1-git-send-email-federico.vaga@gmail.com>
On Fri, Apr 12, 2013 at 01:59:32PM +0200, Federico Vaga wrote:
> Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
> ---
> drivers/base/core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 016312437..eb0c6ea 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -1372,6 +1372,10 @@ int device_for_each_child(struct device *parent, void *data,
> * if it does. If the callback returns non-zero and a reference to the
> * current device can be obtained, this function will return to the caller
> * and not iterate over any more devices.
> + *
> + * NOTE: internally, the function does get_device() on the retrieved child.
> + * It is duty of the caller performing a put_device() on the retrieved
> + * child device when the caller finishes to work on it.
> */
Why not just use the same wording that class_find_device() has, which is
simpler and easier to understand (IMHO)?
thanks,
greg k-h
next prev parent reply other threads:[~2013-04-12 21:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 11:59 [PATCH] base/core.c: improve comment of the function device_find_child() Federico Vaga
2013-04-12 21:51 ` Greg Kroah-Hartman [this message]
2013-04-15 8:32 ` Federico Vaga
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=20130412215125.GA16042@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=federico.vaga@gmail.com \
--cc=linux-kernel@vger.kernel.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