extra: improve get_other_name_sym()
commit3071e47aaca7000e11b7019c3c8db20ff6259442
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 23 Jan 2019 15:25:50 +0000 (23 18:25 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 23 Jan 2019 15:25:50 +0000 (23 18:25 +0300)
treecadbb242ffbc3bf4bf1339b0e4684926bb6c20de
parentec773e2217f3fcd837345426b871176849ea21f2
extra: improve get_other_name_sym()

This code used to work to map simple assignments.  "a = b; a->foo = 1;"
That means "b->foo" is now 1 as well.  But what about if instead of "a = b;"
we had "xxx->a = b;".  That case wasn't handled.  In the kernel we had
some code like:

        sprd_pctl->info = pinctrl_info;
        ret = sprd_pinctrl_add_pins(sprd_pctl, sprd_soc_pin_info, pins_cnt);

The sprd_pinctrl_add_pins() sets sprd_pctl->info->pins but the caller
refers to pinctrl_info->pins instead.  So we need to track that they are
the same.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_extra.c