From: Shuah Khan <skhan@linuxfoundation.org>
To: kunyu@nfschina.com
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
ray.huang@amd.com, shuah@kernel.org, trenn@suse.com,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] power: cpupower: utils: Optimize print_online_cpus and print_offline_cpus function
Date: Thu, 13 Oct 2022 09:58:06 -0600 [thread overview]
Message-ID: <7e2043b9-c7fa-236e-de19-5e290deebbdf@linuxfoundation.org> (raw)
In-Reply-To: <20221013020121.2874-1-kunyu@nfschina.com>
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
next prev parent reply other threads:[~2022-10-13 15:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 10:10 [PATCH] power: cpupower: utils: Optimize print_online_cpus and print_offline_cpus function Li kunyu
2022-10-12 15:39 ` Shuah Khan
2022-10-13 1:49 ` Li kunyu
2022-10-13 2:01 ` [PATCH] power: cpupower: utils: Optimize print_online_cpus and print_offline_cpus function Li kunyu
2022-10-13 15:58 ` Shuah Khan [this message]
2022-10-14 3:49 ` Li kunyu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e2043b9-c7fa-236e-de19-5e290deebbdf@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=kunyu@nfschina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=ray.huang@amd.com \
--cc=shuah@kernel.org \
--cc=trenn@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox