Skip to contentSkip to conversation

Initializedd the module parameters in drivers/net/wireless/arlan-main.c

PATCH In review Shine Mohamed 3 participants 6 messages Sep 29, 2003 – Oct 3, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Initializedd the module parameters in drivers/net/wireless/arlan-main.c

Quick patch to Initialize the module parameters in drivers/net/wireless/arlan-main.c

--- drivers/net/wireless/arlan-main.c.orig 2003-09-29 16:40:33.000000000
+0530
+++ drivers/net/wireless/arlan-main.c 2003-09-29 16:40:18.000000000 +0530
@@ -33,6 +33,7 @@
static int retries = 5;
static int tx_queue_len = 1;
static int arlan_EEPROM_bad;
+static int probe = 0; /* Initially it is setting to be 'Probing Disabled' */

#ifdef ARLAN_DEBUGGING

#1 lore raw

On Mon, 29 Sep 2003 16:44:06 +0530 Shine Mohamed <[email protected]> wrote:

| Quick patch to  Initialize  the module parameters in 
| drivers/net/wireless/arlan-main.c
| 
| 
| --- drivers/net/wireless/arlan-main.c.orig      2003-09-29 16:40:33.000000000 
| +0530
| +++ drivers/net/wireless/arlan-main.c   2003-09-29 16:40:18.000000000 +0530
| @@ -33,6 +33,7 @@
|  static int retries = 5;
|  static int tx_queue_len = 1;
|  static int arlan_EEPROM_bad;
| +static int probe = 0; /* Initially it is setting to be 'Probing Disabled' */

Yes, it does need to be declared, but it doesn't need to be init to 0.

--
~Randy

#2 lore raw
In reply to Shine Mohamed

In message <[email protected]> you write:

Review line 38

Quoted 9 lines

Quick patch to Initialize the module parameters in drivers/net/wireless/arlan-main.c

(quoted diff) +1 -0
@@ -33,6 +33,7 @@
 static int retries = 5;
 static int tx_queue_len = 1;
 static int arlan_EEPROM_bad;
+static int probe = 0; /* Initially it is setting to be 'Probing Disabled' */
 
 #ifdef ARLAN_DEBUGGING

This is clearly wrong: it's declared below.

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

#3 lore raw

On Wed, 01 Oct 2003 19:01:04 +1000 Rusty Russell <[email protected]> wrote:

| In message <[email protected]> you write:
| > Quick patch to  Initialize  the module parameters in 
| > drivers/net/wireless/arlan-main.c
| > @@ -33,6 +33,7 @@
| >  static int retries = 5;
| >  static int tx_queue_len = 1;
| >  static int arlan_EEPROM_bad;
| > +static int probe = 0; /* Initially it is setting to be 'Probing Disabled' */
| > 
| >  #ifdef ARLAN_DEBUGGING
| 
| This is clearly wrong: it's declared below.

Hello. Anybody there?

This is what you get with 2.6.0-test6 plain vanilla:

[rddunlap@midway linux-260-test6-work]$ make modules
SPLIT include/linux/autoconf.h -> include/config/*
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CC [M] drivers/net/wireless/arlan-main.o
drivers/net/wireless/arlan-main.c: In function `init_module':
drivers/net/wireless/arlan-main.c:1923: `probe' undeclared (first use in this function) drivers/net/wireless/arlan-main.c:1923: (Each undeclared identifier is reported only once drivers/net/wireless/arlan-main.c:1923: for each function it appears in.) make[3]: *** [drivers/net/wireless/arlan-main.o] Error 1
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

so is MODULE_PARM(probe, "i");
supposed to be declaring <probe>? It's not.
If it is supposed to be, then why are most/many/all other MODULE_PARM's in that file also declared separately (i.e., again)?

The only wrong part I see is that it doesn't need to be init to 0.

--
~Randy

#4 lore raw

In message <[email protected]> you write:

Quoted 9 lines · On Wed, 01 Oct 2003 19:01:04 +1000 Rusty Russell <[email protected]> wrote:

| This is clearly wrong: it's declared below.

Hello. Anybody there?

This is what you get with 2.6.0-test6 plain vanilla:
drivers/net/wireless/arlan-main.c:1923: `probe' undeclared (first use in this function) drivers/net/wireless/arlan-main.c:1923: (Each undeclared identifier is reported only once drivers/net/wireless/arlan-main.c:1923: for each function it appears in.)

See line 1885:

	#ifdef  MODULE

	static int probe = probeUNKNOWN;

	static int __init arlan_find_devices(void)

Hope that helps,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

#5 lore raw
Quoted 2 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 1 line

On Wed, 01 Oct 2003 19:01:04 +1000 Rusty Russell <[email protected]>

Quoted 10 lines · wrote:
Quoted 9 lines

| This is clearly wrong: it's declared below.

Hello. Anybody there?

This is what you get with 2.6.0-test6 plain vanilla:
drivers/net/wireless/arlan-main.c:1923: `probe' undeclared (first use in this function) drivers/net/wireless/arlan-main.c:1923: (Each undeclared identifier is reported only once drivers/net/wireless/arlan-main.c:1923:
for each function it appears in.)

Quoted 5 lines

See line 1885:

	#ifdef  MODULE

	static int probe = probeUNKNOWN;

This declaration was added only in 2.6.0-test6-bk1 not in the vanilla 2.6.0-test6

Quoted 12 lines

static int __init arlan_find_devices(void)

Hope that helps,
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Regards,
Shine Mohamed