Re: [BUG]: bonding module parameter problem

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Thu Jan 10 2002 - 17:57:22 EST


On Wed, 9 Jan 2002 23:13:55 +0100
Jos <jdomingo@internautas.org> wrote:
> At /usr/src/linux/drivers/net/bonding.c, line 229:
> MODULE_PARM(max_bonds, "1-" __MODULE_STRING(INT_MAX) "i");
> MODULE_PARM_DESC(max_bonds, "Max number of bonded devices");

This is wrong. When I did my module rewrite patch, I noted a number of
mis-uses of the MODULE_PARM macro (mine does type checking, so the compiler
found them).

You are saying that max_bonds is an ARRAY of 1-INT_MAX integers!
The same mistake is made in the patch on sf.net/projects/bonding/.

Here is the patch against .17, for inspiration:

diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.4.17/drivers/net/bonding.c working-2.4.17-wagner/drivers/net/bonding.c
--- linux-2.4.17/drivers/net/bonding.c Thu Dec 27 12:45:05 2001
+++ working-2.4.17-wagner/drivers/net/bonding.c Fri Jan 11 09:46:08 2002
@@ -226,7 +226,7 @@
 static struct bonding *these_bonds = NULL;
 static struct net_device *dev_bonds = NULL;
 
-MODULE_PARM(max_bonds, "1-" __MODULE_STRING(INT_MAX) "i");
+MODULE_PARM(max_bonds, "i");
 MODULE_PARM_DESC(max_bonds, "Max number of bonded devices");
 MODULE_PARM(miimon, "i");
 MODULE_PARM_DESC(miimon, "Link check interval in milliseconds");

Cheers!
Rusty.

-- 
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 15 2002 - 21:00:34 EST