All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] delete double assignment
@ 2014-08-23 18:33 ` Julia Lawall
  0 siblings, 0 replies; 30+ messages in thread
From: Julia Lawall @ 2014-08-23 18:33 UTC (permalink / raw)
  To: linux-mips
  Cc: joe, kernel-janitors, linux-kernel, linux-fbdev, linux-serial, linux-usb

These patches fix cases where there are two adjacent assignments to the
same location.  In practice, many such occurrences appear to be
intentional, eg to initialize volatile memory, but these cases do not seem
to fall into that category.

The complete semantic match that finds these problems is as follows:

// <smpl>
@r@
expression i,f;
position p1,p2;
@@

(
 i = <+...f(...)...+>;
|
 i |= <+...f(...)...+>;
|
 i &= <+...f(...)...+>;
|
 i += <+...f(...)...+>;
|
 i -= <+...f(...)...+>;
|
 i *= <+...f(...)...+>;
|
 i /= <+...f(...)...+>;
|
 i %= <+...f(...)...+>;
|
 i ^= <+...f(...)...+>;
|
 i <<= <+...f(...)...+>;
|
 i >>= <+...f(...)...+>;
|
 i@p1 = ...;
|
 i@p1 |= ...;
|
 i@p1 &= ...;
|
 i@p1 += ...;
|
 i@p1 -= ...;
|
 i@p1 *= ...;
|
 i@p1 /= ...;
|
 i@p1 %= ...;
|
 i@p1 ^= ...;
|
 i@p1 <<= ...;
|
 i@p1 >>= ...;
|
 i@p1 ++;
|
 ++i@p1;
|
 i@p1 --;
|
 --i@p1;
)
(
 i = <+...i...+>;
|
 i = <+...f(...)...+>;
|
 i@p2 = ...;
)

@@
expression i,j,f;
position r.p1,r.p2;
@@

(
 (<+...i@p1...+>);
)
(
 (<+...\(j++\|++j\|j--\|--j\|f(...)\)...+>) = ...;
|
*i@p2 = ...;
)
// </smpl>


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

end of thread, other threads:[~2014-08-26 10:56 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-23 18:33 [PATCH 0/7] delete double assignment Julia Lawall
2014-08-23 18:33 ` Julia Lawall
2014-08-23 18:33 ` [PATCH 1/7] video: fbdev: riva: " Julia Lawall
2014-08-23 18:33   ` Julia Lawall
2014-08-23 18:33 ` [PATCH 2/7] video: fbdev: intelfb: " Julia Lawall
2014-08-23 18:33   ` Julia Lawall
2014-08-26 10:56   ` Tomi Valkeinen
2014-08-26 10:56     ` Tomi Valkeinen
2014-08-23 18:33 ` [PATCH 3/7] serial: vr41xx_siu: " Julia Lawall
2014-08-23 18:33   ` Julia Lawall
2014-08-23 18:33 ` [PATCH 4/7] MIPS: BCM63xx: " Julia Lawall
2014-08-23 18:33   ` Julia Lawall
2014-08-25 11:27   ` Ralf Baechle
2014-08-25 11:27     ` Ralf Baechle
2014-08-25 19:09     ` Jonas Gorski
2014-08-25 19:09       ` Jonas Gorski
2014-08-23 18:33 ` [PATCH 5/7] wusb: " Julia Lawall
2014-08-23 18:33   ` Julia Lawall
2014-08-23 18:33 ` [PATCH 6/7] video: fbdev: sis: " Julia Lawall
2014-08-23 18:33   ` Julia Lawall
2014-08-24 18:21   ` Geert Uytterhoeven
2014-08-24 18:21     ` Geert Uytterhoeven
2014-08-24 18:40     ` Julia Lawall
2014-08-24 18:40       ` Julia Lawall
2014-08-25 11:36       ` Geert Uytterhoeven
2014-08-25 11:36         ` Geert Uytterhoeven
2014-08-26 10:51     ` Tomi Valkeinen
2014-08-26 10:51       ` Tomi Valkeinen
2014-08-23 18:33 ` [PATCH 7/7] MIPS: Alchemy: au1200fb: " Julia Lawall
2014-08-23 18:33   ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.