Re: [PATCH] Staging: wlags49_h2: fixed C99 comments style issues in wl_profile.c

From: Andy Shevchenko
Date: Mon May 10 2010 - 02:59:19 EST


On Sun, May 9, 2010 at 8:12 PM, Prashant P. Shah <pshah.mumbai@xxxxxxxxx> wrote:
> This is a patch to the wl_profile.c file that fixes the C99 comments
> style issues found by the checkpatch.pl tool.
>
> Signed-off-by: Prashant P. Shah <pshah.mumbai@xxxxxxxxx>
> ---
> Âdrivers/staging/wlags49_h2/wl_profile.c | Â 54 +++++++++++++++---------------
> Â1 files changed, 27 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/staging/wlags49_h2/wl_profile.c b/drivers/staging/wlags49_h2/wl_profile.c
> index 13ade70..4a3b64d 100644
> --- a/drivers/staging/wlags49_h2/wl_profile.c
> +++ b/drivers/staging/wlags49_h2/wl_profile.c

...

> @@ -118,17 +118,17 @@ int parse_yes_no(char *value);
>
> Âint parse_yes_no(char *value)
> Â{
> -int rc = 0; Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â//default to NO for invalid parameters
> +int rc = 0; Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â/* default to NO for invalid parameters */
>
> Â Â Â Âif (strlen(value) == 1) {
> Â Â Â Â Â Â Â Âif ((value[0] | ('Y'^'y')) == 'y')
> Â Â Â Â Â Â Â Â Â Â Â Ârc = 1;
> -// Â Â } else {
> -// Â Â Â Â Â Â this should not be debug time info, it is an enduser data entry error ;?
> -// Â Â Â Â Â Â DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_MICROWAVE_ROBUSTNESS);
> +/* Â Â } else {
> + Â Â Â Â Â Â Â this should not be debug time info, it is an enduser data entry error ;?
> + Â Â Â Â Â Â Â DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_MICROWAVE_ROBUSTNESS); */
In such case you have lost the internal comments. I think it should look like
/*
} else {
/* ... */
...
*/


> Â Â Â Â}
> Â Â Â Âreturn rc;
> -} // parse_yes_no
> +} /* parse_yes_no */
>
>
> Â/*******************************************************************************


--
With Best Regards,
Andy Shevchenko
--
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/