Re: [Git Patch] sound/isa/wavefront/wavefront_synth.c: Remove a lotof unnecessary stuffs

From: Satyam Sharma
Date: Thu Aug 23 2007 - 01:51:00 EST




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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/