Staging: batman-adv: initialize static hash iterators
authorSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Sat, 2 Jan 2010 10:30:39 +0000 (11:30 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:42:35 +0000 (16:42 -0800)
commitb6c359767bc743a7b6830660daa8f7e5c4273ad8
tree103f486f27d4e9b586480272b2edffd61eebe34c
parent4ce21a7faf320bdb750a2e1639f8f2dbb27bdb89
Staging: batman-adv: initialize static hash iterators

instead of dynamically registering hash iterators, calling functions are
changed to register the iterator objects statically. The two advantages are:

 * no memory leaks when aborting from hash_iterate()
 * no calls to kmalloc/kfree, therefore a little faster/safer

Tested with 9 QEMU instances, no obvious regression found.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/hard-interface.c
drivers/staging/batman-adv/hash.c
drivers/staging/batman-adv/hash.h
drivers/staging/batman-adv/originator.c
drivers/staging/batman-adv/proc.c
drivers/staging/batman-adv/routing.c
drivers/staging/batman-adv/translation-table.c
drivers/staging/batman-adv/vis.c