From patchwork Tue Nov 16 14:31:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Graf X-Patchwork-Id: 71403 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B0337B713B for ; Wed, 17 Nov 2010 01:31:36 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933388Ab0KPObY (ORCPT ); Tue, 16 Nov 2010 09:31:24 -0500 Received: from canuck.infradead.org ([134.117.69.58]:46857 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933047Ab0KPObU (ORCPT ); Tue, 16 Nov 2010 09:31:20 -0500 Received: from tgr by canuck.infradead.org with local (Exim 4.72 #1 (Red Hat Linux)) id 1PIMZ6-0007Sn-3N; Tue, 16 Nov 2010 14:31:20 +0000 Date: Tue, 16 Nov 2010 09:31:20 -0500 From: Thomas Graf To: davem@davemloft.net Cc: netdev@vger.kernel.org Subject: [PATCH net-next 2/4] inet: Define IPV4_DEVCONF_MAX Message-ID: <20101116143120.GB26669@canuck.infradead.org> Mail-Followup-To: davem@davemloft.net, netdev@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-08-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by canuck.infradead.org See http://www.infradead.org/rpr.html Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Define IPV4_DEVCONF_MAX to get rid of MAX - 1 notation. Signed-off-by: Thomas Graf --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net-next-2.6/include/linux/inetdevice.h =================================================================== --- net-next-2.6.orig/include/linux/inetdevice.h +++ net-next-2.6/include/linux/inetdevice.h @@ -41,10 +41,12 @@ enum __IPV4_DEVCONF_MAX }; +#define IPV4_DEVCONF_MAX (__IPV4_DEVCONF_MAX - 1) + struct ipv4_devconf { void *sysctl; - int data[__IPV4_DEVCONF_MAX - 1]; - DECLARE_BITMAP(state, __IPV4_DEVCONF_MAX - 1); + int data[IPV4_DEVCONF_MAX]; + DECLARE_BITMAP(state, IPV4_DEVCONF_MAX); }; struct in_device { @@ -90,7 +92,7 @@ static inline void ipv4_devconf_set(stru static inline void ipv4_devconf_setall(struct in_device *in_dev) { - bitmap_fill(in_dev->cnf.state, __IPV4_DEVCONF_MAX - 1); + bitmap_fill(in_dev->cnf.state, IPV4_DEVCONF_MAX); } #define IN_DEV_CONF_GET(in_dev, attr) \