From patchwork Mon Nov 8 23:53:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 528 Return-Path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by open-mesh.org (Postfix) with SMTP id 30ED71543BC for ; Tue, 9 Nov 2010 00:51:00 +0100 (CET) Received: (qmail invoked by alias); 08 Nov 2010 23:50:59 -0000 Received: from i5882A5B2.versanet.de (EHLO sven-desktop.lazhur.ath.cx) [88.130.165.178] by mail.gmx.net (mp035) with SMTP; 09 Nov 2010 00:50:59 +0100 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX19tUjxbXnhtThRqx7LDrrw7unG62wARa2JDBwjyaU LQMPXO27kBbkhY From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 9 Nov 2010 00:53:00 +0100 Message-Id: <1289260381-6415-1-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.2.3 X-Y-GMX-Trusted: 0 Subject: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Use kernel version min macro X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2010 23:51:00 -0000 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 --- 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 -#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: