Next March 25: net/netfilter/xt_LED build failure.
Subsystems (4)
Hi David,
Quoted 10 lines
Today's next randconfig build on x86 failed with following error.
net/netfilter/xt_LED.c:40: error: fieldnetfilter_led_triggerhas incomplete typenet/netfilter/xt_LED.c: In functionled_timeout_callback:net/netfilter/xt_LED.c:78: warning: unused variable ledinternalnet/netfilter/xt_LED.c: In functionled_tg_check:net/netfilter/xt_LED.c:102: error: implicit declaration of functionled_trigger_registernet/netfilter/xt_LED.c: In functionled_tg_destroy:net/netfilter/xt_LED.c:135: error: implicit declaration of functionled_trigger_unregister
Quoted 3 lines
CONFIG_LED_TRIGGERis 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’
---
linux-2.6.29/include/linux/leds.h +4 -3
@@ -73,9 +73,6 @@ extern void led_classdev_resume(struct l/* * LED Triggers */ -#ifdef CONFIG_LEDS_TRIGGERS - -#define TRIG_NAME_MAX 50struct 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);
linux-2.6.29/net/netfilter/xt_LED.c +6 -1
@@ -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 xtreturn true; +#ifdef CONFIG_LEDS_TRIGGERS exit_alloc:kfree (ledinternal); +#endif return false; }
@@ -132,7 +135,9 @@ static void led_tg_destroy(const structif (ledinfo->delay >0 )del_timer_sync (&ledinternal->timer); +#ifdef CONFIG_LEDS_TRIGGERS led_trigger_unregister (&ledinternal->netfilter_led_trigger); +#endif kfree (ledinternal); }
--
Regards--
Subrata
Quoted 14 lines · Subrata Modak
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<[email protected]>---
linux-2.6.29/net/netfilter/xt_LED.c static bool led_tg_check(const struct xt · line 102
Quoted 4 lines
linux-2.6.29/net/netfilter/xt_LED.c +1
-0@@ -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?
net/netfilter/Kconfig +1 -1
@@ -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