Skip to contentSkip to conversation

Staging: wlan-ng: Remove unused functions and prototypes

PATCH Superseded Bhumika Goyal 3 participants 7 messages Feb 16, 2016 – Feb 17, 2016 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Staging: wlan-ng: Remove unused functions and prototypes

The functions hfa384x_drvr_getconfig_async and hfa384x_drvr_commtallies are defined but they are not used anywhere in kernel so remove them. Also remove their prototypes from the header file.

Bhumika Goyal (4):
Staging: wlan-ng: hfa384x_usb.c: Remove unused function
Staging: wlan-ng: hfa384x.h: Remove function prototype
Staging: wlan-ng: Remove function hfa384x_drvr_getconfig_async
Staging: wlan-ng: Remove prototype for hfa384x_drvr_getconfig_async

 drivers/staging/wlan-ng/hfa384x.h     |  5 ---
 drivers/staging/wlan-ng/hfa384x_usb.c | 66 -----------------------------------
 2 files changed, 71 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/4 Staging: wlan-ng: hfa384x_usb.c: Remove unused function

The function hfa384x_drvr_commtallies is not used anywhere in the kernel so remove it.

---
 drivers/staging/wlan-ng/hfa384x_usb.c | 31 -------------------------------
 1 file changed, 31 deletions(-)
drivers/staging/wlan-ng/hfa384x_usb.c +0 -31
index 682de77..7eda536 100644
@@ -1747,37 +1747,6 @@ done:
 }
 
 /*----------------------------------------------------------------
-* hfa384x_drvr_commtallies
-*
-* Send a commtallies inquiry to the MAC.  Note that this is an async
-* call that will result in an info frame arriving sometime later.
-*
-* Arguments:
-*	hw		device structure
-*
-* Returns:
-*	zero		success.
-*
-* Side effects:
-*
-* Call context:
-*	process
-----------------------------------------------------------------*/
-int hfa384x_drvr_commtallies(hfa384x_t *hw)
-{
-	hfa384x_metacmd_t cmd;
-
-	cmd.cmd = HFA384x_CMDCODE_INQ;
-	cmd.parm0 = HFA384x_IT_COMMTALLIES;
-	cmd.parm1 = 0;
-	cmd.parm2 = 0;
-
-	hfa384x_docmd_async(hw, &cmd, NULL, NULL, NULL);
-
-	return 0;
-}
-
-/*----------------------------------------------------------------
 * hfa384x_drvr_disable
 *
 * Issues the disable command to stop communications on one of
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/4 Staging: wlan-ng: hfa384x.h: Remove function prototype

In reply to Bhumika Goyal

The prototype of function hfa384x_drvr_commtallies is no longer needed so remove it.

---
 drivers/staging/wlan-ng/hfa384x.h | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/wlan-ng/hfa384x.h +0 -1
index 8dfe438..4fd3145 100644
@@ -1360,7 +1360,6 @@ void hfa384x_destroy(hfa384x_t *hw);
 
 int
 hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis);
-int hfa384x_drvr_commtallies(hfa384x_t *hw);
 int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport);
 int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport);
 int hfa384x_drvr_flashdl_enable(hfa384x_t *hw);
Signature · 1 line
1.9.1
#3 lore raw

Re: [Outreachy kernel] [PATCH 2/4] Staging: wlan-ng: hfa384x.h: Remove function prototype

Quoted 13 lines · On Tuesday 16 February 2016 19:10:33 Bhumika Goyal wrote:

The prototype of function hfa384x_drvr_commtallies is no longer needed so remove it.

---
 drivers/staging/wlan-ng/hfa384x.h | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/wlan-ng/hfa384x.h +0 -0
index 8dfe438..4fd3145 100644

drivers/staging/wlan-ng/hfa384x.h void hfa384x_destroy(hfa384x_t *hw); · line 1365

Quoted 7 lines
drivers/staging/wlan-ng/hfa384x.h +0 -1
@@ -1360,7 +1360,6 @@ void hfa384x_destroy(hfa384x_t *hw);
 
 int
 hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis);
-int hfa384x_drvr_commtallies(hfa384x_t *hw);
 int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport);
 int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport);
 int hfa384x_drvr_flashdl_enable(hfa384x_t *hw);

I'd use a single patch to remove both the function and the prototype, otherwise all four patches look good.

Arnd

#4 lore raw

PATCH 3/4 Staging: wlan-ng: Remove function hfa384x_drvr_getconfig_async

In reply to Bhumika Goyal

The function hfa384x_drvr_getconfig_async is defined but not used anywhere in the kernel so remove it.

---
 drivers/staging/wlan-ng/hfa384x_usb.c | 35 -----------------------------------
 1 file changed, 35 deletions(-)
drivers/staging/wlan-ng/hfa384x_usb.c +0 -35
index 7eda536..ee63c64 100644
@@ -2091,41 +2091,6 @@ int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len)
 }
 
 /*----------------------------------------------------------------
- * hfa384x_drvr_getconfig_async
- *
- * Performs the sequence necessary to perform an async read of
- * of a config/info item.
- *
- * Arguments:
- *       hw              device structure
- *       rid             config/info record id (host order)
- *       buf             host side record buffer.  Upon return it will
- *                       contain the body portion of the record (minus the
- *                       RID and len).
- *       len             buffer length (in bytes, should match record length)
- *       cbfn            caller supplied callback, called when the command
- *                       is done (successful or not).
- *       cbfndata        pointer to some caller supplied data that will be
- *                       passed in as an argument to the cbfn.
- *
- * Returns:
- *       nothing         the cbfn gets a status argument identifying if
- *                       any errors occur.
- * Side effects:
- *       Queues an hfa384x_usbcmd_t for subsequent execution.
- *
- * Call context:
- *       Any
- ----------------------------------------------------------------*/
-int
-hfa384x_drvr_getconfig_async(hfa384x_t *hw,
-			     u16 rid, ctlx_usercb_t usercb, void *usercb_data)
-{
-	return hfa384x_dorrid_async(hw, rid, NULL, 0,
-				    hfa384x_cb_rrid, usercb, usercb_data);
-}
-
-/*----------------------------------------------------------------
  * hfa384x_drvr_setconfig_async
  *
  * Performs the sequence necessary to write a config/info item.
Signature · 1 line
1.9.1
#5 lore raw

Re: [Outreachy kernel] [PATCH 3/4] Staging: wlan-ng: Remove function hfa384x_drvr_getconfig_async

Quoted 5 lines · Bhumika Goyal

The function hfa384x_drvr_getconfig_async is defined but not used anywhere in the kernel so remove it.

---

This patch introduces a new build warning:
drivers/staging/wlan-ng/hfa384x_usb.c:839:13: warning: ‘hfa384x_cb_rrid’ defined but not used

regards
sudip

#6 lore raw

PATCH 4/4 Staging: wlan-ng: Remove prototype for hfa384x_drvr_getconfig_async

In reply to Bhumika Goyal

The function prototype for hfa384x_drvr_getconfig_async is now no longer needed so it can be removed.

---
 drivers/staging/wlan-ng/hfa384x.h | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/wlan-ng/hfa384x.h +0 -4
index 4fd3145..cec6d0b 100644
@@ -1390,10 +1390,6 @@ static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val)
 }
 
 int
-hfa384x_drvr_getconfig_async(hfa384x_t *hw,
-			     u16 rid, ctlx_usercb_t usercb, void *usercb_data);
-
-int
 hfa384x_drvr_setconfig_async(hfa384x_t *hw,
 			     u16 rid,
 			     void *buf,
Signature · 1 line
1.9.1