Skip to contentSkip to conversation

Label unused warning when CONFIG_PROC_FS is not set.

PATCH New Rami Rosen 1 participant 1 message Feb 5, 2008

Subsystems (2)
lore
Share & tools
lore

Rami Rosen

author
#0 lore raw

PATCH 1/1 Label unused warning when CONFIG_PROC_FS is not set.

---------- Forwarded message ----------
From: Rami Rosen <[email protected]>
Date: Feb 5, 2008 2:15 PM
Subject: [PATCH] [PPPOL2TP] Label unused warning when CONFIG_PROC_FS is not set.
To: [email protected], [email protected], [email protected]

Hi,

When CONFIG_PROC_FS is not set and CONFIG_PPPOL2TP is set, we have the following warning in build:
drivers/net/pppol2tp.c: In function 'pppol2tp_init':
drivers/net/pppol2tp.c:2472: warning: label
'out_unregister_pppox_proto' defined but not used

This patch fixes this warning by adding appropriate #ifdef.

Regards,
Rami Rosen

drivers/net/pppol2tp.c +2 -1
index 1b51bb6..5aa0a80 100644
@@ -2468,9 +2468,10 @@ static int __init pppol2tp_init(void)
 
 out:
 	return err;
-
+#ifdef CONFIG_PROC_FS
 out_unregister_pppox_proto:
 	unregister_pppox_proto(PX_PROTO_OL2TP);
+#endif
 out_unregister_pppol2tp_proto:
 	proto_unregister(&pppol2tp_sk_proto);
 	goto out;