From patchwork Mon Aug 14 07:08:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Gross X-Patchwork-Id: 9898225 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 41C5A6038C for ; Mon, 14 Aug 2017 07:12:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EDCC285D4 for ; Mon, 14 Aug 2017 07:12:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E11F28606; Mon, 14 Aug 2017 07:12:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A80DA285D4 for ; Mon, 14 Aug 2017 07:12:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dh9Vr-0006RJ-8Z; Mon, 14 Aug 2017 07:10:11 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dh9Vp-0006KL-IL for xen-devel@lists.xenproject.org; Mon, 14 Aug 2017 07:10:09 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id 65/E9-02033-0DC41995; Mon, 14 Aug 2017 07:10:08 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRWlGSWpSXmKPExsVyuP0Ov+5Zn4m RBnP/iFh83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkdJxwLZnJVrNvZxdTAuIGji5GTQ0LASOLt xH9MXYxcHEICCxklNr//wgaSYBNQldhw/RQriC0ioCRxb9VkJhCbWaBOouPmBHYQW1ggQ+Log 8NgNgtQ/bYXvWA2r4CpxP/ze5khFshLdByYzAJicwLFL+1bCmYLCZhI9G3tYpnAyL2AkWEVo3 pxalFZapGuuV5SUWZ6RkluYmaOrqGBqV5uanFxYnpqTmJSsV5yfu4mRqBvGYBgB+Oxyc6HGCU 5mJREeRN8eiOF+JLyUyozEosz4otKc1KLDzHKcHAoSfDO8J4YKSRYlJqeWpGWmQMMMpi0BAeP kgivAjDQhHiLCxJzizPTIVKnGHU5Xk34/41JiCUvPy9VSpz3KcgMAZCijNI8uBGwgL/EKCslz MsIdJQQT0FqUW5mCar8K0ZxDkYlYd4akCk8mXklcJteAR3BBHREH8j9vMUliQgpqQbGth2fGY 0/up9L/SUyWzqNR65JNfPOBxfHQyqrkvifBkt/+P218l6bqYdfttYy55XJOg3u78w9W3N/3St YscJzRfBVlYzA550zlprGTlhV5Bzwaem/ougWps8hy4+ZvH/V9iZq8+XD7/NWawmu3GW92iVw yqcEp6vpdnpNUyIjN7P8Yzq1tyhNiaU4I9FQi7moOBEA9HKJNXMCAAA= X-Env-Sender: jgross@suse.com X-Msg-Ref: server-7.tower-206.messagelabs.com!1502694605!104230994!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37155 invoked from network); 14 Aug 2017 07:10:05 -0000 Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by server-7.tower-206.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 14 Aug 2017 07:10:05 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id EB4BEABB0; Mon, 14 Aug 2017 07:09:04 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Mon, 14 Aug 2017 09:08:25 +0200 Message-Id: <20170814070849.20986-29-jgross@suse.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170814070849.20986-1-jgross@suse.com> References: <20170814070849.20986-1-jgross@suse.com> Cc: Juergen Gross , George Dunlap , Dario Faggioli Subject: [Xen-devel] [PATCH v2 28/52] xen/common/sched_credit2.c: let custom parameter parsing routines return errno X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Modify the custom parameter parsing routines in: xen/common/sched_credit2.c to indicate whether the parameter value was parsed successfully. Cc: George Dunlap Cc: Dario Faggioli Signed-off-by: Juergen Gross Acked-by: Dario Faggioli Acked-by: Wei Liu --- xen/common/sched_credit2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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);