[OPW,kernel] Coding style requires that lines should not be over 80 characters.
diff mbox

Message ID 20131014222039.GA16799@daenerys
State Changes Requested
Headers show

Commit Message

Melita Mihaljevic Oct. 14, 2013, 10:20 p.m. UTC
Coding style requires that lines should not be over 80 characters. Split
line so that it dits coding style

Signed-off-by: Melita Mihaljevic <melita.mihaljevic@gmail.com>
---
 drivers/staging/android/binder.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Sarah Sharp Oct. 28, 2013, 10 p.m. UTC | #1
Hi Melita,

Thanks for sending this patch!  Sorry for taking so long to reply to it.
Many mentors have been out at conferences.

First, please make sure the driver prefix is in the subject line.  The
standard subject line is:

<subsystem>: <driver>: <description>

In this case, your subject line should be something like:

Staging: binder: Shorten lines to 80 chars.

More comments below.

On Mon, Oct 14, 2013 at 03:20:39PM -0700, Melita Mihaljevic wrote:
> Coding style requires that lines should not be over 80 characters. Split
> line so that it dits coding style
> 
> Signed-off-by: Melita Mihaljevic <melita.mihaljevic@gmail.com>
> ---
>  drivers/staging/android/binder.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
> index eaec1da..ea546a48 100644
> --- a/drivers/staging/android/binder.c
> +++ b/drivers/staging/android/binder.c
> @@ -1190,8 +1190,9 @@ static void binder_send_failed_reply(struct binder_transaction *t,
>  			if (target_thread->return_error == BR_OK) {
>  				binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
>  					     "send failed reply for transaction %d to %d:%d\n",
> -					      t->debug_id, target_thread->proc->pid,
> -					      target_thread->pid);
> +						t->debug_id,
> +						target_thread->proc->pid,
> +						target_thread->pid);

This patch is actually doing two things.  You change the indentation as
well as fixing the line length.

Driver writers often differ on how they indent subsequent lines after
the start of a function call.  Some driver writers want lines to be
indented with tabs only.  Other driver writers want subsequent lines to
line up with the paranethesis in the function call, and thus they use
tabs followed by spaces.  In general, it's best to stick with whatever
indentation style is already present in the driver.

So, can you redo this patch with a new subject line, and don't change
the indentation of the file?

Thanks,
Sarah Sharp
Melita Mihaljevic Oct. 28, 2013, 10:14 p.m. UTC | #2
Hi Sarah,
thank you for your comments, I will change my patch according to your
advice.
Thanks a lot!

Melita


On Mon, Oct 28, 2013 at 3:00 PM, Sarah Sharp <sarah.a.sharp@intel.com>wrote:

> Hi Melita,
>
> Thanks for sending this patch!  Sorry for taking so long to reply to it.
> Many mentors have been out at conferences.
>
> First, please make sure the driver prefix is in the subject line.  The
> standard subject line is:
>
> <subsystem>: <driver>: <description>
>
> In this case, your subject line should be something like:
>
> Staging: binder: Shorten lines to 80 chars.
>
> More comments below.
>
> On Mon, Oct 14, 2013 at 03:20:39PM -0700, Melita Mihaljevic wrote:
> > Coding style requires that lines should not be over 80 characters. Split
> > line so that it dits coding style
> >
> > Signed-off-by: Melita Mihaljevic <melita.mihaljevic@gmail.com>
> > ---
> >  drivers/staging/android/binder.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/android/binder.c
> b/drivers/staging/android/binder.c
> > index eaec1da..ea546a48 100644
> > --- a/drivers/staging/android/binder.c
> > +++ b/drivers/staging/android/binder.c
> > @@ -1190,8 +1190,9 @@ static void binder_send_failed_reply(struct
> binder_transaction *t,
> >                       if (target_thread->return_error == BR_OK) {
> >
> binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
> >                                            "send failed reply for
> transaction %d to %d:%d\n",
> > -                                           t->debug_id,
> target_thread->proc->pid,
> > -                                           target_thread->pid);
> > +                                             t->debug_id,
> > +                                             target_thread->proc->pid,
> > +                                             target_thread->pid);
>
> This patch is actually doing two things.  You change the indentation as
> well as fixing the line length.
>
> Driver writers often differ on how they indent subsequent lines after
> the start of a function call.  Some driver writers want lines to be
> indented with tabs only.  Other driver writers want subsequent lines to
> line up with the paranethesis in the function call, and thus they use
> tabs followed by spaces.  In general, it's best to stick with whatever
> indentation style is already present in the driver.
>
> So, can you redo this patch with a new subject line, and don't change
> the indentation of the file?
>
> Thanks,
> Sarah Sharp
>

Patch
diff mbox

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index eaec1da..ea546a48 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1190,8 +1190,9 @@  static void binder_send_failed_reply(struct binder_transaction *t,
 			if (target_thread->return_error == BR_OK) {
 				binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
 					     "send failed reply for transaction %d to %d:%d\n",
-					      t->debug_id, target_thread->proc->pid,
-					      target_thread->pid);
+						t->debug_id,
+						target_thread->proc->pid,
+						target_thread->pid);
 
 				binder_pop_transaction(target_thread, t);
 				target_thread->return_error = error_code;