All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Staging: wlan-ng: Drop wrapper function
@ 2016-02-13 13:19 Bhumika Goyal
  2016-02-13 13:19 ` [PATCH 1/2] " Bhumika Goyal
  2016-02-13 13:19 ` [PATCH 2/2] Staging: wlan-ng: Remove function prototype Bhumika Goyal
  0 siblings, 2 replies; 3+ messages in thread
From: Bhumika Goyal @ 2016-02-13 13:19 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

This patchset drops the wrapper function prism2mgmt_pstr2bytearea and 
replace its call by the function it wrapped. Also remove its function 
prototype from the header file as it is no longer needed.

Bhumika Goyal (2):
  Staging: wlan-ng: Drop wrapper function
  Staging: wlan-ng: Remove function prototype

 drivers/staging/wlan-ng/prism2mgmt.h |  1 -
 drivers/staging/wlan-ng/prism2mib.c  | 24 ++----------------------
 2 files changed, 2 insertions(+), 23 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] Staging: wlan-ng: Drop wrapper function
  2016-02-13 13:19 [PATCH 0/2] Staging: wlan-ng: Drop wrapper function Bhumika Goyal
@ 2016-02-13 13:19 ` Bhumika Goyal
  2016-02-13 13:19 ` [PATCH 2/2] Staging: wlan-ng: Remove function prototype Bhumika Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Bhumika Goyal @ 2016-02-13 13:19 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

Drop the function prism2mgmt_pstr2bytearea and replace its function call
with the standard function memcpy that it wrapped.
The code becomes cleaner after this patch.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/wlan-ng/prism2mib.c | 24 ++----------------------
 1 file changed, 2 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c
index cdda07d..e1b2e47 100644
--- a/drivers/staging/wlan-ng/prism2mib.c
+++ b/drivers/staging/wlan-ng/prism2mib.c
@@ -388,7 +388,7 @@ static int prism2mib_bytearea2pstr(struct mibrec *mib,
 		prism2mgmt_bytearea2pstr(bytebuf, pstr, mib->parm2);
 	} else {
 		memset(bytebuf, 0, mib->parm2);
-		prism2mgmt_pstr2bytearea(bytebuf, pstr);
+		memcpy(bytebuf, pstr->data, pstr->len);
 		result =
 		    hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, mib->parm2);
 	}
@@ -543,7 +543,7 @@ static int prism2mib_wepdefaultkey(struct mibrec *mib,
 		len = (pstr->len > 5) ? HFA384x_RID_CNFWEP128DEFAULTKEY_LEN :
 		    HFA384x_RID_CNFWEPDEFAULTKEY_LEN;
 		memset(bytebuf, 0, len);
-		prism2mgmt_pstr2bytearea(bytebuf, pstr);
+		memcpy(bytebuf, pstr->data, pstr->len);
 		result = hfa384x_drvr_setconfig(hw, mib->parm1, bytebuf, len);
 	}
 
@@ -759,26 +759,6 @@ void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
 }
 
 /*----------------------------------------------------------------
-* prism2mgmt_pstr2bytearea
-*
-* Convert the pstr data in the WLAN message structure into an hfa384x
-* byte area format.
-*
-* Arguments:
-*	bytearea	hfa384x byte area data type
-*	pstr		wlan message data
-*
-* Returns:
-*	Nothing
-*
-----------------------------------------------------------------*/
-
-void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr)
-{
-	memcpy(bytearea, pstr->data, pstr->len);
-}
-
-/*----------------------------------------------------------------
 * prism2mgmt_bytestr2pstr
 *
 * Convert the data in an hfa384x byte string format into a
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] Staging: wlan-ng: Remove function prototype
  2016-02-13 13:19 [PATCH 0/2] Staging: wlan-ng: Drop wrapper function Bhumika Goyal
  2016-02-13 13:19 ` [PATCH 1/2] " Bhumika Goyal
@ 2016-02-13 13:19 ` Bhumika Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Bhumika Goyal @ 2016-02-13 13:19 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

This patch removes the function prototype for prism2mgmt_pstr2bytearea as
it is no longer needed.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/wlan-ng/prism2mgmt.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h
index 7a9f424..e647203 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.h
+++ b/drivers/staging/wlan-ng/prism2mgmt.h
@@ -87,7 +87,6 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp);
 * Prism2 data types
 ---------------------------------------------------------------*/
 /* byte area conversion functions*/
-void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr);
 void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len);
 
 /* byte string conversion functions*/
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-13 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-13 13:19 [PATCH 0/2] Staging: wlan-ng: Drop wrapper function Bhumika Goyal
2016-02-13 13:19 ` [PATCH 1/2] " Bhumika Goyal
2016-02-13 13:19 ` [PATCH 2/2] Staging: wlan-ng: Remove function prototype Bhumika Goyal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.