Skip to contentSkip to conversation

add MODULE_ALIAS_LDISC to asm-parisc/termios.h

PATCH In review Arnaldo Carvalho de Melo 4 participants 6 messages Sep 4, 2003 – Sep 5, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add MODULE_ALIAS_LDISC to asm-parisc/termios.h

Hi,

I noticed this one on parisc64 with the latest bk tree:

CC [M] drivers/char/n_hdlc.o
drivers/char/n_hdlc.c:985: parse error before numeric constant
drivers/char/n_hdlc.c:985: warning: type defaults to int' in declaration of MODULE_ALIAS_LDISC' drivers/char/n_hdlc.c:985: warning: function declaration isn't a prototype
drivers/char/n_hdlc.c:985: warning: data definition has no type or storage classmake[2]: *** [drivers/char/n_hdlc.o] Error 1 make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2

This patch makes it compile, doing the same thing that was done to
include/asm-i386/termios.h, please see if this is acceptable, if it is I can provide the same patch for all the other arches.

- Arnaldo

===== include/asm-parisc/termios.h 1.4 vs edited =====

include/asm-parisc/termios.h +2 -0
@@ -101,6 +101,8 @@
 #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
 #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
 
+#define MODULE_ALIAS_LDISC(ldisc) \
+        MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))
 #endif	/* __KERNEL__ */
 
 #endif	/* _PARISC_TERMIOS_H */
#1 lore raw
Quoted 3 lines · Arnaldo Carvalho de Melo

This patch makes it compile, doing the same thing that was done to
include/asm-i386/termios.h, please see if this is acceptable, if it is I can provide the same patch for all the other arches.

if it's the same for all arches, why not put it in <linux/termios.h>?

Signature · 3 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
#2 lore raw
In reply to Arnaldo Carvalho de Melo
Quoted 3 lines · Arnaldo Carvalho de Melo

This patch makes it compile, doing the same thing that was done to
include/asm-i386/termios.h, please see if this is acceptable, if it is I can provide the same patch for all the other arches.

if it's the same for all arches, why not put it in <linux/termios.h>?

Signature · 3 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
#3 lore raw

In message <[email protected]> you write :

Quoted 6 lines · Arnaldo Carvalho de Melo
Quoted 3 lines

This patch makes it compile, doing the same thing that was done to
include/asm-i386/termios.h, please see if this is acceptable, if it is I can provide the same patch for all the other arches.

if it's the same for all arches, why not put it in <linux/termios.h>?

Because I'm stupid?

Linus, please apply,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

include/asm-i386/termios.h +0 -3
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.6.0-test4-bk6/include/asm-i386/termios.h working-2.6.0-test4-bk6-tmp/include/asm-i386/termios.h
@@ -101,9 +101,6 @@ struct termio {
 
 #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios))
 #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
-
-#define MODULE_ALIAS_LDISC(ldisc) \
-	MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))
 #endif	/* __KERNEL__ */
 
 #endif	/* _I386_TERMIOS_H */
include/linux/termios.h +2 -0
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.6.0-test4-bk6/include/linux/termios.h working-2.6.0-test4-bk6-tmp/include/linux/termios.h
@@ -4,4 +4,6 @@
 #include <linux/types.h>
 #include <asm/termios.h>
 
+#define MODULE_ALIAS_LDISC(ldisc) \
+	MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))
 #endif
#4 lore raw
In reply to Arnaldo Carvalho de Melo

include/asm-parisc/termios.h line 105

Quoted 2 lines · Arnaldo Carvalho de Melo
include/asm-parisc/termios.h +2 -0
+#define MODULE_ALIAS_LDISC(ldisc) \
+        MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))

These are the strings used to identify the required line discipline module to kmod, aren't they?

Since modprobe.conf seems to be generated without much regard for architectures, is there any reason why this definition should differ amongst architectures? I think the answer's "no", so I think this fix should be in linux/termios.h (or somewhere architecture independent).

James

#5 lore raw
In reply to Arnaldo Carvalho de Melo

include/asm-parisc/termios.h line 105

Quoted 2 lines · Arnaldo Carvalho de Melo
include/asm-parisc/termios.h +2 -0
+#define MODULE_ALIAS_LDISC(ldisc) \
+        MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))

These are the strings used to identify the required line discipline module to kmod, aren't they?

Since modprobe.conf seems to be generated without much regard for architectures, is there any reason why this definition should differ amongst architectures? I think the answer's "no", so I think this fix should be in linux/termios.h (or somewhere architecture independent).

James