From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [PATCH] KVM: x86: fix noderef.cocci warnings
Date: Sun, 14 Nov 2021 09:58:50 +0800 [thread overview]
Message-ID: <20211114015850.GA80620@8cc62eeb93da> (raw)
In-Reply-To: <202111140928.m6dhOooE-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
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
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://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);
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: David Stevens <stevensd@chromium.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
0day robot <lkp@intel.com>
Subject: [PATCH] KVM: x86: fix noderef.cocci warnings
Date: Sun, 14 Nov 2021 09:58:50 +0800 [thread overview]
Message-ID: <20211114015850.GA80620@8cc62eeb93da> (raw)
In-Reply-To: <202111140928.m6dhOooE-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
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://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);
next prev parent reply other threads:[~2021-11-14 1:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-14 1:58 arch/x86/kvm/mmu/page_track.c:95:39-45: ERROR: application of sizeof to pointer kernel test robot
2021-11-14 1:58 ` kernel test robot
2021-11-14 1:58 ` kernel test robot [this message]
2021-11-14 1:58 ` [PATCH] KVM: x86: fix noderef.cocci warnings kernel test robot
-- strict thread matches above, loose matches on Subject: below --
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 ` [PATCH] KVM: x86: fix noderef.cocci warnings kernel test robot
2021-10-13 9:08 ` kernel test robot
2021-10-13 11:03 ` Paolo Bonzini
2021-10-13 11:03 ` 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=20211114015850.GA80620@8cc62eeb93da \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.