From: Juergen Gross Date: Wed, 23 Aug 2017 17:34:00 +0000 (+0200) Subject: xen/common/core_parking.c: let custom parameter parsing routines return errno X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1583 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d247b5835001c460c29de16388ca920b41fb0df9;p=xen.git xen/common/core_parking.c: let custom parameter parsing routines return errno Modify the custom parameter parsing routines in: xen/common/core_parking.c to indicate whether the parameter value was parsed successfully. Signed-off-by: Juergen Gross Acked-by: Wei Liu Acked-by: Jan Beulich --- diff --git a/xen/common/core_parking.c b/xen/common/core_parking.c index de269e06c2..803c6c7911 100644 --- a/xen/common/core_parking.c +++ b/xen/common/core_parking.c @@ -41,14 +41,16 @@ static enum core_parking_controller { PERFORMANCE_FIRST } core_parking_controller = POWER_FIRST; -static void __init setup_core_parking_option(char *str) +static int __init setup_core_parking_option(const char *str) { if ( !strcmp(str, "power") ) core_parking_controller = POWER_FIRST; else if ( !strcmp(str, "performance") ) core_parking_controller = PERFORMANCE_FIRST; else - return; + return -EINVAL; + + return 0; } custom_param("core_parking", setup_core_parking_option);