[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e2043b9-c7fa-236e-de19-5e290deebbdf@linuxfoundation.org>
Date: Thu, 13 Oct 2022 09:58:06 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: kunyu@...china.com
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
ray.huang@....com, shuah@...nel.org, trenn@...e.com,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] power: cpupower: utils: Optimize print_online_cpus and
print_offline_cpus function
On 10/12/22 20:01, Li kunyu wrote:
>
> 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
>
I am not seeing any reasons for removing the initialization.
There is no need to do that.
Missing error handling after malloc() call is the real problem
that can be fixed in this code path.
If you would like to fix that, send me a patch for that.
Hmm. Your reply to list looks strange - please double check and fix it
"Re:[PATCH]"@lists.nfsmail.com etc...
thanks,
-- Shuah
Powered by blists - more mailing lists