linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Quentin Perret <qperret@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, Marc Zyngier <maz@kernel.org>,
	Oliver Upton <oliver.upton@linux.dev>
Subject: [kvmarm:fixes 18/18] arch/arm64/kvm/hyp/nvhe/mem_protect.c:1086:9: warning: variable 'ret' is uninitialized when used here
Date: Mon, 10 Feb 2025 09:39:04 +0800	[thread overview]
Message-ID: <202502100911.8c9DbtKD-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git fixes
head:   eabc7aaef7a553b64bf6e631ce04526af6c8d104
commit: eabc7aaef7a553b64bf6e631ce04526af6c8d104 [18/18] KVM: arm64: Simplify np-guest hypercalls
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250210/202502100911.8c9DbtKD-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250210/202502100911.8c9DbtKD-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502100911.8c9DbtKD-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/arm64/kvm/hyp/nvhe/mem_protect.c:1086:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
    1086 |         return ret;
         |                ^~~
   arch/arm64/kvm/hyp/nvhe/mem_protect.c:1076:9: note: initialize the variable 'ret' to silence this warning
    1076 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +/ret +1086 arch/arm64/kvm/hyp/nvhe/mem_protect.c

76f0b18b3db578 Quentin Perret 2024-12-18  1071  
76f0b18b3db578 Quentin Perret 2024-12-18  1072  int __pkvm_host_mkyoung_guest(u64 gfn, struct pkvm_hyp_vcpu *vcpu)
76f0b18b3db578 Quentin Perret 2024-12-18  1073  {
76f0b18b3db578 Quentin Perret 2024-12-18  1074  	struct pkvm_hyp_vm *vm = pkvm_hyp_vcpu_to_hyp_vm(vcpu);
76f0b18b3db578 Quentin Perret 2024-12-18  1075  	u64 ipa = hyp_pfn_to_phys(gfn);
76f0b18b3db578 Quentin Perret 2024-12-18  1076  	int ret;
76f0b18b3db578 Quentin Perret 2024-12-18  1077  
eabc7aaef7a553 Quentin Perret 2025-02-07  1078  	if (pkvm_hyp_vm_is_protected(vm))
eabc7aaef7a553 Quentin Perret 2025-02-07  1079  		return -EPERM;
76f0b18b3db578 Quentin Perret 2024-12-18  1080  
eabc7aaef7a553 Quentin Perret 2025-02-07  1081  	assert_host_shared_guest(vm, ipa);
eabc7aaef7a553 Quentin Perret 2025-02-07  1082  	guest_lock_component(vm);
76f0b18b3db578 Quentin Perret 2024-12-18  1083  	kvm_pgtable_stage2_mkyoung(&vm->pgt, ipa, 0);
76f0b18b3db578 Quentin Perret 2024-12-18  1084  	guest_unlock_component(vm);
76f0b18b3db578 Quentin Perret 2024-12-18  1085  
76f0b18b3db578 Quentin Perret 2024-12-18 @1086  	return ret;

:::::: The code at line 1086 was first introduced by commit
:::::: 76f0b18b3db57868fb0cabe691201aad3085b712 KVM: arm64: Introduce __pkvm_host_mkyoung_guest()

:::::: TO: Quentin Perret <qperret@google.com>
:::::: CC: Marc Zyngier <maz@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


             reply	other threads:[~2025-02-10  1:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10  1:39 kernel test robot [this message]
2025-02-10  9:21 ` [kvmarm:fixes 18/18] arch/arm64/kvm/hyp/nvhe/mem_protect.c:1086:9: warning: variable 'ret' is uninitialized when used here Marc Zyngier
2025-02-10  9:44   ` Quentin Perret
2025-02-10 10:37     ` Marc Zyngier
2025-02-13  7:25       ` Philip Li

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=202502100911.8c9DbtKD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oliver.upton@linux.dev \
    --cc=qperret@google.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;
as well as URLs for NNTP newsgroup(s).