[lvm-devel] [PATCH 10/12] Remove constant expression check
Zdenek Kabelac
zkabelac at redhat.com
Wed Nov 16 13:22:57 UTC 2011
"result_independent_of_operands: ((dev->dev & 0xfff00UL) >> 8) ==
18446744073709551615UL /* -1 */ is always false regardless of the values
of its operands (logical operand of if)."
'dev->dev' is set in dev-cache.c _insert() and it's not expectable
st_rdev would have '-1'
Thought even if it would - it'd be still missed it by macro
transformation.
My proposal is to remove this check competely.
For linux it's noop anyway.
Signed-off-by: Zdenek Kabelac <zkabelac at redhat.com>
---
lib/filters/filter.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/lib/filters/filter.c b/lib/filters/filter.c
index c66939a..4c3d3b7 100644
--- a/lib/filters/filter.c
+++ b/lib/filters/filter.c
@@ -64,9 +64,6 @@ int dev_subsystem_part_major(const struct device *dev)
{
dev_t primary_dev;
- if (MAJOR(dev->dev) == -1)
- return 0;
-
if (MAJOR(dev->dev) == _md_major)
return 1;
--
1.7.7.3
More information about the lvm-devel
mailing list