Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1585916
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Outreachy kernel] [PATCH] staging: xgifb: correct the multiple line dereference to fix coding stye errors |
| Date | 2017-02-22 05:40 +0100 |
| Message-ID | <tdwSC-4py-3@gated-at.bofh.it> (permalink) |
| References | <tdmgy-5z4-31@gated-at.bofh.it> <tdmJA-5Ph-1@gated-at.bofh.it> <tdnFE-6qe-27@gated-at.bofh.it> <tdwSC-4py-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Wed, 2017-02-22 at 09:46 +0530, Arushi Singhal wrote:
> On Wed, Feb 22, 2017 at 12:12 AM, Joe Perches <joe@perches.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.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] staging: xgifb: correct the multiple line dereference to fix coding stye errors Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-02-21 18:20 +0100
Re: [Outreachy kernel] [PATCH] staging: xgifb: correct the multiple line dereference to fix coding stye errors Julia Lawall <julia.lawall@lip6.fr> - 2017-02-21 18:50 +0100
Re: [Outreachy kernel] [PATCH] staging: xgifb: correct the multiple line dereference to fix coding stye errors Joe Perches <joe@perches.com> - 2017-02-21 19:50 +0100
Re: [Outreachy kernel] [PATCH] staging: xgifb: correct the multiple line dereference to fix coding stye errors Joe Perches <joe@perches.com> - 2017-02-22 05:40 +0100
csiph-web