From: kernel test robot <lkp@intel.com>
To: David Stevens <stevensd@chromium.org>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>
Subject: [PATCH] KVM: x86: fix noderef.cocci warnings
Date: Wed, 13 Oct 2021 17:08:40 +0800 [thread overview]
Message-ID: <20211013090840.GA18593@c02aa4e9d65a> (raw)
In-Reply-To: <202110131712.NcsZ1doh-lkp@intel.com>
From: kernel test robot <lkp@intel.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
Fixes: deae4a10f166 ("KVM: x86: only allocate gfn_track when necessary")
CC: David Stevens <stevensd@chromium.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8006b911c90a4ec09958447d24c8a4c3538f5723
commit: deae4a10f16649d9c8bfb89f38b61930fb938284 [4556/7806] KVM: x86: only allocate gfn_track when necessary
:::::: branch date: 3 hours ago
:::::: commit date: 12 days 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);
next prev parent reply other threads:[~2021-10-13 9:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 9:08 [linux-next:master 4556/7806] arch/x86/kvm/mmu/page_track.c:95:39-45: ERROR: application of sizeof to pointer kernel test robot
2021-10-13 9:08 ` kernel test robot [this message]
2021-10-13 11:03 ` [PATCH] KVM: x86: fix noderef.cocci warnings Paolo Bonzini
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=20211013090840.GA18593@c02aa4e9d65a \
--to=lkp@intel.com \
--cc=bp@alien8.de \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=stevensd@chromium.org \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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