[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210122071925.41285-1-yejune.deng@gmail.com>
Date: Fri, 22 Jan 2021 15:19:25 +0800
From: Yejune Deng <yejune.deng@...il.com>
To: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, x86@...nel.org,
hpa@...or.com, dave.hansen@...ux.intel.com, yu-cheng.yu@...el.com,
fenghua.yu@...el.com, tony.luck@...el.com,
kan.liang@...ux.intel.com, viro@...iv.linux.org.uk,
kevinb@...hat.com
Cc: linux-kernel@...r.kernel.org, yejune.deng@...il.com
Subject: [PATCH] x86/fpu/xstate: Use sizeof() instead of a constant
In fpstate_sanitize_xstate(), use sizeof() instead of a constant,
at the same time, remove & and [0].
Signed-off-by: Yejune Deng <yejune.deng@...il.com>
---
arch/x86/kernel/fpu/xstate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
index 5d8047441a0a..683749b80ae2 100644
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@ -167,14 +167,14 @@ void fpstate_sanitize_xstate(struct fpu *fpu)
fx->fop = 0;
fx->rip = 0;
fx->rdp = 0;
- memset(&fx->st_space[0], 0, 128);
+ memset(fx->st_space, 0, sizeof(fx->st_space));
}
/*
* SSE is in init state
*/
if (!(xfeatures & XFEATURE_MASK_SSE))
- memset(&fx->xmm_space[0], 0, 256);
+ memset(fx->xmm_space, 0, sizeof(fx->xmm_space));
/*
* First two features are FPU and SSE, which above we handled
--
2.29.0
Powered by blists - more mailing lists