Should loose underlayment nails be driven in or removed?
Are they ring shank nails? If so you should be ok hitting them back in. If not, I would remove and use deck screws to fasten the subfloor back down.