From: Dave Hansen <dave.hansen@intel.com>
To: Yejune Deng <yejune.deng@gmail.com>,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com,
yu-cheng.yu@intel.com, tony.luck@intel.com, fenghua.yu@intel.com,
kan.liang@linux.intel.com, viro@zeniv.linux.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/fpu/xstate: calculate the number by sizeof and offsetof
Date: Tue, 19 Jan 2021 22:49:18 -0800 [thread overview]
Message-ID: <26c1f5be-7232-3e2b-dcbb-367ff0bbdbb8@intel.com> (raw)
In-Reply-To: <20210120064415.16977-1-yejune.deng@gmail.com>
On 1/19/21 10:44 PM, Yejune Deng wrote:
> In fpstate_sanitize_xstate(), use memset and offsetof instead of '= 0',
> and use sizeof instead of a constant.
What's the benefit to doing this? Saving 4 lines of code?
Your suggestions are not obviously wrong at a glance, but they're also
not obviously right.
next prev parent reply other threads:[~2021-01-20 6:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 6:44 [PATCH] x86/fpu/xstate: calculate the number by sizeof and offsetof Yejune Deng
2021-01-20 6:49 ` Dave Hansen [this message]
2021-01-20 10:22 ` Borislav Petkov
2021-01-22 1:27 ` Yejune Deng
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=26c1f5be-7232-3e2b-dcbb-367ff0bbdbb8@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=viro@zeniv.linux.org.uk \
--cc=x86@kernel.org \
--cc=yejune.deng@gmail.com \
--cc=yu-cheng.yu@intel.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