[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/3] libxc: do not return a value from xc_cpuid_policy
On Thu, Jun 28, 2018 at 09:45:06AM +0200, Roger Pau Monné wrote: > On Thu, Jun 28, 2018 at 08:31:49AM +0100, Wei Liu wrote: > > On Thu, Jun 28, 2018 at 09:29:32AM +0200, Roger Pau Monné wrote: > > > On Wed, Jun 27, 2018 at 03:49:30PM +0100, Wei Liu wrote: > > > > On Wed, Jun 27, 2018 at 04:32:14PM +0200, Roger Pau Monne wrote: > > > > > None of the called functions return any errors, so there's no point in > > > > > returning an int from xc_cpuid_policy. > > > > > > > > > > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> > > > > > > > > What is the plan for this function? I expect it (and its children) to go > > > > away soon? > > > > > > This is likely to go away with further cpuid work. > > > > > > > You can also delete xch, I think. It is not used. > > > > > > Right, I left it because all the xc_cpuid_* take xch as the first > > > parameter. If I remove it here I will have to remove it from the > > > _intel, _amd, _hvm and _pv helpers. > > > > If this and its leaf functions are going away soon-ish I'm fine with > > less code churn. > > Hm, I'm not removing all of them, so let me add another patch on top > of this one to remove the xch parameter. Here it is, since the rest of the patches are already Acked I'm just appending it here. Let me know if you prefer me to send it to the list together with the rest of the series. ---8<--- From c15f795af8311d12222c85454c9d82a12621057a Mon Sep 17 00:00:00 2001 From: Roger Pau Monne <roger.pau@xxxxxxxxxx> Date: Thu, 28 Jun 2018 09:54:48 +0200 Subject: [PATCH 4/3] libxc: remove xch parameter from xc_cpuid_policy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's not used by the function or any of the helpers called by it. Reported-by: Wei Liu <wei.liu2@xxxxxxxxxx> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxc/xc_cpuid_x86.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index 3d1421aa50..eb2e2db569 100644 --- a/tools/libxc/xc_cpuid_x86.c +++ b/tools/libxc/xc_cpuid_x86.c @@ -308,8 +308,7 @@ static void free_cpuid_domain_info(struct cpuid_domain_info *info) free(info->featureset); } -static void amd_xc_cpuid_policy(xc_interface *xch, - const struct cpuid_domain_info *info, +static void amd_xc_cpuid_policy(const struct cpuid_domain_info *info, const unsigned int *input, unsigned int *regs) { switch ( input[0] ) @@ -365,8 +364,7 @@ static void amd_xc_cpuid_policy(xc_interface *xch, } } -static void intel_xc_cpuid_policy(xc_interface *xch, - const struct cpuid_domain_info *info, +static void intel_xc_cpuid_policy(const struct cpuid_domain_info *info, const unsigned int *input, unsigned int *regs) { switch ( input[0] ) @@ -397,8 +395,7 @@ static void intel_xc_cpuid_policy(xc_interface *xch, } } -static void xc_cpuid_hvm_policy(xc_interface *xch, - const struct cpuid_domain_info *info, +static void xc_cpuid_hvm_policy(const struct cpuid_domain_info *info, const unsigned int *input, unsigned int *regs) { switch ( input[0] ) @@ -490,13 +487,12 @@ static void xc_cpuid_hvm_policy(xc_interface *xch, } if ( info->vendor == VENDOR_AMD ) - amd_xc_cpuid_policy(xch, info, input, regs); + amd_xc_cpuid_policy(info, input, regs); else - intel_xc_cpuid_policy(xch, info, input, regs); + intel_xc_cpuid_policy(info, input, regs); } -static void xc_cpuid_pv_policy(xc_interface *xch, - const struct cpuid_domain_info *info, +static void xc_cpuid_pv_policy(const struct cpuid_domain_info *info, const unsigned int *input, unsigned int *regs) { switch ( input[0] ) @@ -592,8 +588,7 @@ static void xc_cpuid_pv_policy(xc_interface *xch, } } -static void xc_cpuid_policy(xc_interface *xch, - const struct cpuid_domain_info *info, +static void xc_cpuid_policy(const struct cpuid_domain_info *info, const unsigned int *input, unsigned int *regs) { /* @@ -608,9 +603,9 @@ static void xc_cpuid_policy(xc_interface *xch, } if ( info->hvm ) - xc_cpuid_hvm_policy(xch, info, input, regs); + xc_cpuid_hvm_policy(info, input, regs); else - xc_cpuid_pv_policy(xch, info, input, regs); + xc_cpuid_pv_policy(info, input, regs); } static int xc_cpuid_do_domctl( @@ -745,7 +740,7 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t domid, for ( ; ; ) { cpuid(input, regs); - xc_cpuid_policy(xch, &info, input, regs); + xc_cpuid_policy(&info, input, regs); if ( regs[0] || regs[1] || regs[2] || regs[3] ) { @@ -818,7 +813,7 @@ int xc_cpuid_set( cpuid(input, regs); memcpy(polregs, regs, sizeof(regs)); - xc_cpuid_policy(xch, &info, input, polregs); + xc_cpuid_policy(&info, input, polregs); for ( i = 0; i < 4; i++ ) { -- 2.17.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |