From: K. Y. Srinivasan Date: Thu, 6 Dec 2012 19:06:54 +0000 (-0800) Subject: Drivers: hv: balloon: Fix a bug in the definition of struct dm_info_msg X-Git-Tag: v3.8~110^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6427a0d771dbf2a5cfbbed00caffbf1d11f4ae0b;p=platform%2Fkernel%2Flinux-amlogic.git Drivers: hv: balloon: Fix a bug in the definition of struct dm_info_msg There is bug in the definition of struct dm_info_msg. This patch fixes the definition of this structure and makes the corresponding adjustments. Signed-off-by: K. Y. Srinivasan Reviewed-by: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index f6c0011..b9bb8f4 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -403,7 +403,7 @@ struct dm_info_header { */ struct dm_info_msg { - struct dm_info_header header; + struct dm_header hdr; __u32 reserved; __u32 info_size; __u8 info[]; @@ -503,13 +503,17 @@ static void hot_add_req(struct hv_dynmem_device *dm, struct dm_hot_add *msg) static void process_info(struct hv_dynmem_device *dm, struct dm_info_msg *msg) { - switch (msg->header.type) { + struct dm_info_header *info_hdr; + + info_hdr = (struct dm_info_header *)msg->info; + + switch (info_hdr->type) { case INFO_TYPE_MAX_PAGE_CNT: pr_info("Received INFO_TYPE_MAX_PAGE_CNT\n"); - pr_info("Data Size is %d\n", msg->header.data_size); + pr_info("Data Size is %d\n", info_hdr->data_size); break; default: - pr_info("Received Unknown type: %d\n", msg->header.type); + pr_info("Received Unknown type: %d\n", info_hdr->type); } }