Dear Grant Likely,

In message <fa686aa40901251622j542b6029u83c510f5b4e2...@mail.gmail.com> you 
wrote:
>
> >> -     case IRQF_TRIGGER_HIGH:
> >> -             type = 0;
> >> -             break;
> >> -     case IRQF_TRIGGER_RISING:
> >> -             type = 1;
> >> -             break;
> >> -     case IRQF_TRIGGER_FALLING:
> >> -             type = 2;
> >> -             break;
> >> -     case IRQF_TRIGGER_LOW:
> >> -             type = 3;
> >> -             break;
> >> +     case IRQF_TRIGGER_HIGH: type = 0; break;
> >> +     case IRQF_TRIGGER_RISING: type = 1; handler = handle_edge_irq; break;
> >> +     case IRQF_TRIGGER_FALLING: type = 2; handler = handle_edge_irq; 
> >> break;
> >> +     case IRQF_TRIGGER_LOW: type = 3; break;
> >
> > The Linux coding style tells us not to do that:
...
> In principle I agree and follow that rule most of the time, but I have
> good reason for not choosing to do so here.
> 
> The whole point of coding style is to promote
> readability/manageability.  ie. the 80 column rule is a very strong
> guideline, but there are places where breaking that rule makes for
> more readable code than breaking things up and it is left to the
> discretion of the coder and the maintainer.

It's not so much the line length, IMO.

It's "Don't put multiple statements on a single line", plus
readability.

I think the new version is more difficult to read. It's plain ugly,
and inconsistent.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It is common sense to take a method and try it. If it fails, admit it
frankly and try another. But above all, try something.
                                              - Franklin D. Roosevelt
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to