From: Mathieu Maret <mathieu.maret@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, arve@android.com,
gregkh@linuxfoundation.org
Subject: Re: [PATCH 2/2] staging: binder: Code simplification
Date: Tue, 25 Mar 2014 23:47:39 +0100 [thread overview]
Message-ID: <20140325224739.GA6448@zebulon> (raw)
In-Reply-To: <1395786108.3726.4.camel@joe-AO722>
Joe Perches wrote:
> On Tue, 2014-03-25 at 23:03 +0100, Mathieu Maret wrote:
> > Remove duplicate code
> []
> > diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
> []
> > @@ -2685,11 +2685,9 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
> > break;
> > case BINDER_VERSION: {
> > struct binder_version __user *ver = ubuf;
> > - if (size != sizeof(struct binder_version)) {
> > - ret = -EINVAL;
> > - goto err;
> > - }
> > - if (put_user(BINDER_CURRENT_PROTOCOL_VERSION,
> > +
> > + if (size != sizeof(struct binder_version) ||
> > + put_user(BINDER_CURRENT_PROTOCOL_VERSION,
> > &ver->protocol_version)) {
>
> When you do this, please align continuations at the appropriate
> open parenthesis using maximal initial tabs and minimal spaces
> for alignment.
>
> if (size != sizeof(struct binder_version) ||
> put_user(BINDER_CURRENT_PROTOCOL_VERSION,
> &ver->protocol_version)) {
>
> 2 tabs then 4 spaces then "put_user"
> 3 tabs then 5 spaces then "&ver->"
>
> using scripts/checkpatch.pl --strict should alert you to this.
>
> And, either don't submit this until after 3.15-rc1 is out
> and Greg KH starts taking patches again, or expect to be
> very patient about getting any update on this.
>
Joe,
Thanks for your help and tips.
--strict is now on my todo list !
See you after 3.15-rc1
prev parent reply other threads:[~2014-03-25 22:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 22:03 [PATCHv2 1/2] staging: binder: add __user annotation in binder.c Mathieu Maret
2014-03-25 22:03 ` [PATCH 2/2] staging: binder: Code simplification Mathieu Maret
2014-03-25 22:21 ` Joe Perches
2014-03-25 22:47 ` Mathieu Maret [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=20140325224739.GA6448@zebulon \
--to=mathieu.maret@gmail.com \
--cc=arve@android.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.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