[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211114015850.GA80620@8cc62eeb93da>
Date: Sun, 14 Nov 2021 09:58:50 +0800
From: kernel test robot <lkp@...el.com>
To: David Stevens <stevensd@...omium.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
0day robot <lkp@...el.com>
Subject: [PATCH] KVM: x86: fix noderef.cocci warnings
From: kernel test robot <lkp@...el.com>
arch/x86/kvm/mmu/page_track.c:95:39-45: ERROR: application of sizeof to pointer
sizeof when applied to a pointer typed expression gives the size of
the pointer
Generated by: scripts/coccinelle/misc/noderef.cocci
CC: David Stevens <stevensd@...omium.org>
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
---
tree: https://github.com/0day-ci/linux/commits/David-Stevens/KVM-x86-skip-gfn_track-allocation-when-possible/20210922-134429
head: e8c58ba667b80c8c238fb54320c7f774c631dfd5
commit: e8c58ba667b80c8c238fb54320c7f774c631dfd5 KVM: x86: only allocate gfn_track when necessary
:::::: branch date: 8 weeks ago
:::::: commit date: 8 weeks ago
page_track.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/x86/kvm/mmu/page_track.c
+++ b/arch/x86/kvm/mmu/page_track.c
@@ -92,7 +92,8 @@ int kvm_page_track_enable_mmu_write_trac
slots = __kvm_memslots(kvm, i);
kvm_for_each_memslot(slot, slots) {
gfn_track = slot->arch.gfn_track + KVM_PAGE_TRACK_WRITE;
- *gfn_track = kvcalloc(slot->npages, sizeof(*gfn_track),
+ *gfn_track = kvcalloc(slot->npages,
+ sizeof(**gfn_track),
GFP_KERNEL_ACCOUNT);
if (*gfn_track == NULL) {
mutex_unlock(&kvm->slots_arch_lock);
Powered by blists - more mailing lists