Automatic merge from submit-queue (batch tested with PRs 41074, 41147, 40854, 41167, 40045) Fix some funky funcs. This is code cleanup. Fix function declarations and remove stale comment.