lkml.org 
[lkml]   [2014]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] staging: binder: Code simplification
From
Date
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.



\
 
 \ /
  Last update: 2014-03-25 23:41    [W:0.047 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site