mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: linux-kernel@vger.kernel.org, Jiri Slaby <xslaby@fi.muni.cz>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH2 6/6] isicom: More whitespaces and coding style
Date: Mon, 10 Oct 2005 09:54:24 -0500	[thread overview]
Message-ID: <d120d5000510100754r6012eba5ge088d4307c8e28bf@mail.gmail.com> (raw)
In-Reply-To: <4af2d03a0510100250r58fb24f1l1067bf5ad54bb659@mail.gmail.com>

On 10/10/05, Jiri Slaby <jirislaby@gmail.com> wrote:
> On 10/10/05, Dmitry Torokhov <dtor_core@ameritech.net> 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 <xslaby@fi.muni.cz>
> > >
> > > ---
> > >  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

      parent reply	other threads:[~2005-10-10 14:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-09 19:39 [PATCH2 0/6] isicom char driver rewritten to 2.6 api Jiri Slaby
2005-10-09 19:41 ` [PATCH2 1/6] isicom: Whitespace cleanup Jiri Slaby
2005-10-09 19:42 ` [PATCH2 2/6] isicom: Type conversion and variables deletion Jiri Slaby
2005-10-10 17:27   ` Alan Cox
2005-10-09 19:42 ` [PATCH2 3/6] isicom: Other little changes Jiri Slaby
2005-10-09 19:42 ` [PATCH2 4/6] isicom: Pci probing added Jiri Slaby
2005-10-10 14:57   ` Greg KH
2005-10-09 19:42 ` [PATCH2 5/6] isicom: Firmware loading Jiri Slaby
2005-10-09 19:42 ` [PATCH2 6/6] isicom: More whitespaces and coding style Jiri Slaby
2005-10-10  4:05   ` Dmitry Torokhov
     [not found]     ` <4af2d03a0510100250r58fb24f1l1067bf5ad54bb659@mail.gmail.com>
2005-10-10 14:54       ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d120d5000510100754r6012eba5ge088d4307c8e28bf@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=akpm@osdl.org \
    --cc=dtor_core@ameritech.net \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xslaby@fi.muni.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®