Skip to contentSkip to conversation

staging: wlan-ng: remove helper function prism2sta_inf_handover()

PATCH Superseded Calvince Otieno 2 participants 2 messages Oct 13, 2023 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wlan-ng: remove helper function prism2sta_inf_handover()

prism2sta_inf_handover() function basically calls pr_debug() to print a literal string. This can be done by the parent function directly.

---
 drivers/staging/wlan-ng/prism2sta.c | 29 +----------------------------
 1 file changed, 1 insertion(+), 28 deletions(-)
drivers/staging/wlan-ng/prism2sta.c +1 -28
index 57180bb71699..caeceb89c9fa 100644
@@ -90,9 +90,6 @@ static int prism2sta_getcardinfo(struct wlandevice *wlandev);
 static int prism2sta_globalsetup(struct wlandevice *wlandev);
 static int prism2sta_setmulticast(struct wlandevice *wlandev,
 				  struct net_device *dev);
-
-static void prism2sta_inf_handover(struct wlandevice *wlandev,
-				   struct hfa384x_inf_frame *inf);
 static void prism2sta_inf_tallies(struct wlandevice *wlandev,
 				  struct hfa384x_inf_frame *inf);
 static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev,
@@ -922,30 +919,6 @@ static int prism2sta_setmulticast(struct wlandevice *wlandev,
 	return result;
 }
 
-/*
- * prism2sta_inf_handover
- *
- * Handles the receipt of a Handover info frame. Should only be present
- * in APs only.
- *
- * Arguments:
- *	wlandev		wlan device structure
- *	inf		ptr to info frame (contents in hfa384x order)
- *
- * Returns:
- *	nothing
- *
- * Side effects:
- *
- * Call context:
- *	interrupt
- */
-static void prism2sta_inf_handover(struct wlandevice *wlandev,
-				   struct hfa384x_inf_frame *inf)
-{
-	pr_debug("received infoframe:HANDOVER (unhandled)\n");
-}
-
 /*
  * prism2sta_inf_tallies
  *
@@ -1724,7 +1697,7 @@ void prism2sta_ev_info(struct wlandevice *wlandev,
 	/* Dispatch */
 	switch (inf->infotype) {
 	case HFA384x_IT_HANDOVERADDR:
-		prism2sta_inf_handover(wlandev, inf);
+		pr_debug("received infoframe:HANDOVER (unhandled)\n");
 		break;
 	case HFA384x_IT_COMMTALLIES:
 		prism2sta_inf_tallies(wlandev, inf);
Signature · 1 line
Calvince Otieno
#1 lore raw

Hi Calvince,

...

Quoted 28 lines
drivers/staging/wlan-ng/prism2sta.c +0 -24
-/*
- * prism2sta_inf_handover
- *
- * Handles the receipt of a Handover info frame. Should only be present
- * in APs only.
- *
- * Arguments:
- *	wlandev		wlan device structure
- *	inf		ptr to info frame (contents in hfa384x order)
- *
- * Returns:
- *	nothing
- *
- * Side effects:
- *
- * Call context:
- *	interrupt
- */
-static void prism2sta_inf_handover(struct wlandevice *wlandev,
-				   struct hfa384x_inf_frame *inf)
-{
-	pr_debug("received infoframe:HANDOVER (unhandled)\n");
-}
-
 /*
  * prism2sta_inf_tallies
  *

drivers/staging/wlan-ng/prism2sta.c void prism2sta_ev_info(struct wlandevice *wlandev, · line 1700

Quoted 5 lines
drivers/staging/wlan-ng/prism2sta.c +1 -1
@@ -1724,7 +1697,7 @@ void prism2sta_ev_info(struct wlandevice *wlandev,
 	/* Dispatch */
 	switch (inf->infotype) {
 	case HFA384x_IT_HANDOVERADDR:
-		prism2sta_inf_handover(wlandev, inf);
+		pr_debug("received infoframe:HANDOVER (unhandled)\n");

while I think the patch is correct, I believe you should take this opportunity to use a better printing function. I am not a network developer, but I believe network people would prefer netdev_dbg() at this point.

The pr_*() family is one of the most generic printing method, useful for debug and few other situations. Other printing functions should be preferred because the provide more context.

Andi