Skip to contentSkip to conversation

properly declare onstack completion in iseries veth

PATCH In review Benjamin Herrenschmidt 3 participants 6 messages Apr 9, 2008 – Apr 10, 2008 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 5/6 properly declare onstack completion in iseries veth

The iSeries veth driver uses an on-stack struct completion that it initializes using the COMPLETION_INITIALIZER instead of COMPLETION_INITIALIZER_ONSTACK macro, causing problems with lockdep.

---

 drivers/net/iseries_veth.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/iseries_veth.c +2 -1
@@ -308,7 +308,8 @@ static void veth_complete_allocation(voi
 
 static int veth_allocate_events(HvLpIndex rlp, int number)
 {
-	struct veth_allocation vc = { COMPLETION_INITIALIZER(vc.c), 0 };
+	struct veth_allocation vc =
+		{ COMPLETION_INITIALIZER_ONSTACK(vc.c), 0 };
 
 	mf_allocate_lp_events(rlp, HvLpEvent_Type_VirtualLan,
 			    sizeof(struct veth_lpevent), number,
#1 lore raw
Quoted 4 lines · Benjamin Herrenschmidt

The iSeries veth driver uses an on-stack struct completion that it initializes using the COMPLETION_INITIALIZER instead of COMPLETION_INITIALIZER_ONSTACK macro, causing problems with lockdep.

should probably go in ASAP independent of the lockdep series.

#2 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 4 lines · Benjamin Herrenschmidt

The iSeries veth driver uses an on-stack struct completion that it initializes using the COMPLETION_INITIALIZER instead of COMPLETION_INITIALIZER_ONSTACK macro, causing problems with lockdep.

should probably go in ASAP independent of the lockdep series.

I don't think there's any difference between the _ONSTACK variant and the normal one without lockdep, is there ?

Cheers,
Ben.

#3 lore raw
Quoted 2 lines · Benjamin Herrenschmidt

I don't think there's any difference between the _ONSTACK variant and the normal one without lockdep, is there ?

No there's not. Thus it's a guaranteed no-op and can easily go in.

#4 lore raw
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines · Benjamin Herrenschmidt

I don't think there's any difference between the _ONSTACK variant and the normal one without lockdep, is there ?

No there's not. Thus it's a guaranteed no-op and can easily go in.

Heh, I won't argue either way :-) It's Paul's call at this stage.

Cheers,
Ben.

Acked-by on v1 5/6
#5 lore raw
In reply to Benjamin Herrenschmidt
Quoted 7 lines · On Wed, 09 Apr 2008 17:21:34 +1000 Benjamin Herrenschmidt <[email protected]>…

The iSeries veth driver uses an on-stack struct completion that it initializes using the COMPLETION_INITIALIZER instead of COMPLETION_INITIALIZER_ONSTACK macro, causing problems with lockdep.

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/