Re: [PATCH] power: cpupower: utils: Optimize print_online_cpus and print_offline_cpus function

From: Li kunyu
Date: Wed Oct 12 2022 - 22:02:08 EST



I'm glad to get your reply. In previous tests, it was found that variable initialization and assignment use mov related instructions. Therefore, when I analyze the code and find that removing some variable initialization and assignment does not affect the function and security, I will try to remove variable initialization.

Find the malloc function and find that its return value is void * type, so it does not need to cast.

thanks,
kunyu