This helper simply check if an access is to a simple variable as defined by is_simple_var(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- linearize.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/linearize.c b/linearize.c index 3a1bc74ed..190c47241 100644 --- a/linearize.c +++ b/linearize.c @@ -912,6 +912,19 @@ static int linearize_address_gen(struct entrypoint *ep, return 0; } +static inline struct symbol *simple_access(struct access_data *ad) +{ + pseudo_t addr = ad->address; + struct symbol *sym; + + if (addr->type != PSEUDO_SYM) + return NULL; + sym = addr->sym; + if (!is_simple_var(sym)) + return NULL; + return sym; +} + static pseudo_t add_load(struct entrypoint *ep, struct access_data *ad) { struct instruction *insn; -- 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