[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.999.0708231125120.2049@enigma.security.iitk.ac.in>
Date: Thu, 23 Aug 2007 11:33:43 +0530 (IST)
From: Satyam Sharma <satyam@...radead.org>
To: WANG Cong <xiyou.wangcong@...il.com>
cc: LKML <linux-kernel@...r.kernel.org>, perex@...e.cz,
liam.girdwood@...fsonmicro.com, trivial@...nel.org
Subject: Re: [Git Patch] sound/isa/wavefront/wavefront_synth.c: Remove a lot
of unnecessary stuffs
On Wed, 22 Aug 2007, WANG Cong wrote:
>
> Remove unnecessary white spaces, tabs, white lines, wrap lines, parenthesises,
> braces, semicolons etc.
:-)
The file clearly had a lot of codingstyle problems, but so does your
patch, sadly.
> @@ -134,8 +134,8 @@ MODULE_PARM_DESC(osrun_time, "how many s
> #define STAT_CAN_WRITE 0x20
> #define STAT_INTR_WRITE 0x40
>
> -static int wavefront_delete_sample (snd_wavefront_t *, int sampnum);
> -static int wavefront_find_free_sample (snd_wavefront_t *);
> +static int wavefront_delete_sample(snd_wavefront_t *, int sampnum);
^
> +static int wavefront_find_free_sample(snd_wavefront_t *);
^
IMHO you should specify identifiers for the arg-list of a function
prototype even though they aren't technically required. The kernel
favours that style overwhelmingly for good reason -- helps identify
_what_ that argument is with just one look at the prototype.
> @@ -229,14 +229,12 @@ static struct wavefront_command wavefron
>
> static const char *
> wavefront_errorstr (int errnum)
^
Whitespace should go ... ditto in zillion other places in this file.
Also, you could combine the above two lines into a single line -- that's
the general style followed by most of the kernel, and I've noticed tools
such as cscope / ctags getting confused otherwise (though this is really
a bug in those tools). That'll further reduce LOC, allowing more code to
be displayed per-screenful, which is always good.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists