Re: [PATCH] x86/fpu/xstate: calculate the number by sizeof and offsetof

From: Dave Hansen
Date: Wed Jan 20 2021 - 01:53:24 EST


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.