https://github.com/torvalds/linux
Revision 07fb6f26bab869fc3bb9df0a785ba734f4c51ac3 authored by Julia Lawall on 04 March 2008, 22:29:17 UTC, committed by Linus Torvalds on 05 March 2008, 00:35:15 UTC
In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337 ("wmi: (!x & y)
strikes again"), a bug was fixed that involved converting !x & y to !(x
& y).  The code below shows the same pattern, and thus should perhaps be
fixed in the same way.

This is not tested and clearly changes the semantics, so it is only
something to consider.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E1,E2; @@
(
  !E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent fb59e9f
History
Tip revision: 07fb6f26bab869fc3bb9df0a785ba734f4c51ac3 authored by Julia Lawall on 04 March 2008, 22:29:17 UTC
drivers/char/isicom.c: correct use of ! and &
Tip revision: 07fb6f2
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 644 bytes
.mailmap -rw-r--r-- 3.6 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 90.4 KB
Kbuild -rw-r--r-- 1.6 KB
MAINTAINERS -rw-r--r-- 95.1 KB
Makefile -rw-r--r-- 52.8 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top