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


Groups > linux.kernel > #1585354

[PATCH v2 1/2] staging: ks7010: Unnecessary parentheses are removed and also improved coding style.

From Arushi Singhal <arushisinghal19971997@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 1/2] staging: ks7010: Unnecessary parentheses are removed and also improved coding style.
Date 2017-02-21 15:10 +0100
Message-ID <tdjiF-3At-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Unnecessary parentheses are removed as reported by checkpatch.pl
to make coder nicer and to improve readability.
Also coding style is improved.For example:-
It's often nicer to read if &(foo[0]) is converted to foo like:
     memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN);
     memcpy(ap->bssid, ap_info->bssid, ETH_ALEN);

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
Changes in v2:
  - Make the commit message more clearer.
  - And correct the error on line number 116
    in file drivers/staging/ks7010/ks_hostif.c
     changes:-
     ap = priv->current_ap;
     is changed to
     ap = &priv->current_ap;
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index ba283ab741a7..b643a37fb943 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -113,7 +113,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info)
 	int rc = 0;
 
 	DPRINTK(3, "\n");
-	ap = priv->current_ap;
+	ap = &priv->current_ap;
 
 	if ((priv->connect_status & CONNECT_STATUS_MASK) == DISCONNECT_STATUS) {
 		memset(ap, 0, sizeof(struct local_ap_t));
-- 
2.11.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/2] staging: ks7010: Unnecessary parentheses are removed  and also improved coding style. Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-02-21 15:10 +0100
  Re: [Outreachy kernel] [PATCH v2 1/2] staging: ks7010: Unnecessary  parentheses are removed and also improved coding style. Julia Lawall <julia.lawall@lip6.fr> - 2017-02-21 15:10 +0100

csiph-web