[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 06/52] xen/arch/x86/cpu/vpmu.c: let custom parameter parsing routines return errno
Modify the custom parameter parsing routines in: xen/arch/x86/cpu/vpmu.c to indicate whether the parameter value was parsed successfully. Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/arch/x86/cpu/vpmu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index 90954ca884..8f56e2bb6c 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -53,7 +53,7 @@ CHECK_pmu_params; static unsigned int __read_mostly opt_vpmu_enabled; unsigned int __read_mostly vpmu_mode = XENPMU_MODE_OFF; unsigned int __read_mostly vpmu_features = 0; -static void parse_vpmu_params(char *s); +static int parse_vpmu_params(char *s); custom_param("vpmu", parse_vpmu_params); static DEFINE_SPINLOCK(vpmu_lock); @@ -76,7 +76,7 @@ static int parse_vpmu_param(char *s, unsigned int len) return 0; } -static void __init parse_vpmu_params(char *s) +static int __init parse_vpmu_params(char *s) { char *sep, *p = s; @@ -104,10 +104,11 @@ static void __init parse_vpmu_params(char *s) opt_vpmu_enabled = 1; break; } - return; + return 0; error: printk("VPMU: unknown flags: %s - vpmu disabled!\n", s); + return -EINVAL; } void vpmu_lvtpc_update(uint32_t val) -- 2.12.3 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |