From b2eab5e4d38ff87e1f6c5d3274422ab7a5cf8a4b Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Tue, 26 Oct 2010 00:25:36 +0000 Subject: [PATCH] drivers/net/typhoon.c: delete double assignment 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/) // @@ expression i; @@ *i = ...; i = ...; // Signed-off-by: Julia Lawall Acked-by: David Dillow Signed-off-by: David S. Miller --- drivers/net/typhoon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index b550da008a03f..5b83c3f35f47c 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c @@ -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; -- 2.39.5