* [PATCH] block: fix noderef.cocci warnings
[not found] <201808140744.LIoM2Vik%fengguang.wu@intel.com>
@ 2018-08-13 23:59 ` kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2018-08-13 23:59 UTC (permalink / raw)
To: Bart Van Assche; +Cc: kbuild-all, Jens Axboe, linux-block, linux-kernel
From: kbuild test robot <fengguang.wu@intel.com>
block/genhd.c:1483:37-43: 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: b4032d402850 ("block: Introduce alloc_disk_node_attr()")
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---
genhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1480,7 +1480,7 @@ struct gendisk *__alloc_disk_node(int mi
disk_to_dev(disk)->class = &block_class;
disk_to_dev(disk)->type = &disk_type;
if (num_groups) {
- memcpy(disk->ag, ag, num_groups * sizeof(ag));
+ memcpy(disk->ag, ag, num_groups * sizeof(*ag));
disk_to_dev(disk)->groups = disk->ag;
}
device_initialize(disk_to_dev(disk));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-14 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <201808140744.LIoM2Vik%fengguang.wu@intel.com>
2018-08-13 23:59 ` [PATCH] block: fix noderef.cocci warnings kbuild test robot
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).