Skip to contentSkip to conversation

libertas: Remove unused exports

PATCH In review Holger Schurig 2 participants 2 messages Feb 26, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libertas: Remove unused exports

From: Roland Dreier <[email protected]>

The libertas driver exports a number of symbols with no in-tree users; remove these unused exports. lbs_reset_device() is completely unused, with no callers at all, so remove the function completely.

A couple of these unused exported symbols are static, which causes the following build error on ia64 with gcc 4.2.3:

drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh causes a section type conflict drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh causes a section type conflict

drivers/net/wireless/libertas/cmd.c +0 -2
Index: wireless-2.6/drivers/net/wireless/libertas/cmd.c
===================================================================
@@ -1066,7 +1066,6 @@ int lbs_mesh_access(struct lbs_private *
 	lbs_deb_leave(LBS_DEB_CMD);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_mesh_access);
 
 int lbs_mesh_config(struct lbs_private *priv, uint16_t enable, uint16_t chan)
 {
@@ -1571,7 +1570,6 @@ done:
 	lbs_deb_leave_args(LBS_DEB_HOST, "ret %d", ret);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command);
 
 /**
  *  @brief This function allocates the command buffer and link
drivers/net/wireless/libertas/decl.h +0 -1
Index: wireless-2.6/drivers/net/wireless/libertas/decl.h
===================================================================
@@ -69,7 +69,6 @@ struct lbs_private *lbs_add_card(void *c
 int lbs_remove_card(struct lbs_private *priv);
 int lbs_start_card(struct lbs_private *priv);
 int lbs_stop_card(struct lbs_private *priv);
-int lbs_reset_device(struct lbs_private *priv);
 void lbs_host_to_card_done(struct lbs_private *priv);
 
 int lbs_update_channel(struct lbs_private *priv);
drivers/net/wireless/libertas/main.c +0 -17
Index: wireless-2.6/drivers/net/wireless/libertas/main.c
===================================================================
@@ -1366,8 +1366,6 @@ done:
 	lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_add_mesh);
-
 
 static void lbs_remove_mesh(struct lbs_private *priv)
 {
@@ -1387,7 +1385,6 @@ static void lbs_remove_mesh(struct lbs_p
 	free_netdev(mesh_dev);
 	lbs_deb_leave(LBS_DEB_MESH);
 }
-EXPORT_SYMBOL_GPL(lbs_remove_mesh);
 
 /**
  *  @brief This function finds the CFP in
@@ -1473,20 +1470,6 @@ void lbs_interrupt(struct lbs_private *p
 }
 EXPORT_SYMBOL_GPL(lbs_interrupt);
 
-int lbs_reset_device(struct lbs_private *priv)
-{
-	int ret;
-
-	lbs_deb_enter(LBS_DEB_MAIN);
-	ret = lbs_prepare_and_send_command(priv, CMD_802_11_RESET,
-				    CMD_ACT_HALT, 0, 0, NULL);
-	msleep_interruptible(10);
-
-	lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
-	return ret;
-}
-EXPORT_SYMBOL_GPL(lbs_reset_device);
-
 static int __init lbs_init_module(void)
 {
 	lbs_deb_enter(LBS_DEB_MAIN);
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Holger Schurig

From: Roland Dreier <[email protected]>

The libertas driver exports a number of symbols with no in-tree users; remove these unused exports. lbs_reset_device() is completely unused, with no callers at all, so remove the function completely.

Quoted 8 lines

A couple of these unused exported symbols are static, which causes the following build error on ia64 with gcc 4.2.3:

drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh causes a section type conflict drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh causes a section type conflict

I acked it on netdev too while forwarding to linux-wireless yesterday. For completeness:

Quoted 76 lines

Index: wireless-2.6/drivers/net/wireless/libertas/cmd.c
===================================================================

drivers/net/wireless/libertas/cmd.c +0 -2
@@ -1066,7 +1066,6 @@ int lbs_mesh_access(struct lbs_private *
 	lbs_deb_leave(LBS_DEB_CMD);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_mesh_access);
 
 int lbs_mesh_config(struct lbs_private *priv, uint16_t enable, uint16_t chan)
 {
@@ -1571,7 +1570,6 @@ done:
 	lbs_deb_leave_args(LBS_DEB_HOST, "ret %d", ret);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command);
 
 /**
  *  @brief This function allocates the command buffer and link

Index: wireless-2.6/drivers/net/wireless/libertas/decl.h
===================================================================

drivers/net/wireless/libertas/decl.h +0 -1
@@ -69,7 +69,6 @@ struct lbs_private *lbs_add_card(void *c
 int lbs_remove_card(struct lbs_private *priv);
 int lbs_start_card(struct lbs_private *priv);
 int lbs_stop_card(struct lbs_private *priv);
-int lbs_reset_device(struct lbs_private *priv);
 void lbs_host_to_card_done(struct lbs_private *priv);
 
 int lbs_update_channel(struct lbs_private *priv);

Index: wireless-2.6/drivers/net/wireless/libertas/main.c
===================================================================

drivers/net/wireless/libertas/main.c +0 -17
@@ -1366,8 +1366,6 @@ done:
 	lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(lbs_add_mesh);
-
 
 static void lbs_remove_mesh(struct lbs_private *priv)
 {
@@ -1387,7 +1385,6 @@ static void lbs_remove_mesh(struct lbs_p
 	free_netdev(mesh_dev);
 	lbs_deb_leave(LBS_DEB_MESH);
 }
-EXPORT_SYMBOL_GPL(lbs_remove_mesh);
 
 /**
  *  @brief This function finds the CFP in
@@ -1473,20 +1470,6 @@ void lbs_interrupt(struct lbs_private *p
 }
 EXPORT_SYMBOL_GPL(lbs_interrupt);
 
-int lbs_reset_device(struct lbs_private *priv)
-{
-	int ret;
-
-	lbs_deb_enter(LBS_DEB_MAIN);
-	ret = lbs_prepare_and_send_command(priv, CMD_802_11_RESET,
-				    CMD_ACT_HALT, 0, 0, NULL);
-	msleep_interruptible(10);
-
-	lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret);
-	return ret;
-}
-EXPORT_SYMBOL_GPL(lbs_reset_device);
-
 static int __init lbs_init_module(void)
 {
 	lbs_deb_enter(LBS_DEB_MAIN);