lkml.org 
[lkml]   [2005]   [Oct]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromDmitry Torokhov <>
SubjectRe: [PATCH2 6/6] isicom: More whitespaces and coding style
DateSun, 9 Oct 2005 23:05:57 -0500
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-10 04:09    [W:0.796 / U:0.020 seconds]
©2003-2008 Jasper Spaans