Skip to contentSkip to conversation

DSPBRIDGE: replace init_timer with init_timer_on_stack

PATCH Applied Nishanth Menon 3 participants 3 messages Jan 20, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DSPBRIDGE: replace init_timer with init_timer_on_stack

With LOCK_DEP enabled and DEBUG_OBJECTS_TIMERS, DSPBridge SYNC_WaitOnMultipleEvents will fail with message "ODEBUG: object is on stack, but not annotated" since the timeout timer is on the stack, we should rightly use init_timer_on_stack.

Cc Ameya Palande <[email protected]>
Cc Deepak Chitriki <[email protected]>
Cc Felipe Contreras <[email protected]>
Cc Hiroshi Doyu <[email protected]>
Cc Omar Ramirez Luna <[email protected]>
---
 drivers/dsp/bridge/services/sync.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dsp/bridge/services/sync.c +1 -1
index c2d79c7..d246656 100644
@@ -330,7 +330,7 @@ DSP_STATUS SYNC_WaitOnMultipleEvents(struct SYNC_OBJECT **hSyncEvents,
 	if (Wp->state != wo_signalled && dwTimeout > 0) {
 		struct timer_list timeout;
 		if (dwTimeout != SYNC_INFINITE) {
-			init_timer(&timeout);
+			init_timer_on_stack(&timeout);
 			timeout.function = timeout_callback;
 			timeout.data = (unsigned long)Wp;
 			timeout.expires = jiffies + dwTimeout * HZ / 1000;
Signature · 1 line
1.6.3.3
Acked-by on v1 1/1
#1 lore raw
Quoted 22 lines · ext Nishanth Menon

With LOCK_DEP enabled and DEBUG_OBJECTS_TIMERS, DSPBridge SYNC_WaitOnMultipleEvents will fail with message "ODEBUG: object is on stack, but not annotated" since the timeout timer is on the stack, we should rightly use init_timer_on_stack.

Cc Ameya Palande <[email protected]>
Cc Deepak Chitriki <[email protected]>
Cc Felipe Contreras <[email protected]>
Cc Hiroshi Doyu <[email protected]>
Cc Omar Ramirez Luna <[email protected]>
---
 drivers/dsp/bridge/services/sync.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dsp/bridge/services/sync.c +0 -0
index c2d79c7..d246656 100644

drivers/dsp/bridge/services/sync.c DSP_STATUS SYNC_WaitOnMultipleEvents(struct SYNC_OBJECT **hSyncEvents, · line 336

Quoted 8 lines
drivers/dsp/bridge/services/sync.c +1 -1
@@ -330,7 +330,7 @@ DSP_STATUS SYNC_WaitOnMultipleEvents(struct SYNC_OBJECT **hSyncEvents,
 	if (Wp->state != wo_signalled && dwTimeout > 0) {
 		struct timer_list timeout;
 		if (dwTimeout != SYNC_INFINITE) {
-			init_timer(&timeout);
+			init_timer_on_stack(&timeout);
 			timeout.function = timeout_callback;
 			timeout.data = (unsigned long)Wp;
 			timeout.expires = jiffies + dwTimeout * HZ / 1000;
#2 lore raw
Quoted 20 lines

From: Ameya Palande on Wednesday, January 20, 2010 3:55 AM

Quoted 17 lines · ext Nishanth Menon

With LOCK_DEP enabled and DEBUG_OBJECTS_TIMERS, DSPBridge SYNC_WaitOnMultipleEvents will fail with message "ODEBUG: object is on stack, but not annotated" since the timeout timer is on the stack, we should rightly use init_timer_on_stack.

Cc Ameya Palande <[email protected]>
Cc Deepak Chitriki <[email protected]>
Cc Felipe Contreras <[email protected]>
Cc Hiroshi Doyu <[email protected]>
Cc Omar Ramirez Luna <[email protected]>
---
 drivers/dsp/bridge/services/sync.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 15 lines

drivers/dsp/bridge/services/sync.c DSP_STATUS SYNC_WaitOnMultipleEvents(struct SYNC_OBJECT **hSyncEvents, · line 336

Quoted 13 lines
drivers/dsp/bridge/services/sync.c +1 -1
index c2d79c7..d246656 100644
@@ -330,7 +330,7 @@ DSP_STATUS SYNC_WaitOnMultipleEvents(struct SYNC_OBJECT **hSyncEvents,
 	if (Wp->state != wo_signalled && dwTimeout > 0) {
 		struct timer_list timeout;
 		if (dwTimeout != SYNC_INFINITE) {
-			init_timer(&timeout);
+			init_timer_on_stack(&timeout);
 			timeout.function = timeout_callback;
 			timeout.data = (unsigned long)Wp;
 			timeout.expires = jiffies + dwTimeout * HZ / 1000;

Pushed to dspbridge

- omar