netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: irda: delete double assignment
@ 2014-07-28 15:28 Himangi Saraogi
  2014-07-29 22:47 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Himangi Saraogi @ 2014-07-28 15:28 UTC (permalink / raw)
  To: Samuel Ortiz, David S. Miller, netdev, linux-kernel; +Cc: julia.lawall

Delete successive assignments to the same location.

A simplified version of Coccinelle semantic match that finds this problem is as
follows:

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

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

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
---
Should the second assignment have been |=?
 net/irda/irlap_frame.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
index 9ea0c93..4c169f6 100644
--- a/net/irda/irlap_frame.c
+++ b/net/irda/irlap_frame.c
@@ -621,7 +621,6 @@ void irlap_send_rd_frame(struct irlap_cb *self)
 
 	frame = (struct rd_frame *)skb_put(tx_skb, 2);
 
-	frame->caddr = self->caddr;
 	frame->caddr = RD_RSP | PF_BIT;
 
 	irlap_queue_xmit(self, tx_skb);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-29 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-28 15:28 [PATCH] net: irda: delete double assignment Himangi Saraogi
2014-07-29 22:47 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).