libertas: Don't mark exported symbols as static
Subsystems (3)
PATCH 1/1 libertas: Don't mark exported symbols as static
Marking exported symbols as static 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
Therefore, remove the static marking on lbs_remove_mesh and lbs_add_mesh.
---
drivers/net/wireless/libertas/main.c +4 -4
@@ -253,8 +253,8 @@ static ssize_t lbs_anycast_set(struct device *dev,static int lbs_add_rtap (struct lbs_private *priv);static void lbs_remove_rtap (struct lbs_private *priv); -static int lbs_add_mesh (struct lbs_private *priv); -static void lbs_remove_mesh (struct lbs_private *priv); +int lbs_add_mesh (struct lbs_private *priv); +void lbs_remove_mesh (struct lbs_private *priv);/**
@@ -1296,7 +1296,7 @@ EXPORT_SYMBOL_GPL(lbs_stop_card);* @param priv A pointer to the struct lbs_private structure * @return 0 if successful, -X otherwise */ -static int lbs_add_mesh (struct lbs_private *priv) +int lbs_add_mesh (struct lbs_private *priv) {struct net_device *mesh_dev =NULL ;int ret =0 ;
@@ -1354,7 +1354,7 @@ done:EXPORT_SYMBOL_GPL (lbs_add_mesh); -static void lbs_remove_mesh (struct lbs_private *priv) +void lbs_remove_mesh (struct lbs_private *priv) {struct net_device *mesh_dev;
Quoted 44 lines · On Fri, 08 Feb 2008 16:07:26 -0800 Roland Dreier <[email protected]> wrote:
Marking exported symbols as static causes the following build error on ia64 with gcc 4.2.3:
drivers/net/wireless/libertas/main.c:1375: error:__ksymtab_lbs_remove_meshcauses a section type conflictdrivers/net/wireless/libertas/main.c:1354: error:__ksymtab_lbs_add_meshcauses a section type conflictTherefore, remove the static marking on
lbs_remove_meshandlbs_add_mesh.Signed-off-by Roland Dreier <[email protected]>---
drivers/net/wireless/libertas/main.c +4
-5@@ -253,8 +253,8 @@ static ssize_t lbs_anycast_set(struct device *dev,static int lbs_add_rtap (struct lbs_private *priv);static void lbs_remove_rtap (struct lbs_private *priv); -static int lbs_add_mesh (struct lbs_private *priv); -static void lbs_remove_mesh (struct lbs_private *priv); +int lbs_add_mesh (struct lbs_private *priv); +void lbs_remove_mesh (struct lbs_private *priv);/** @@ -1296,7 +1296,7 @@ EXPORT_SYMBOL_GPL(lbs_stop_card);* @param priv A pointer to the struct lbs_private structure * @return 0 if successful, -X otherwise */ -static int lbs_add_mesh (struct lbs_private *priv) +int lbs_add_mesh (struct lbs_private *priv) {struct net_device *mesh_dev =NULL ;int ret =0 ;@@ -1354,7 +1354,7 @@ done:EXPORT_SYMBOL_GPL (lbs_add_mesh); -static void lbs_remove_mesh (struct lbs_private *priv) +void lbs_remove_mesh (struct lbs_private *priv) {struct net_device *mesh_dev; --
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Why not pull the exports? they aren't used anywhere in the existing kernel.
Signature · 1 line
Stephen Hemminger <[email protected]>
Quoted 1 line
Why not pull the exports? they aren't used anywhere in the existing kernel.
I'm guessing there's some not-(yet-)merged mesh networking stuff that uses the symbols, but it doesn't matter much to me...
- R.
Quoted 4 lines · Roland Dreier
Quoted 1 line
Why not pull the exports? they aren't used anywhere in the existing kernel.
I'm guessing there's some not-(yet-)merged mesh networking stuff that uses the symbols, but it doesn't matter much to me...
The general rule is to not keep symbols for out of tree stuff, so removing the exports makes more sense.
Quoted 8 lines · Christoph Hellwig
Quoted 4 lines · Roland Dreier
Quoted 1 line
Why not pull the exports? they aren't used anywhere in the existing kernel.
I'm guessing there's some not-(yet-)merged mesh networking stuff that uses the symbols, but it doesn't matter much to me...
The general rule is to not keep symbols for out of tree stuff, so removing the exports makes more sense.
If they aren't used in the in-kernel driver, just kill the export statements.
Dan
PATCH 1/1 libertas: Remove unused exports
In reply to Roland DreierThe 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
This patch fixes this problem. I don't have hardware, so this is not run-tested, but I tested the build with
CONFIG_LIBERTAS=y
CONFIG_LIBERTAS_USB=m
CONFIG_LIBERTAS_CS=m
CONFIG_LIBERTAS_SDIO=m
and there were no problems with undefined symbols.
---
Here's the patch that removes the unused exports (and a few more that I found).
drivers/net/wireless/libertas/cmd.c +0 -2
@@ -1040,7 +1040,6 @@ int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action,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) {
@@ -1576,7 +1575,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
@@ -69,7 +69,6 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev);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
@@ -1351,8 +1350,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) {
@@ -1372,7 +1369,6 @@ static void lbs_remove_mesh(struct lbs_private *priv)free_netdev (mesh_dev);lbs_deb_leave (LBS_DEB_MESH ); } -EXPORT_SYMBOL_GPL (lbs_remove_mesh);/** * @brief This function finds the CFP in
@@ -1458,20 +1454,6 @@ void lbs_interrupt(struct lbs_private *priv) }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 );
PATCH RESEND 1/1 libertas: Remove unused exports
Any chance of getting this applied? It seems the build is still broken on ia64 at least due to the export of static functions.
---
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
This patch fixes this problem. I don't have hardware, so this is not run-tested, but I tested the build with
CONFIG_LIBERTAS=y
CONFIG_LIBERTAS_USB=m
CONFIG_LIBERTAS_CS=m
CONFIG_LIBERTAS_SDIO=m
and there were no problems with undefined symbols.
---
drivers/net/wireless/libertas/cmd.c +0 -2
@@ -1040,7 +1040,6 @@ int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action,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) {
@@ -1576,7 +1575,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
@@ -69,7 +69,6 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev);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
@@ -1351,8 +1350,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) {
@@ -1372,7 +1369,6 @@ static void lbs_remove_mesh(struct lbs_private *priv)free_netdev (mesh_dev);lbs_deb_leave (LBS_DEB_MESH ); } -EXPORT_SYMBOL_GPL (lbs_remove_mesh);/** * @brief This function finds the CFP in
@@ -1458,20 +1454,6 @@ void lbs_interrupt(struct lbs_private *priv) }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 );
A message that is not in the archive (sent off-list or not yet received): [email protected]
Dan Williams
Acked-byRe: [PATCH RESEND] libertas: Remove unused exports
Quoted 3 lines · Roland Dreier
Any chance of getting this applied? It seems the build is still broken on ia64 at least due to the export of static functions.
---
Normal route is to linux-wireless@...
However; if the symbols aren't used anywhere in drivers/net/wireless/libertas/*, it makes no sense to keep them around & exported.
Quoted 97 lines
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_meshcauses a section type conflictdrivers/net/wireless/libertas/main.c:1354: error:__ksymtab_lbs_add_meshcauses a section type conflictThis patch fixes this problem. I don't have hardware, so this is not run-tested, but I tested the build with
CONFIG_LIBERTAS=y
CONFIG_LIBERTAS_USB=m
CONFIG_LIBERTAS_CS=m
CONFIG_LIBERTAS_SDIO=mand there were no problems with undefined symbols.
Signed-off-by Roland Dreier <[email protected]>---
drivers/net/wireless/libertas/cmd.c +0
-2@@ -1040,7 +1040,6 @@ int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action,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) {@@ -1576,7 +1575,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@@ -69,7 +69,6 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev);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@@ -1351,8 +1350,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) {@@ -1372,7 +1369,6 @@ static void lbs_remove_mesh(struct lbs_private *priv)free_netdev (mesh_dev);lbs_deb_leave (LBS_DEB_MESH ); } -EXPORT_SYMBOL_GPL (lbs_remove_mesh);/** * @brief This function finds the CFP in @@ -1458,20 +1454,6 @@ void lbs_interrupt(struct lbs_private *priv) }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 );