Message ID | 20170809070706.13481-29-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, 2017-08-09 at 09:06 +0200, Juergen Gross wrote: > Modify the custom parameter parsing routines in: > > xen/common/sched_credit2.c > > to indicate whether the parameter value was parsed successfully. > > Cc: George Dunlap <george.dunlap@eu.citrix.com> > Signed-off-by: Juergen Gross <jgross@suse.com> > Acked-by: Dario Faggioli <dario.faggioli@citrix.com> Regards, Dario
diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 29c002a63e..9b1db1351f 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -339,7 +339,7 @@ static const char *const opt_runqueue_str[] = { }; static int __read_mostly opt_runqueue = OPT_RUNQUEUE_SOCKET; -static void parse_credit2_runqueue(const char *s) +static int parse_credit2_runqueue(const char *s) { unsigned int i; @@ -348,11 +348,13 @@ static void parse_credit2_runqueue(const char *s) if ( !strcmp(s, opt_runqueue_str[i]) ) { opt_runqueue = i; - return; + return 0; } } printk("WARNING, unrecognized value of credit2_runqueue option!\n"); + + return -EINVAL; } custom_param("credit2_runqueue", parse_credit2_runqueue);
Modify the custom parameter parsing routines in: xen/common/sched_credit2.c to indicate whether the parameter value was parsed successfully. Cc: George Dunlap <george.dunlap@eu.citrix.com> Cc: Dario Faggioli <dario.faggioli@citrix.com> Signed-off-by: Juergen Gross <jgross@suse.com> --- xen/common/sched_credit2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)