提交 8cab2fbe 编写于 作者: S Sven Eckelmann 提交者: Greg Kroah-Hartman

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: NSven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 003db3b2
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册