From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934874AbcKJTJ4 (ORCPT ); Thu, 10 Nov 2016 14:09:56 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:34898 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755847AbcKJTJz (ORCPT ); Thu, 10 Nov 2016 14:09:55 -0500 Date: Thu, 10 Nov 2016 22:09:25 +0300 From: Dan Carpenter To: kys@microsoft.com Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com, leann.ogasawara@canonical.com, sthemmin@microsoft.com, Alex Ng , Alex Ng Subject: Re: [PATCH V2 08/14] Drivers: hv: balloon: Fix info request to show max page count Message-ID: <20161110190924.GD28701@mwanda> References: <1478030807-5915-1-git-send-email-kys@exchange.microsoft.com> <1478030854-5970-1-git-send-email-kys@exchange.microsoft.com> <1478030854-5970-8-git-send-email-kys@exchange.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478030854-5970-8-git-send-email-kys@exchange.microsoft.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 01, 2016 at 01:07:28PM -0700, kys@exchange.microsoft.com wrote: > From: Alex Ng > > Balloon driver was only printing the size of the info blob and not the > actual content. This fixes it so that the info blob (max page count as > configured in Hyper-V) is printed out. > > Signed-off-by: Alex Ng > Signed-off-by: K. Y. Srinivasan > --- > drivers/hv/hv_balloon.c | 9 +++++++-- > 1 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c > index 8cac29a..14c3dc4 100644 > --- a/drivers/hv/hv_balloon.c > +++ b/drivers/hv/hv_balloon.c > @@ -1034,8 +1034,13 @@ static void process_info(struct hv_dynmem_device *dm, struct dm_info_msg *msg) > > 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", info_hdr->data_size); > + if (info_hdr->data_size == sizeof(__u64)) { > + __u64 *max_page_count = (__u64 *)&info_hdr[1]; Why __u64 instead of u64? Is this code shared with user space? regards, dan carpenter