All of lore.kernel.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Use kernel version min macro
@ 2010-11-08 23:53 Sven Eckelmann
  2010-11-08 23:53 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Use kernel functions to identify broadcasts Sven Eckelmann
  2010-11-17 16:26 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Use kernel version min macro Marek Lindner
  0 siblings, 2 replies; 7+ messages in thread
From: Sven Eckelmann @ 2010-11-08 23:53 UTC (permalink / raw)
  To: b.a.t.m.a.n

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>
---
 batman-adv/hard-interface.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/batman-adv/hard-interface.c b/batman-adv/hard-interface.c
index 5a1d631..e22f0dd 100644
--- a/batman-adv/hard-interface.c
+++ b/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:
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-11-17 16:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-08 23:53 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Use kernel version min macro Sven Eckelmann
2010-11-08 23:53 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Use kernel functions to identify broadcasts Sven Eckelmann
2010-11-09  8:32   ` Linus Lüssing
2010-11-09  9:20     ` Sven Eckelmann
2010-11-09  9:27   ` [B.A.T.M.A.N.] [PATCHv2 " Sven Eckelmann
2010-11-17 16:28     ` Marek Lindner
2010-11-17 16:26 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Use kernel version min macro Marek Lindner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.