* arch/x86/kvm/mmu/page_track.c:95:39-45: ERROR: application of sizeof to pointer
@ 2021-11-14 1:58 kernel test robot
2021-11-14 1:58 ` [PATCH] KVM: x86: fix noderef.cocci warnings kernel test robot
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-11-14 1:58 UTC (permalink / raw)
To: David Stevens; +Cc: kbuild-all, linux-kernel, 0day robot
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
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
date: 8 weeks ago
config: i386-randconfig-c024-20210928 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cocci warnings: (new ones prefixed by >>)
>> arch/x86/kvm/mmu/page_track.c:95:39-45: ERROR: application of sizeof to pointer
Please review and possibly fold the followup patch.
---
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: 40739 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] KVM: x86: fix noderef.cocci warnings
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
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-14 1:58 UTC (permalink / raw)
To: David Stevens; +Cc: kbuild-all, linux-kernel, 0day robot
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-14 1:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] KVM: x86: fix noderef.cocci warnings kernel test robot
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®