Re: [PATCH2 6/6] isicom: More whitespaces and coding style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/10/05, Jiri Slaby <[email protected]> wrote:
> On 10/10/05, Dmitry Torokhov <[email protected]> wrote:
> > On Sunday 09 October 2005 14:42, Jiri Slaby wrote:
> > > More whitespaces and coding style
> > >
> > > Wrap all the code to 80 chars on a line.
> > > Some `}\nelse' changed to `} else'.
> > > Clean whitespaces in header file.
> > >
> > > Generated in 2.6.14-rc2-mm2 kernel version
> > >
> > > Signed-off-by: Jiri Slaby <[email protected]>
> > >
> > > ---
> > >  drivers/char/isicom.c  |  148 +++++++++++++++++++++++-------------------------
> > >  include/linux/isicom.h |   21 +++----
> > >  2 files changed, 82 insertions(+), 87 deletions(-)
> > >
> > > diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
> > > --- a/drivers/char/isicom.c
> > > +++ b/drivers/char/isicom.c
> > > @@ -467,33 +467,36 @@ static void isicom_tx(unsigned long _dat
> > >               residue = NO;
> > >               wrd = 0;
> > >               while (1) {
> > > -                     cnt = min_t(int, txcount, (SERIAL_XMIT_SIZE - port->xmit_tail));
> > > +                     cnt = min_t(int, txcount, (SERIAL_XMIT_SIZE
> > > +                                     - port->xmit_tail));
> >
> > I am sorry but do you really consider the new form more readable?
> Yes, on the terminal it seems much more better than here and than before.
> But if you have some better idea how to do it, tell us and I will apply it.

At the minimum you could break at the last comma and not in the middle
of expression.

You could also take that block of code and split it to isicom_tx(),
isicom_port_tx() and isicom_chunk_tx(). That would save you couple if
identation levels and allow you to keep the code readable within 80
columns.

Just out of curiosity - was it run through Lindent or reformatted by
hand? The thing is - it might be not readable at 80 columns but I
could expand my terminal and get a decent results. Now it may be
better at 80 columns but no level of resizing terminal will make it
better.

--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux