[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 12/52] xen/arch/x86/irq.c: let custom parameter parsing routines return errno



Modify the custom parameter parsing routines in:

xen/arch/x86/irq.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>
---
 xen/arch/x86/irq.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 57e6c18970..5d68e4252a 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -26,7 +26,7 @@
 #include <asm/mach-generic/mach_apic.h>
 #include <public/physdev.h>
 
-static void parse_irq_vector_map_param(char *s);
+static int parse_irq_vector_map_param(char *s);
 
 /* opt_noirqbalance: If true, software IRQ balancing/affinity is disabled. */
 bool __read_mostly opt_noirqbalance;
@@ -60,9 +60,10 @@ static struct timer irq_ratelimit_timer;
 static unsigned int __read_mostly irq_ratelimit_threshold = 10000;
 integer_param("irq_ratelimit", irq_ratelimit_threshold);
 
-static void __init parse_irq_vector_map_param(char *s)
+static int __init parse_irq_vector_map_param(char *s)
 {
     char *ss;
+    int rc = 0;
 
     do {
         ss = strchr(s, ',');
@@ -75,9 +76,13 @@ static void __init parse_irq_vector_map_param(char *s)
             opt_irq_vector_map=OPT_IRQ_VECTOR_MAP_GLOBAL;
         else if ( !strcmp(s, "per-device"))
             opt_irq_vector_map=OPT_IRQ_VECTOR_MAP_PERDEV;
+        else
+            rc = -EINVAL;
 
         s = ss + 1;
     } while ( ss );
+
+    return rc;
 }
 
 /* Must be called when irq disabled */
-- 
2.12.3


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.