From: Greg KH <gregkh@linuxfoundation.org>
To: Ajith P V <ajithpv.linux@gmail.com>
Cc: arve@android.com, tkjos@android.com, maco@android.com,
joel@joelfernandes.org, christian@brauner.io, hridya@google.com,
surenb@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] binder: reframe comment to avoid warning
Date: Wed, 24 Nov 2021 10:44:32 +0100 [thread overview]
Message-ID: <YZ4JgD0Xp8a+ch4j@kroah.com> (raw)
In-Reply-To: <20211124093002.9795-1-ajithpv.linux@gmail.com>
On Wed, Nov 24, 2021 at 03:00:02PM +0530, Ajith P V wrote:
> binder.c file comment produce warning with checkpatch as below:
> WARNING: waitqueue_active without comment
>
> Placing the waitqueue_active comment just above waitqueue_active() avoid
> this warning.
>
> Signed-off-by: Ajith P V <ajithpv.linux@gmail.com>
> ---
> drivers/android/binder.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index 49fb74196d02..e1695535f252 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -4424,10 +4424,12 @@ static int binder_thread_release(struct binder_proc *proc,
> /*
> * If this thread used poll, make sure we remove the waitqueue
> * from any epoll data structures holding it with POLLFREE.
> - * waitqueue_active() is safe to use here because we're holding
> - * the inner lock.
> */
> if ((thread->looper & BINDER_LOOPER_STATE_POLL) &&
> + /*
> + * waitqueue_active() is safe to use here because we're holding
> + * the inner lock.
> + */
No, never comment _inside_ a if statement, that is not worth it.
checkpatch is a perl script that provides hints, there is no reason you
have to always follow it exactly. :)
thanks,
greg k-h
prev parent reply other threads:[~2021-11-24 9:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-24 9:30 [PATCH] binder: reframe comment to avoid warning Ajith P V
2021-11-24 9:44 ` Greg KH [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=YZ4JgD0Xp8a+ch4j@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ajithpv.linux@gmail.com \
--cc=arve@android.com \
--cc=christian@brauner.io \
--cc=hridya@google.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maco@android.com \
--cc=surenb@google.com \
--cc=tkjos@android.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.