[RFC PATCH 23/48] mem2reg: simplify check of modifiers for external visibility

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

 



---
 mem2reg.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/mem2reg.c b/mem2reg.c
index 0567e98fe..2309d11c1 100644
--- a/mem2reg.c
+++ b/mem2reg.c
@@ -252,12 +252,14 @@ static void promote_symbol(struct entrypoint *ep, struct symbol *sym)
 	if (!pseudo)
 		return;
 
+	mod = sym->ctype.modifiers;
+
 	/* We don't do coverage analysis of volatiles.. */
-	if (sym->ctype.modifiers & MOD_VOLATILE)
+	if (mod & MOD_VOLATILE)
 		return;
 
 	/* ..and symbols with external visibility need more care */
-	mod = sym->ctype.modifiers & (MOD_NONLOCAL | MOD_STATIC | MOD_ADDRESSABLE);
+	mod = mod & (MOD_NONLOCAL|MOD_STATIC|MOD_ADDRESSABLE);
 	if (mod)
 		goto external_visibility;
 
-- 
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