netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Re: Next March 25: net/netfilter/xt_LED build failure.
@ 2009-03-25 13:57 Subrata Modak
  2009-03-25 14:08 ` Patrick McHardy
  0 siblings, 1 reply; 4+ messages in thread
From: Subrata Modak @ 2009-03-25 13:57 UTC (permalink / raw)
  To: David S. Miller
  Cc: Sachin Sant, Subrata Modak, netdev, linux-next, Stephen Rothwell,
	LKML

Hi David,

>Today's next randconfig build on x86 failed with following error.
>
>net/netfilter/xt_LED.c:40: error: field netfilter_led_trigger has incomplete type
>net/netfilter/xt_LED.c: In function led_timeout_callback:
>net/netfilter/xt_LED.c:78: warning: unused variable ledinternal
>net/netfilter/xt_LED.c: In function led_tg_check:
>net/netfilter/xt_LED.c:102: error: implicit declaration of function led_trigger_register
>net/netfilter/xt_LED.c: In function led_tg_destroy:
>net/netfilter/xt_LED.c:135: error: implicit declaration of function led_trigger_unregister
>
>CONFIG_LED_TRIGGER is not set.
>
>complete .config attached.

The following patch will solve the build problem reported by Sachin.
But would leave the following warnings. I hope we can ignore them:

net/netfilter/xt_LED.c: In function ‘led_timeout_callback’:
net/netfilter/xt_LED.c:78: warning: unused variable ‘ledinternal’
net/netfilter/xt_LED.c: In function ‘led_tg_check’:
net/netfilter/xt_LED.c:87: warning: unused variable ‘err’

Signed-Off-By: Subrata Modak<subrata@linux.vnet.ibm.com>
---

--- a/linux-2.6.29/include/linux/leds.h	2009-03-25 18:38:07.000000000 +0530
+++ b/linux-2.6.29/include/linux/leds.h	2009-03-25 18:24:55.000000000 +0530
@@ -73,9 +73,6 @@ extern void led_classdev_resume(struct l
 /*
  * LED Triggers
  */
-#ifdef CONFIG_LEDS_TRIGGERS
-
-#define TRIG_NAME_MAX 50
 
 struct led_trigger {
 	/* Trigger Properties */
@@ -91,6 +88,10 @@ struct led_trigger {
 	struct list_head  next_trig;
 };
 
+#ifdef CONFIG_LEDS_TRIGGERS
+
+#define TRIG_NAME_MAX 50
+
 /* Registration functions for complex triggers */
 extern int led_trigger_register(struct led_trigger *trigger);
 extern void led_trigger_unregister(struct led_trigger *trigger);
--- a/linux-2.6.29/net/netfilter/xt_LED.c	2009-03-25 18:38:08.000000000 +0530
+++ b/linux-2.6.29/net/netfilter/xt_LED.c	2009-03-25 18:26:55.000000000 +0530
@@ -99,6 +99,7 @@ static bool led_tg_check(const struct xt
 
 	ledinternal->netfilter_led_trigger.name = ledinfo->id;
 
+#ifdef CONFIG_LEDS_TRIGGERS
 	err = led_trigger_register(&ledinternal->netfilter_led_trigger);
 	if (err) {
 		printk(KERN_CRIT KBUILD_MODNAME
@@ -108,7 +109,7 @@ static bool led_tg_check(const struct xt
 				": Trigger name is already in use.\n");
 		goto exit_alloc;
 	}
-
+#endif
 	/* See if we need to set up a timer */
 	if (ledinfo->delay > 0)
 		setup_timer(&ledinternal->timer, led_timeout_callback,
@@ -118,8 +119,10 @@ static bool led_tg_check(const struct xt
 
 	return true;
 
+#ifdef CONFIG_LEDS_TRIGGERS
 exit_alloc:
 	kfree(ledinternal);
+#endif
 
 	return false;
 }
@@ -132,7 +135,9 @@ static void led_tg_destroy(const struct 
 	if (ledinfo->delay > 0)
 		del_timer_sync(&ledinternal->timer);
 
+#ifdef CONFIG_LEDS_TRIGGERS
 	led_trigger_unregister(&ledinternal->netfilter_led_trigger);
+#endif
 	kfree(ledinternal);
 }

--
Regards--
Subrata
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Re: Next March 25: net/netfilter/xt_LED build failure.
  2009-03-25 13:57 [PATCH] Re: Next March 25: net/netfilter/xt_LED build failure Subrata Modak
@ 2009-03-25 14:08 ` Patrick McHardy
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2009-03-25 14:08 UTC (permalink / raw)
  To: Subrata Modak
  Cc: David S. Miller, Sachin Sant, netdev, linux-next,
	Stephen Rothwell, LKML, Adam Nielsen

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

