diff mbox

[1/2] mwifiex: coding style cleanup in bss parameter update

Message ID 1360993470-4828-2-git-send-email-bzhao@marvell.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Bing Zhao Feb. 16, 2013, 5:44 a.m. UTC
From: Yogesh Ashok Powar <yogeshp@marvell.com>

They all can make one line.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
 drivers/net/wireless/mwifiex/scan.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

Comments

Joe Perches Feb. 16, 2013, 8:28 a.m. UTC | #1
On Fri, 2013-02-15 at 21:44 -0800, Bing Zhao wrote:
> From: Yogesh Ashok Powar <yogeshp@marvell.com>
> They all can make one line.
[]
> diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
[]
> @@ -1485,20 +1485,15 @@ static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv,
>  	priv->curr_bss_params.bss_descriptor.bcn_wapi_ie = NULL;
>  	priv->curr_bss_params.bss_descriptor.wapi_offset = 0;
>  	priv->curr_bss_params.bss_descriptor.bcn_ht_cap = NULL;
> -	priv->curr_bss_params.bss_descriptor.ht_cap_offset =
> -		0;
> +	priv->curr_bss_params.bss_descriptor.ht_cap_offset = 0;

Another way to do this to reduce the visual noise it to
create a temporary
	struct mwifiex_bssdescriptor *t = &priv->curr_bss_params.bss_descriptor;
and use
	s/priv->curr_bss_params.bss_descriptor./t->/


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bing Zhao Feb. 19, 2013, 11:17 p.m. UTC | #2
Hi Joe,

Thanks for your comment.

> On Fri, 2013-02-15 at 21:44 -0800, Bing Zhao wrote:
> > From: Yogesh Ashok Powar <yogeshp@marvell.com>
> > They all can make one line.
> []
> > diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
> []
> > @@ -1485,20 +1485,15 @@ static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv,
> >  	priv->curr_bss_params.bss_descriptor.bcn_wapi_ie = NULL;
> >  	priv->curr_bss_params.bss_descriptor.wapi_offset = 0;
> >  	priv->curr_bss_params.bss_descriptor.bcn_ht_cap = NULL;
> > -	priv->curr_bss_params.bss_descriptor.ht_cap_offset =
> > -		0;
> > +	priv->curr_bss_params.bss_descriptor.ht_cap_offset = 0;
> 
> Another way to do this to reduce the visual noise it to
> create a temporary
> 	struct mwifiex_bssdescriptor *t = &priv->curr_bss_params.bss_descriptor;
> and use
> 	s/priv->curr_bss_params.bss_descriptor./t->/

This does look better.

As the patch is in wireless-next now I can make the change later.

Thanks,
Bing
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 949234f..e275aec 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1485,20 +1485,15 @@  static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv,
 	priv->curr_bss_params.bss_descriptor.bcn_wapi_ie = NULL;
 	priv->curr_bss_params.bss_descriptor.wapi_offset = 0;
 	priv->curr_bss_params.bss_descriptor.bcn_ht_cap = NULL;
-	priv->curr_bss_params.bss_descriptor.ht_cap_offset =
-		0;
+	priv->curr_bss_params.bss_descriptor.ht_cap_offset = 0;
 	priv->curr_bss_params.bss_descriptor.bcn_ht_oper = NULL;
-	priv->curr_bss_params.bss_descriptor.ht_info_offset =
-		0;
-	priv->curr_bss_params.bss_descriptor.bcn_bss_co_2040 =
-		NULL;
-	priv->curr_bss_params.bss_descriptor.
-		bss_co_2040_offset = 0;
+	priv->curr_bss_params.bss_descriptor.ht_info_offset = 0;
+	priv->curr_bss_params.bss_descriptor.bcn_bss_co_2040 = NULL;
+	priv->curr_bss_params.bss_descriptor.bss_co_2040_offset = 0;
 	priv->curr_bss_params.bss_descriptor.bcn_ext_cap = NULL;
 	priv->curr_bss_params.bss_descriptor.ext_cap_offset = 0;
 	priv->curr_bss_params.bss_descriptor.beacon_buf = NULL;
-	priv->curr_bss_params.bss_descriptor.beacon_buf_size =
-		0;
+	priv->curr_bss_params.bss_descriptor.beacon_buf_size = 0;
 
 	/* Make a copy of current BSSID descriptor */
 	memcpy(&priv->curr_bss_params.bss_descriptor, bss_desc,