[RFC PATCH 2/4] fold is_simple_var() into simple_access()

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

 



---
 linearize.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/linearize.c b/linearize.c
index 9a7a71d3a..63c896fc7 100644
--- a/linearize.c
+++ b/linearize.c
@@ -978,16 +978,7 @@ static inline int is_simple_type(struct symbol *type)
 	return 0;
 }
 
-static inline int is_simple_var(struct symbol *var)
-{
-	if (!is_simple_type(var))
-		return 0;
 #define	MOD_NONREG	(MOD_STATIC|MOD_NONLOCAL|MOD_ADDRESSABLE|MOD_VOLATILE)
-	if (var->ctype.modifiers & MOD_NONREG)
-		return 0;
-	return 1;
-}
-
 static inline struct symbol *simple_access(struct access_data *ad)
 {
 	pseudo_t addr = ad->address;
@@ -996,7 +987,9 @@ static inline struct symbol *simple_access(struct access_data *ad)
 	if (addr->type != PSEUDO_SYM)
 		return NULL;
 	sym = addr->sym;
-	if (!is_simple_var(sym))
+	if (sym->ctype.modifiers & MOD_NONREG)
+		return NULL;
+	if (!is_simple_type(sym))
 		return NULL;
 	return sym;
 }
-- 
2.14.0

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



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux