Reduce duplication and remove redundant push/popping.
Reduce duplication and remove redundant push/popping.

beni55/kernel-scripts,lorenzo-stoakes/kernel-scripts,chubbymaggie/kernel-scripts,GusBricker/kernel-scripts