Re: [PATCH 4573/4573] Staging: rtl8188eu: fixed newlines after declarations

From: Joe Perches
Date: Thu Jul 30 2015 - 01:38:45 EST


On Wed, 2015-07-29 at 21:34 -0400, Dave Perez wrote:
> This is a patch to the rtw_debug.c file that fixes styling errors relating to new lines after variable declarations.
[]
> diff --git a/drivers/staging/rtl8188eu/core/rtw_debug.c b/drivers/staging/rtl8188eu/core/rtw_debug.c
[]
> @@ -219,6 +219,7 @@ int proc_get_ht_option(char *page, char **start,
> struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
>
> int len = 0;
> +
> len += snprintf(page + len, count - len, "ht_option=%d\n", pmlmepriv->htpriv.ht_option);
> *eof = 1;
> return len;

the blank line before "int len = 0" could also be removed.

The routine _could_ be rewritten more simply as:

struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int len = snprintf(page, count, "ht_option=%d\n",
pmlmepriv->htpriv.htoption);

*eof = 1;

return len;
}

but there are a bunch of other routines that use this form
so it's probably fine as-is.



--
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/