]> git.baikalelectronics.ru Git - kernel.git/commit
x86/fpu/xstate: Use sizeof() instead of a constant
authorYejune Deng <yejune.deng@gmail.com>
Fri, 22 Jan 2021 07:19:25 +0000 (15:19 +0800)
committerBorislav Petkov <bp@suse.de>
Fri, 29 Jan 2021 11:33:17 +0000 (12:33 +0100)
commit79f6a1be1a735556d829f5dcf2f2db90a828114e
tree439254e20f64bf65c0d83f22198f8309382eff91
parent2f3de349adc603aee0a3cb2fbf880504379d2afe
x86/fpu/xstate: Use sizeof() instead of a constant

Use sizeof() instead of a constant in fpstate_sanitize_xstate().
Remove use of the address of the 0th array element of ->st_space and
->xmm_space which is equivalent to the array address itself:

No code changed:

  # arch/x86/kernel/fpu/xstate.o:

   text    data     bss     dec     hex filename
   9694     899       4   10597    2965 xstate.o.before
   9694     899       4   10597    2965 xstate.o.after

md5:
   5a43fc70bad8e2a1784f67f01b71aabb  xstate.o.before.asm
   5a43fc70bad8e2a1784f67f01b71aabb  xstate.o.after.asm

 [ bp: Massage commit message. ]

Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210122071925.41285-1-yejune.deng@gmail.com
arch/x86/kernel/fpu/xstate.c