From patchwork Sun Nov 21 23:56:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 603 Return-Path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by open-mesh.org (Postfix) with SMTP id 4CB2F15458F for ; Mon, 22 Nov 2010 00:56:53 +0100 (CET) Received: (qmail invoked by alias); 21 Nov 2010 23:56:53 -0000 Received: from vpnclient-194-112.hrz.tu-chemnitz.de (EHLO sven-desktop.lazhur.ath.cx) [134.109.194.112] by mail.gmx.net (mp007) with SMTP; 22 Nov 2010 00:56:53 +0100 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX1/8Q4VwKIT880G7hY0MZtssyoaAkSGoeFPeQHtEEs Io8cxR4pr6tDW5 From: Sven Eckelmann To: greg@kroah.com Date: Mon, 22 Nov 2010 00:56:06 +0100 Message-Id: <1290383767-32602-29-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1290383767-32602-1-git-send-email-sven.eckelmann@gmx.de> References: <1290383767-32602-1-git-send-email-sven.eckelmann@gmx.de> X-Y-GMX-Trusted: 0 Cc: b.a.t.m.a.n@lists.open-mesh.org Subject: [B.A.T.M.A.N.] [PATCH 28/29] Staging: 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: Sun, 21 Nov 2010 23:56:54 -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 --- drivers/staging/batman-adv/hard-interface.c | 6 ++---- 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 ff0ac98..4f95777 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/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: