summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@gmx.de>2010-11-22 00:56:06 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-29 11:09:14 -0800
commit8cab2fbe6dacfdd3b122c450d2fffde6ac06a8b6 (patch)
tree303af9c7efe9531a5532752b4ebbe826d74ca425
parent003db3b2ad61c2964d624b0786cf8202e9a92c8e (diff)
Staging: batman-adv: Use kernel version min macro
The kernel headers already provide different versions of a min/max macro which should be used by all modules according to Documentation/CodingStyle. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/batman-adv/hard-interface.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c
index ff0ac9825001..4f95777ce080 100644
--- a/drivers/staging/batman-adv/hard-interface.c
+++ b/drivers/staging/batman-adv/hard-interface.c
@@ -31,8 +31,6 @@
#include <linux/if_arp.h>
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
-
/* protect update critical side of if_list - but not the content */
static DEFINE_SPINLOCK(if_list_lock);
@@ -220,8 +218,8 @@ int hardif_min_mtu(struct net_device *soft_iface)
if (batman_if->soft_iface != soft_iface)
continue;
- min_mtu = MIN(batman_if->net_dev->mtu - BAT_HEADER_LEN,
- min_mtu);
+ min_mtu = min_t(int, batman_if->net_dev->mtu - BAT_HEADER_LEN,
+ min_mtu);
}
rcu_read_unlock();
out: