From: Olaf Dietsche <olaf.dietsche@t-online.de>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org, Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [PATCH] restore modules compatibility
Date: Wed, 22 Jan 2003 09:44:02 +0100 [thread overview]
Message-ID: <87y95da819.fsf@goat.bogus.local> (raw)
In-Reply-To: 3E2E0874.1B95BA77@linux-m68k.org
Roman Zippel <zippel@linux-m68k.org> writes:
> Olaf Dietsche wrote:
>
>> Although, "patch -l" applies without failures.
>
> Damn, another unpatched pine...
> The patch is also available from
> http://www.xs4all.nl/~zippel/modules-2.5.59.diff
Thanks, applies without errors now.
However, there is a problem with MODULE_PARM() vs. declaration order:
gcc -Wp,-MD,drivers/input/keyboard/.atkbd.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -malign-functions=4 -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc -iwithprefix include -DKBUILD_BASENAME=atkbd -DKBUILD_MODNAME=atkbd -c -o drivers/input/keyboard/atkbd.o drivers/input/keyboard/atkbd.c
drivers/input/keyboard/atkbd.c:24: `atkbd_set' undeclared here (not in a function)
drivers/input/keyboard/atkbd.c:24: initializer element is not constant
drivers/input/keyboard/atkbd.c:24: (near initialization for `__module_param_atkbd_set.addr')
drivers/input/keyboard/atkbd.c:25: `atkbd_reset' undeclared here (not in a function)
drivers/input/keyboard/atkbd.c:25: initializer element is not constant
drivers/input/keyboard/atkbd.c:25: (near initialization for `__module_param_atkbd_reset.addr')
[...]
gcc -Wp,-MD,drivers/input/serio/.i8042.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -malign-functions=4 -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc -iwithprefix include -DKBUILD_BASENAME=i8042 -DKBUILD_MODNAME=i8042 -c -o drivers/input/serio/i8042.o drivers/input/serio/i8042.c
drivers/input/serio/i8042.c:28: `i8042_noaux' undeclared here (not in a function)
drivers/input/serio/i8042.c:28: initializer element is not constant
drivers/input/serio/i8042.c:28: (near initialization for `__module_param_i8042_noaux.addr')
drivers/input/serio/i8042.c:29: `i8042_nomux' undeclared here (not in a function)
drivers/input/serio/i8042.c:29: initializer element is not constant
drivers/input/serio/i8042.c:29: (near initialization for `__module_param_i8042_nomux.addr')
[...]
drivers/input/mouse/psmouse.c:23: `psmouse_noext' ...
When the associated variables are declared after the MODULE_PARM(),
you get this error. There may be more of this kind.
I fixed this by moving the declarations, see patch below.
Regards, Olaf.
--- a/drivers/input/keyboard/atkbd.c Tue Jan 21 22:49:36 2003
+++ b/drivers/input/keyboard/atkbd.c Wed Jan 22 09:30:22 2003
@@ -19,18 +19,18 @@
#include <linux/serio.h>
#include <linux/workqueue.h>
-MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
-MODULE_DESCRIPTION("AT and PS/2 keyboard driver");
-MODULE_PARM(atkbd_set, "1i");
-MODULE_PARM(atkbd_reset, "1i");
-MODULE_LICENSE("GPL");
-
static int atkbd_set = 2;
#if defined(__i386__) || defined (__x86_64__)
static int atkbd_reset;
#else
static int atkbd_reset = 1;
#endif
+
+MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
+MODULE_DESCRIPTION("AT and PS/2 keyboard driver");
+MODULE_PARM(atkbd_set, "1i");
+MODULE_PARM(atkbd_reset, "1i");
+MODULE_LICENSE("GPL");
/*
* Scancode to keycode tables. These are just the default setting, and
--- a/drivers/input/serio/i8042.c Tue Jan 21 22:49:36 2003
+++ b/drivers/input/serio/i8042.c Wed Jan 22 09:29:51 2003
@@ -25,19 +25,19 @@
MODULE_DESCRIPTION("i8042 keyboard and mouse controller driver");
MODULE_LICENSE("GPL");
-MODULE_PARM(i8042_noaux, "1i");
-MODULE_PARM(i8042_nomux, "1i");
-MODULE_PARM(i8042_unlock, "1i");
-MODULE_PARM(i8042_reset, "1i");
-MODULE_PARM(i8042_direct, "1i");
-MODULE_PARM(i8042_dumbkbd, "1i");
-
static int i8042_reset;
static int i8042_noaux;
static int i8042_nomux;
static int i8042_unlock;
static int i8042_direct;
static int i8042_dumbkbd;
+
+MODULE_PARM(i8042_noaux, "1i");
+MODULE_PARM(i8042_nomux, "1i");
+MODULE_PARM(i8042_unlock, "1i");
+MODULE_PARM(i8042_reset, "1i");
+MODULE_PARM(i8042_direct, "1i");
+MODULE_PARM(i8042_dumbkbd, "1i");
#undef DEBUG
#include "i8042.h"
--- a/drivers/input/mouse/psmouse.c Tue Jan 21 22:51:23 2003
+++ b/drivers/input/mouse/psmouse.c Wed Jan 22 09:36:58 2003
@@ -18,12 +18,12 @@
#include <linux/serio.h>
#include <linux/init.h>
+static int psmouse_noext;
+
MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
MODULE_DESCRIPTION("PS/2 mouse driver");
MODULE_PARM(psmouse_noext, "1i");
MODULE_LICENSE("GPL");
-
-static int psmouse_noext;
#define PSMOUSE_CMD_SETSCALE11 0x00e6
#define PSMOUSE_CMD_SETRES 0x10e8
next prev parent reply other threads:[~2003-01-22 8:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-21 18:28 [PATCH] restore modules compatibility Roman Zippel
2003-01-22 0:15 ` Olaf Dietsche
2003-01-22 2:56 ` Roman Zippel
2003-01-22 8:44 ` Olaf Dietsche [this message]
2003-01-22 18:25 ` Roman Zippel
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=87y95da819.fsf@goat.bogus.local \
--to=olaf.dietsche@t-online.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=zippel@linux-m68k.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.