diff options
author | Sven Eckelmann <sven.eckelmann@gmx.de> | 2010-11-22 00:55:57 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-29 11:09:12 -0800 |
commit | 6d5e654240dc14ded3d74aa5df6857572ba9f5e3 (patch) | |
tree | 76896c59b112c792f21c847b9d192f9c846834f2 /drivers/staging/batman-adv/main.h | |
parent | 51f3d8a27c1a1ac6aced25ea93fc5c0520e9256c (diff) | |
download | op-kernel-dev-6d5e654240dc14ded3d74aa5df6857572ba9f5e3.zip op-kernel-dev-6d5e654240dc14ded3d74aa5df6857572ba9f5e3.tar.gz |
Staging: batman-adv: Remove hashdata_choose_cb from hash
Function pointers cannot be inlined by a compiler and thus always has
the overhead of an call. hashdata_choose_cb's are one of the most often
called function pointers and its overhead must kept relative low.
As first step, every function which uses this function pointer takes it
as parameter instead of storing it inside the hash abstraction
structure.
This not generate any performance gain right now. The called functions
must also be able to be inlined by the calling functions to enable
inlining of the function pointer.
Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/main.h')
-rw-r--r-- | drivers/staging/batman-adv/main.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/batman-adv/main.h b/drivers/staging/batman-adv/main.h index 97a74b0..3ee1eb0 100644 --- a/drivers/staging/batman-adv/main.h +++ b/drivers/staging/batman-adv/main.h @@ -135,7 +135,6 @@ int mesh_init(struct net_device *soft_iface); void mesh_free(struct net_device *soft_iface); void inc_module_count(void); void dec_module_count(void); -int choose_orig(void *data, int32_t size); int is_my_mac(uint8_t *addr); int is_bcast(uint8_t *addr); int is_mcast(uint8_t *addr); |