diff options
author | Quentin Lambert <lambert.quentin@gmail.com> | 2015-02-04 13:40:07 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2015-02-04 18:26:39 +0300 |
commit | ae0cbbb1cde1f1bc2454a138a5cab1887d0e103c (patch) | |
tree | ebeb25eff4d2104904b3fce036cc4575f5338f9b /drivers/iommu/amd_iommu_v2.c | |
parent | a1bec062c90456983225054d39c8a601db48e638 (diff) | |
download | linux-ae0cbbb1cde1f1bc2454a138a5cab1887d0e103c.tar.xz |
iommu/amd: 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/amd_iommu_v2.c')
0 files changed, 0 insertions, 0 deletions