Subrata Modak wrote:
> The following patch will solve the build problem reported by Sachin.
> But would leave the following warnings. I hope we can ignore them:
> 
> net/netfilter/xt_LED.c: In function �led_timeout_callback�:
> net/netfilter/xt_LED.c:78: warning: unused variable �ledinternal�
> net/netfilter/xt_LED.c: In function �led_tg_check�:
> net/netfilter/xt_LED.c:87: warning: unused variable �err�
> 
> Signed-Off-By: Subrata Modak<subrata@linux.vnet.ibm.com>
> ---
> 
> --- a/linux-2.6.29/net/netfilter/xt_LED.c	2009-03-25 18:38:08.000000000 +0530
> +++ b/linux-2.6.29/net/netfilter/xt_LED.c	2009-03-25 18:26:55.000000000 +0530
> @@ -99,6 +99,7 @@ static bool led_tg_check(const struct xt
>  
>  	ledinternal->netfilter_led_trigger.name = ledinfo->id;
>  
> +#ifdef CONFIG_LEDS_TRIGGERS
...


Does this patch fix it?

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 437 bytes --]

diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index 2562d05..2c967e4 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -374,7 +374,7 @@ config NETFILTER_XT_TARGET_HL
 
 config NETFILTER_XT_TARGET_LED
 	tristate '"LED" target support'
-	depends on LEDS_CLASS
+	depends on LEDS_CLASS && LED_TRIGGERS
 	depends on NETFILTER_ADVANCED
 	help
 	  This option adds a `LED' target, which allows you to blink LEDs in

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Re: Next March 25: net/netfilter/xt_LED build failure.
@ 2009-03-25 14:31 Subrata Modak
  2009-03-25 14:34 ` Patrick McHardy
  0 siblings, 1 reply; 4+ messages in thread
From: Subrata Modak @ 2009-03-25 14:31 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: Sachin Sant, Subrata Modak, netdev, David S. Miller, linux-next,
	Adam Nielsen, Stephen Rothwell, LKML

Hi Patrick,

>Does this patch fix it?

Sorry, yes it does for make. But i was executing:

make net/netfilter/xt_LED.o

>
><diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
>index 2562d05..2c967e4 100644
>--- a/net/netfilter/Kconfig
>+++ b/net/netfilter/Kconfig
>@@ -374,7 +374,7 @@ config NETFILTER_XT_TARGET_HL
>
> config NETFILTER_XT_TARGET_LED
>       tristate '"LED" target support'
>-       depends on LEDS_CLASS
>+       depends on LEDS_CLASS && LED_TRIGGERS
>       depends on NETFILTER_ADVANCED
>       help
>         This option adds a `LED' target, which allows you to blink LEDs in

Thanks.

Regards--
Subrata

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Re: Next March 25: net/netfilter/xt_LED build failure.
  2009-03-25 14:31 Subrata Modak
@ 2009-03-25 14:34 ` Patrick McHardy
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2009-03-25 14:34 UTC (permalink / raw)
  To: Subrata Modak
  Cc: Sachin Sant, netdev, David S. Miller, linux-next, Adam Nielsen,
	Stephen Rothwell, LKML

Subrata Modak wrote:
> Hi Patrick,
> 
>> Does this patch fix it?
> 
> Sorry, yes it does for make. But i was executing:

Thanks for testing.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-25 14:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-25 13:57 [PATCH] Re: Next March 25: net/netfilter/xt_LED build failure Subrata Modak
2009-03-25 14:08 ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2009-03-25 14:31 Subrata Modak
2009-03-25 14:34 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).