From: kernel test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [tglx-devel:x86/fpu-kvm 88/88] arch/x86/kernel/fpu/core.c:281:6: warning: variable 'ret' set but not used
Date: Mon, 18 Oct 2021 04:25:02 +0800 [thread overview]
Message-ID: <202110180454.5zjKx82a-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3059 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu-kvm
head: dc3cd5721cdb0d3116a2feb84755427d1522477a
commit: dc3cd5721cdb0d3116a2feb84755427d1522477a [88/88] x86/fpu: Add reallocation mechanims for KVM
config: x86_64-randconfig-r031-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746dd6a700931988dd9021d3d04718f1929885a5)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git/commit/?id=dc3cd5721cdb0d3116a2feb84755427d1522477a
git remote add tglx-devel https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git
git fetch --no-tags tglx-devel x86/fpu-kvm
git checkout dc3cd5721cdb0d3116a2feb84755427d1522477a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> arch/x86/kernel/fpu/core.c:281:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
int ret;
^
1 warning generated.
vim +/ret +281 arch/x86/kernel/fpu/core.c
275
276 int fpu_swap_kvm_fpstate(struct fpu_guest *guest_fpu, bool enter_guest,
277 u64 restore_mask)
278 {
279 struct fpstate *guest_fps, *cur_fps;
280 struct fpu *fpu = ¤t->thread.fpu;
> 281 int ret;
282
283 if (unlikely(guest_fpu->realloc_request))
284 ret = fpu_guest_realloc_fpstate(guest_fpu, enter_guest);
285
286 guest_fps = guest_fpu->fpstate;
287 cur_fps = fpu->fpstate;
288
289 fpregs_lock();
290 if (!cur_fps->is_confidential && !test_thread_flag(TIF_NEED_FPU_LOAD))
291 save_fpregs_to_fpstate(fpu);
292
293 /* Swap fpstate */
294 if (enter_guest) {
295 fpu->__task_fpstate = cur_fps;
296 fpu->fpstate = guest_fps;
297 guest_fps->in_use = true;
298 } else {
299 guest_fps->in_use = false;
300 fpu->fpstate = fpu->__task_fpstate;
301 fpu->__task_fpstate = NULL;
302 }
303
304 cur_fps = fpu->fpstate;
305
306 if (!cur_fps->is_confidential) {
307 restore_mask &= XFEATURE_MASK_FPSTATE;
308 /* Includes XFD update */
309 restore_fpregs_from_fpstate(cur_fps, restore_mask);
310 } else {
311 /*
312 * XSTATE is restored by firmware from encrypted
313 * memory. Make sure XFD state is correct while
314 * running with guest fpstate
315 */
316 xfd_update_state(cur_fps);
317 }
318
319 fpregs_mark_activate();
320 fpregs_unlock();
321 return 0;
322 }
323 EXPORT_SYMBOL_GPL(fpu_swap_kvm_fpstate);
324
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31187 bytes --]
reply other threads:[~2021-10-17 20:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202110180454.5zjKx82a-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®