All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: xgifb: move AND operator for logical continuation
@ 2016-09-13 15:50 Gargi Sharma
  2016-09-13 15:57 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Gargi Sharma @ 2016-09-13 15:50 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: arnaud.patard, gregkh, Gargi Sharma

Fixes the checkpatch issue Logical continuations should be on the
previous line.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
 drivers/staging/xgifb/vb_setmode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 50c8ea4..ac27b2c 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -1741,8 +1741,8 @@ static void XGI_SetCRT2ECLK(unsigned short ModeIdIndex,
 	for (i = 0; i < 4; i++) {
 		xgifb_reg_and_or(pVBInfo->P3d4, 0x31, ~0x30,
 				(unsigned short) (0x10 * i));
-		if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA))
-				&& (!(pVBInfo->VBInfo & SetInSlaveMode))) {
+		if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) &&
+				(!(pVBInfo->VBInfo & SetInSlaveMode))) {
 			xgifb_reg_set(pVBInfo->P3c4, 0x2e, di_0);
 			xgifb_reg_set(pVBInfo->P3c4, 0x2f, di_1);
 		} else {
-- 
2.9.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: xgifb: move AND operator for logical continuation
  2016-09-13 15:50 [PATCH] staging: xgifb: move AND operator for logical continuation Gargi Sharma
@ 2016-09-13 15:57 ` Julia Lawall
  2016-09-13 16:09   ` Gargi Sharma
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2016-09-13 15:57 UTC (permalink / raw)
  To: Gargi Sharma; +Cc: outreachy-kernel, arnaud.patard, gregkh



On Tue, 13 Sep 2016, Gargi Sharma wrote:

> Fixes the checkpatch issue Logical continuations should be on the
> previous line.
>
> Signed-off-by: Gargi Sharma <gs051095@gmail.com>
> ---
>  drivers/staging/xgifb/vb_setmode.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
> index 50c8ea4..ac27b2c 100644
> --- a/drivers/staging/xgifb/vb_setmode.c
> +++ b/drivers/staging/xgifb/vb_setmode.c
> @@ -1741,8 +1741,8 @@ static void XGI_SetCRT2ECLK(unsigned short ModeIdIndex,
>  	for (i = 0; i < 4; i++) {
>  		xgifb_reg_and_or(pVBInfo->P3d4, 0x31, ~0x30,
>  				(unsigned short) (0x10 * i));
> -		if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA))
> -				&& (!(pVBInfo->VBInfo & SetInSlaveMode))) {
> +		if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) &&
> +				(!(pVBInfo->VBInfo & SetInSlaveMode))) {

It's another issue, but all of those parentheses are rather tiring to look
at.  The ones outside the ! are not needed.  The indentation is also a bit
much.  There is no need for the argument of && to be aligned with the
third argument of xgifb_reg_and_or.  At least drop one tab, or even align
the two ! expressions.  The space is also not needed after (unsigned
short) in the line above.  This should be done in a series, with one patch
per change.

julia

>  			xgifb_reg_set(pVBInfo->P3c4, 0x2e, di_0);
>  			xgifb_reg_set(pVBInfo->P3c4, 0x2f, di_1);
>  		} else {
> --
> 2.9.2
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160913155037.12206-1-gs051095%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: xgifb: move AND operator for logical continuation
  2016-09-13 15:57 ` [Outreachy kernel] " Julia Lawall
@ 2016-09-13 16:09   ` Gargi Sharma
  2016-09-13 16:10     ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Gargi Sharma @ 2016-09-13 16:09 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel, arnaud.patard, gregkh

[-- Attachment #1: Type: text/plain, Size: 2490 bytes --]

Hi

On Tue, Sep 13, 2016 at 9:27 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
>
> On Tue, 13 Sep 2016, Gargi Sharma wrote:
>
> > Fixes the checkpatch issue Logical continuations should be on the
> > previous line.
> >
> > Signed-off-by: Gargi Sharma <gs051095@gmail.com>
> > ---
> >  drivers/staging/xgifb/vb_setmode.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/xgifb/vb_setmode.c
b/drivers/staging/xgifb/vb_setmode.c
> > index 50c8ea4..ac27b2c 100644
> > --- a/drivers/staging/xgifb/vb_setmode.c
> > +++ b/drivers/staging/xgifb/vb_setmode.c
> > @@ -1741,8 +1741,8 @@ static void XGI_SetCRT2ECLK(unsigned short
ModeIdIndex,
> >       for (i = 0; i < 4; i++) {
> >               xgifb_reg_and_or(pVBInfo->P3d4, 0x31, ~0x30,
> >                               (unsigned short) (0x10 * i));
> > -             if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA))
> > -                             && (!(pVBInfo->VBInfo & SetInSlaveMode)))
{
> > +             if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) &&
> > +                             (!(pVBInfo->VBInfo & SetInSlaveMode))) {
>
> It's another issue, but all of those parentheses are rather tiring to look
> at.  The ones outside the ! are not needed.  The indentation is also a bit
> much.  There is no need for the argument of && to be aligned with the
> third argument of xgifb_reg_and_or.  At least drop one tab, or even align
> the two ! expressions.
>The space is also not needed after (unsigned
> short) in the line above.

This check is generated by the checkpatch, and will send another patch
addressing this issue.

>This should be done in a series, with one patch
> per change.

So should I send a patch-set or separate patches per change?

gargi

>
> julia
>
> >                       xgifb_reg_set(pVBInfo->P3c4, 0x2e, di_0);
> >                       xgifb_reg_set(pVBInfo->P3c4, 0x2f, di_1);
> >               } else {
> > --
> > 2.9.2
> >
> > --
> > You received this message because you are subscribed to the Google
Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/ms
gid/outreachy-kernel/20160913155037.12206-1-gs051095%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >

[-- Attachment #2: Type: text/html, Size: 3777 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: xgifb: move AND operator for logical continuation
  2016-09-13 16:09   ` Gargi Sharma
@ 2016-09-13 16:10     ` Julia Lawall
  0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2016-09-13 16:10 UTC (permalink / raw)
  To: Gargi Sharma; +Cc: outreachy-kernel, arnaud.patard, gregkh

[-- Attachment #1: Type: TEXT/PLAIN, Size: 3435 bytes --]



On Tue, 13 Sep 2016, Gargi Sharma wrote:

> Hi
>
> On Tue, Sep 13, 2016 at 9:27 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >
> >
> >
> > On Tue, 13 Sep 2016, Gargi Sharma wrote:
> >
> > > Fixes the checkpatch issue Logical continuations should be on the
> > > previous line.
> > >
> > > Signed-off-by: Gargi Sharma <gs051095@gmail.com>
> > > ---
> > >  drivers/staging/xgifb/vb_setmode.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/staging/xgifb/vb_setmode.c
> b/drivers/staging/xgifb/vb_setmode.c
> > > index 50c8ea4..ac27b2c 100644
> > > --- a/drivers/staging/xgifb/vb_setmode.c
> > > +++ b/drivers/staging/xgifb/vb_setmode.c
> > > @@ -1741,8 +1741,8 @@ static void XGI_SetCRT2ECLK(unsigned short
> ModeIdIndex,
> > >       for (i = 0; i < 4; i++) {
> > >               xgifb_reg_and_or(pVBInfo->P3d4, 0x31, ~0x30,
> > >                               (unsigned short) (0x10 * i));
> > > -             if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA))
> > > -                             && (!(pVBInfo->VBInfo & SetInSlaveMode)))
> {
> > > +             if ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) &&
> > > +                             (!(pVBInfo->VBInfo & SetInSlaveMode))) {
> >
> > It's another issue, but all of those parentheses are rather tiring to look
> > at.  The ones outside the ! are not needed.  The indentation is also a bit
> > much.  There is no need for the argument of && to be aligned with the
> > third argument of xgifb_reg_and_or.  At least drop one tab, or even align
> > the two ! expressions.  >The space is also not needed after (unsigned>
> short) in the line above.
>
> This check is generated by the checkpatch, and will send another patch
> addressing this issue.
>
> >This should be done in a series, with one patch
> > per change.
>
> So should I send a patch-set or separate patches per change?

A patch set: 1/3, 2/3, 3/3.  Greg will want to know in what order to apply
them, if they touch the same file.

julia

>
> gargi
>
> >
> > julia
> >
> > >                       xgifb_reg_set(pVBInfo->P3c4, 0x2e, di_0);
> > >                       xgifb_reg_set(pVBInfo->P3c4, 0x2f, di_1);
> > >               } else {
> > > --
> > > 2.9.2
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > > To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/20160913155037.12206-1-g
> s051095%40gmail.com.
> > > For more options, visit https://groups.google.com/d/optout.
> > >
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/CAOCi2DEQhf6AeNByf7rOSud
> qsGaYr4%3DSVM0Q-DAnRg4R7AqX_g%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-13 16:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-13 15:50 [PATCH] staging: xgifb: move AND operator for logical continuation Gargi Sharma
2016-09-13 15:57 ` [Outreachy kernel] " Julia Lawall
2016-09-13 16:09   ` Gargi Sharma
2016-09-13 16:10     ` Julia Lawall

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.