Skip to content

Commit

Permalink
drivers/net/typhoon.c: delete double assignment
Browse files Browse the repository at this point in the history
Delete successive assignments to the same location.  The current definition
does not initialize the respRing structure, which has the same type as the
cmdRing structure, so initialize that one instead.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression i;
@@

*i = ...;
 i = ...;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: David Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Julia Lawall authored and David S. Miller committed Oct 27, 2010
1 parent d58c0e9 commit 13c3ab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/typhoon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ typhoon_init_rings(struct typhoon *tp)
tp->rxHiRing.lastWrite = 0;
tp->rxBuffRing.lastWrite = 0;
tp->cmdRing.lastWrite = 0;
tp->cmdRing.lastWrite = 0;
tp->respRing.lastWrite = 0;

tp->txLoRing.lastRead = 0;
tp->txHiRing.lastRead = 0;
Expand Down

0 comments on commit 13c3ab8

Please sign in to comment.