Powered by Linux
[PATCH 1/5] check_kernel_printf.c: use get_real_base_type in typedef_lookup — Semantic Matching Tool

[PATCH 1/5] check_kernel_printf.c: use get_real_base_type in typedef_lookup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since gfp_t is a typedef to a __bitwise type, the type we currently
return is not the same as the basetype we compare to in flagstring()
(namely uint), giving confusing false positives.

Signed-off-by: Rasmus Villemoes <rv@xxxxxxxxxxxxxxxxxx>
---
 check_kernel_printf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/check_kernel_printf.c b/check_kernel_printf.c
index ed1fdd8c..715e7b42 100644
--- a/check_kernel_printf.c
+++ b/check_kernel_printf.c
@@ -336,7 +336,7 @@ static struct symbol *_typedef_lookup(const char *name)
 	node = lookup_symbol(id, NS_TYPEDEF);
 	if (!node || node->type != SYM_NODE)
 		return NULL;
-	return node->ctype.base_type;
+	return get_real_base_type(node);
 }
 
 static void typedef_lookup(struct typedef_lookup *tl)
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe smatch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux