[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1487738018.14159.1.camel@perches.com>
Date: Tue, 21 Feb 2017 20:33:38 -0800
From: Joe Perches <joe@...ches.com>
To: Arushi Singhal <arushisinghal19971997@...il.com>
Cc: Julia Lawall <julia.lawall@...6.fr>, arnaud.patard@...-net.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
outreachy-kernel@...glegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: xgifb: correct the multiple
line dereference to fix coding stye errors
On Wed, 2017-02-22 at 09:46 +0530, Arushi Singhal wrote:
> On Wed, Feb 22, 2017 at 12:12 AM, Joe Perches <joe@...ches.com> wrote:
>
> > On Tue, 2017-02-21 at 18:40 +0100, Julia Lawall wrote:
> > >
> > > On Tue, 21 Feb 2017, Arushi Singhal wrote:
> > >
> > > > Error was reported by checkpatch.pl as
> > > > WARNING: Avoid multiple line dereference...
> > > > if there is boolean operator then it is fixed by Splitting line at
> > > > boolean operator.
> > >
> > > This is massively execeeding the 80 character boundary, and not for
> > > something trivial like a string. Maybe the code can be reorganized in
> > > some other way.
> >
> > The easiest way to do that is to change the test above it
> > to reduce indentation from
> >
> > if (xgifb_info->display2 == XGIFB_DISP_TV &&
> > xgifb_info->hasVB == HASVB_301) {
> > [code...];
> > }
> > }
> >
> > to
> >
> > if (xgifb_info->display2 != XGIFB_DISP_TV ||
> > xgifb_in
> > fo->hasVB != HASVB_301)
> > return;
> >
> > [code...];
> > }
> >
> >
>
> Hi
> So basically you are saying that cut one word and put the other part of the
> word in the next line.
No, evolution is a horrible email client
that wraps lines oddly sometimes and sends
out different content than it displays in
its on-screen editor.
What I am saying is the block after the test
can be unindented one level by inverting the
test and using return.
It should be:
if (xgifb_info->display2 != XGIFB_DISP_TV ||
xgifb_in> > fo->hasVB != HASVB_301)
return;
[code...];
I sent you a separate attachment privately a
few hours ago but I'll attach it here too.
View attachment "foo.diff" of type "text/x-patch" (7434 bytes)
Powered by blists - more mailing lists