public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Jos <jdomingo@internautas.org>
Cc: linux-kernel@vger.kernel.org, mark.huth@mvista.com, ctindel@ieee.org
Subject: Re: [BUG]: bonding module parameter problem
Date: Fri, 11 Jan 2002 09:57:22 +1100	[thread overview]
Message-ID: <20020111095722.2038e08d.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20020109221354.GB3965@localhost>
In-Reply-To: <20020109221354.GB3965@localhost>

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.

      reply	other threads:[~2002-01-11  7:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-09 22:13 [BUG]: bonding module parameter problem José Luis Domingo López
2002-01-10 22:57 ` Rusty Russell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020111095722.2038e08d.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=ctindel@ieee.org \
    --cc=jdomingo@internautas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.huth@mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox