OpenVZ Forum


Home » Mailing lists » Devel » [PATCH][IRDA] Compilation for CONFIG_INET=n case
[PATCH][IRDA] Compilation for CONFIG_INET=n case [message #23663] Wed, 21 November 2007 16:03 Go to next message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
Found this occasionally. 

The CONFIG_INET=n is hardly ever set, but if it is the 
irlan_eth_send_gratuitous_arp() compilation should produce a 
warning about unused variable in_dev.

Too pedantic? :)

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c
index 7f9c854..c682207 100644
--- a/net/irda/irlan/irlan_eth.c
+++ b/net/irda/irlan/irlan_eth.c
@@ -296,6 +296,7 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
  */
 void irlan_eth_send_gratuitous_arp(struct net_device *dev)
 {
+#ifdef CONFIG_INET
 	struct in_device *in_dev;
 
 	/*
@@ -303,7 +304,6 @@ void irlan_eth_send_gratuitous_arp(struct net_device *dev)
 	 * is useful if we have changed access points on the same
 	 * subnet.
 	 */
-#ifdef CONFIG_INET
 	IRDA_DEBUG(4, "IrLAN: Sending gratuitous ARP\n");
 	rcu_read_lock();
 	in_dev = __in_dev_get_rcu(dev);
Re: [PATCH][IRDA] Compilation for CONFIG_INET=n case [message #23692 is a reply to message #23663] Thu, 22 November 2007 11:18 Go to previous message
Herbert Xu is currently offline  Herbert Xu
Messages: 45
Registered: April 2007
Member
On Wed, Nov 21, 2007 at 07:03:16PM +0300, Pavel Emelyanov wrote:
> Found this occasionally. 
> 
> The CONFIG_INET=n is hardly ever set, but if it is the 
> irlan_eth_send_gratuitous_arp() compilation should produce a 
> warning about unused variable in_dev.
> 
> Too pedantic? :)
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Not too pedantic yet, please keep trying :)

Applied to net-2.6.  Thanks!
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Previous Topic: [PATCH] proc: use BUG_ON() in de_put()
Next Topic: [RFC][PATCH] memory controller per zone patches take 2 [0/10] introduction
Goto Forum:
  


Current Time: Wed May 31 01:09:02 GMT 2023

Total time taken to generate the page: 0.01286 seconds