param_set: don't save if the parent is set
I was looking at pci_physfn() return states. That function looks like
this:
static inline struct pci_dev *pci_physfn(struct pci_dev *dev)
{
if (dev->is_virtfn)
dev = dev->physfn;
return dev;
}
The "dev = dev->physfn;" assignment is a struct assignment so we do about
2k fake assignments. When we're inserting these into the DB we have a
check to see if the parent was set, but in this case we don't record that
"dev" was set into the DB because it's on the stack. So now we store 2k
records to show that everything inside dev is changed which wastes a lot
of resources and is wrong because "dev" is stack.
Also I think it means that we save 2k states as PARAM_USED, I'm not totally
sure because there was another issue with NOSPEC where we were saving a
bunch of states where they weren't user data. Anyway, fixed now.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>