Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1195679 > unrolled thread

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

Started byDave Perez <dave@daveperez.com>
First post2015-07-30 03:50 +0200
Last post2015-07-30 07:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 4573/4573] Staging: rtl8188eu: fixed newlines after declarations  Dave Perez <dave@daveperez.com> - 2015-07-30 03:50 +0200
    Re: [PATCH 4573/4573] Staging: rtl8188eu: fixed newlines after  declarations Joe Perches <joe@perches.com> - 2015-07-30 07:40 +0200

#1195679 — [PATCH 4573/4573] Staging: rtl8188eu: fixed newlines after declarations

FromDave Perez <dave@daveperez.com>
Date2015-07-30 03:50 +0200
Subject[PATCH 4573/4573] Staging: rtl8188eu: fixed newlines after declarations
Message-ID<pRL8S-wR-11@gated-at.bofh.it>
This is a patch to the rtw_debug.c file that fixes styling errors relating to new lines after variable declarations. 
	
Signed-off-by: Dave Perez <dave@daveperez.com>
---
 drivers/staging/rtl8188eu/core/rtw_debug.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/rtl8188eu/core/rtw_debug.c b/drivers/staging/rtl8188eu/core/rtw_debug.c
index bc3fe10..12beab0 100644
--- 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;
@@ -588,6 +589,7 @@ int proc_set_rx_signal(struct file *file, const char __user *buffer,
 
 	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
 		int num = sscanf(tmp, "%u %u", &is_signal_dbg, &signal_strength);
+
 		is_signal_dbg = is_signal_dbg == 0 ? 0 : 1;
 		if (is_signal_dbg && num != 2)
 			return count;
-- 
2.4.5

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

[toc] | [next] | [standalone]


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

FromJoe Perches <joe@perches.com>
Date2015-07-30 07:40 +0200
SubjectRe: [PATCH 4573/4573] Staging: rtl8188eu: fixed newlines after declarations
Message-ID<pROJr-5NH-1@gated-at.bofh.it>
In reply to#1195679
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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web