diff options
author | Quentin Lambert <lambert.quentin@gmail.com> | 2015-02-06 12:59:53 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2015-03-03 16:13:20 +0300 |
commit | 2f119c7895af56ca26b8e94f4650145a4b1b0d12 (patch) | |
tree | c78e7a594d8ccaf516d6eeb7c20a1a3b4330640c /drivers/iommu/ipmmu-vmsa.c | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
download | linux-2f119c7895af56ca26b8e94f4650145a4b1b0d12.tar.xz |
iommu/vt-d: Convert non-returned local variable to boolean when relevant
This patch was produced using Coccinelle. A simplified version of the
semantic patch is:
@r exists@
identifier f;
local idexpression u8 x;
identifier xname;
@@
f(...) {
...when any
(
x@xname = 1;
|
x@xname = 0;
)
...when any
}
@bad exists@
identifier r.f;
local idexpression u8 r.x
expression e1 != {0, 1}, e2;
@@
f(...) {
...when any
(
x = e1;
|
x + e2
)
...when any
}
@depends on !bad@
identifier r.f;
local idexpression u8 r.x;
identifier r.xname;
@@
f(...) {
...
++ bool xname;
- int xname;
<...
(
x =
- 1
+ true
|
x =
- -1
+ false
)
...>
}
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/ipmmu-vmsa.c')
0 files changed, 0 insertions, 0 deletions