Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761560AbXLMGom (ORCPT ); Thu, 13 Dec 2007 01:44:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759290AbXLMGhp (ORCPT ); Thu, 13 Dec 2007 01:37:45 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:56443 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759251AbXLMGhn (ORCPT ); Thu, 13 Dec 2007 01:37:43 -0500 Date: Wed, 12 Dec 2007 22:34:55 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org, bunk@kernel.org, davem@davemloft.net Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Herbert Xu Subject: [patch 20/36] IPV4: Remove bogus ifdef mess in arp_process Message-ID: <20071213063455.GU25301@kroah.com> References: <20071213062511.265908583@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="ipv4-remove-bogus-ifdef-mess-in-arp_process.patch" In-Reply-To: <20071213063308.GA25301@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2683 Lines: 94 2.6.22-stable review patch. If anyone has any objections, please let us know. ------------------ From: Adrian Bunk [IPV4]: Remove bogus ifdef mess in arp_process [ Upstream commit: 3660019e5f96fd9a8b7d4214a96523c0bf7b676d ] The #ifdef's in arp_process() were not only a mess, they were also wrong in the CONFIG_NET_ETHERNET=n and (CONFIG_NETDEV_1000=y or CONFIG_NETDEV_10000=y) cases. Since they are not required this patch removes them. Also removed are some #ifdef's around #include's that caused compile errors after this change. Signed-off-by: Adrian Bunk Signed-off-by: Herbert Xu Cc: David Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/arp.c | 19 ------------------- 1 file changed, 19 deletions(-) --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -110,12 +110,8 @@ #include #include #include -#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) #include -#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) #include -#endif -#endif #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE) #include struct neigh_table *clip_tbl_hook; @@ -729,20 +725,10 @@ static int arp_process(struct sk_buff *s htons(dev_type) != arp->ar_hrd) goto out; break; -#ifdef CONFIG_NET_ETHERNET case ARPHRD_ETHER: -#endif -#ifdef CONFIG_TR case ARPHRD_IEEE802_TR: -#endif -#ifdef CONFIG_FDDI case ARPHRD_FDDI: -#endif -#ifdef CONFIG_NET_FC case ARPHRD_IEEE802: -#endif -#if defined(CONFIG_NET_ETHERNET) || defined(CONFIG_TR) || \ - defined(CONFIG_FDDI) || defined(CONFIG_NET_FC) /* * ETHERNET, Token Ring and Fibre Channel (which are IEEE 802 * devices, according to RFC 2625) devices will accept ARP @@ -757,21 +743,16 @@ static int arp_process(struct sk_buff *s arp->ar_pro != htons(ETH_P_IP)) goto out; break; -#endif -#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) case ARPHRD_AX25: if (arp->ar_pro != htons(AX25_P_IP) || arp->ar_hrd != htons(ARPHRD_AX25)) goto out; break; -#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) case ARPHRD_NETROM: if (arp->ar_pro != htons(AX25_P_IP) || arp->ar_hrd != htons(ARPHRD_NETROM)) goto out; break; -#endif -#endif } /* Understand only these message types */ -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/