Skip to content

Commit

Permalink
Staging: batman-adv: Use kernel version min macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sven Eckelmann authored and Greg Kroah-Hartman committed Nov 29, 2010
1 parent 003db3b commit 8cab2fb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/staging/batman-adv/hard-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 8cab2fb

Please sign in to comment.