From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v6 05/16] tools/libxc: unused attribute in DECLARE_HYPERCALL_BUFFER_SHADOW Date: Thu, 14 May 2015 12:22:23 +0100 Message-ID: <1431602543.13579.42.camel@citrix.com> References: <1431593718-4828-1-git-send-email-yanghy@cn.fujitsu.com> <1431593718-4828-6-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431593718-4828-6-git-send-email-yanghy@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Yang Hongyang Cc: wei.liu2@citrix.com, eddie.dong@intel.com, wency@cn.fujitsu.com, andrew.cooper3@citrix.com, yunhong.jiang@intel.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, guijianfeng@cn.fujitsu.com, rshriram@cs.ubc.ca List-Id: xen-devel@lists.xenproject.org On Thu, 2015-05-14 at 16:55 +0800, Yang Hongyang wrote: > There are cases where we only need to use the hypercall buffer data, > and do not use the xc_hypercall_buffer_t struct. > DECLARE_HYPERCALL_BUFFER_SHADOW defines a user pointer that can allow > us to access the hypercall buffer data but it also defines a > xc_hypercall_buffer_t that we don't use, the compiler will report arg > unused error. > Add __attribute__((unused)) before xc_hypercall_buffer_t to avoid > the compiler error. > > Example cases: > In send_all_pages(), we only need to use the hypercall buffer data > which is a dirty bitmap, we set the dirty bitmap to all dirty and call > send_dirty_pages, we will not use the xc_hypercall_buffer_t and hypercall > to retrieve the dirty bitmap. > In send_some_pages(), we will also only need to use the dirty_bitmap. > the retrieve dirty bitmap hypercall are done by the caller. > > Signed-off-by: Yang Hongyang Acked-by: Ian Campbell