From: Dmitry Torokhov <dtor_core@ameritech.net>
To: linux-kernel@vger.kernel.org
Cc: "Jiri Slaby" <xslaby@fi.muni.cz>, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH2 6/6] isicom: More whitespaces and coding style
Date: Sun, 9 Oct 2005 23:05:57 -0500 [thread overview]
Message-ID: <200510092305.58010.dtor_core@ameritech.net> (raw)
In-Reply-To: <20051009194241.4821E22AF10@anxur.fi.muni.cz>
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?
> - wrd |= (port->xmit_buf[port->xmit_tail] << 8);
> - port->xmit_tail = (port->xmit_tail + 1) & (SERIAL_XMIT_SIZE - 1);
> + wrd |= (port->xmit_buf[port->xmit_tail]
> + << 8);
And this?
> -#ifdef ISICOM_DEBUG
> - printk(KERN_DEBUG "ISICOM: interrupt: DCD->low.\n");
> -#endif
> + pr_deb(KERN_DEBUG "ISICOM: "
> + "interrupt: "
> + "DCD->low.\n");
And this?
Simply limiting line length to 80 is not enough IMHO, you need to
keep the code readable at the same time.
--
Dmitry
next prev parent reply other threads:[~2005-10-10 4:06 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 [this message]
[not found] ` <4af2d03a0510100250r58fb24f1l1067bf5ad54bb659@mail.gmail.com>
2005-10-10 14:54 ` Dmitry Torokhov
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=200510092305.58010.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=akpm@osdl.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.