[patch] 2.6.9-rc1-mm2: char/pcxx.c doesn't compile

From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 08/31/04

  • Next message: Peter Zijlstra: "Re: [patch] voluntary-preempt-2.6.9-rc1-bk4-Q5"
    Date:	Tue, 31 Aug 2004 19:41:02 +0200
    To: Andrew Morton <akpm@osdl.org>, digilnux@dgii.com
    
    

    The following compile error might not be specific to -mm:

    <-- snip -->

    ...
      CC drivers/char/pcxx.o
    drivers/char/pcxx.c: In function `pcxe_cleanup':
    drivers/char/pcxx.c:209: warning: unused variable `e2'
    drivers/char/pcxx.c: At top level:
    drivers/char/pcxx.c:229: `pcxe_init' undeclared here (not in a function)
    drivers/char/pcxx.c:230: warning: type defaults to `int' in declaration of `module_cleanup'
    drivers/char/pcxx.c:230: warning: parameter names (without types) in function declaration
    drivers/char/pcxx.c:230: warning: data definition has no type or storage class
    drivers/char/pcxx.c:1016: redefinition of `__initcall_pcxe_init'
    drivers/char/pcxx.c:229: `__initcall_pcxe_init' previously defined here
    drivers/char/pcxx.c:1016: `pcxe_init' undeclared here (not in a function)
    drivers/char/pcxx.c:1017: `pcxe_exit' undeclared here (not in a function)
    drivers/char/pcxx.c: In function `pcxe_tiocmget':
    drivers/char/pcxx.c:2009: `mstat' undeclared (first use in this function)
    drivers/char/pcxx.c:2009: (Each undeclared identifier is reported only once
    drivers/char/pcxx.c:2009: for each function it appears in.)
    drivers/char/pcxx.c: In function `pcxe_tiocmset':
    drivers/char/pcxx.c:2072: warning: control reaches end of non-void function
    drivers/char/pcxx.c: At top level:
    drivers/char/pcxx.c:1044: warning: `pcxe_init' defined but not used
    make[2]: *** [drivers/char/pcxx.o] Error 1

    <-- snip -->

    The patch below (only compilation tested) fixes all errors and warnings.

    diffstat output:
     drivers/char/pcxx.c | 15 +++++----------
     1 files changed, 5 insertions(+), 10 deletions(-)

    Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

    --- linux-2.6.9-rc1-mm2-full/drivers/char/pcxx.c.old 2004-08-31 13:30:28.000000000 +0200
    +++ linux-2.6.9-rc1-mm2-full/drivers/char/pcxx.c 2004-08-31 14:06:28.000000000 +0200
    @@ -206,7 +200,7 @@
     {
     
             unsigned long flags;
    - int e1, e2;
    + int e1;
     
             printk(KERN_NOTICE "Unloading PC/Xx version %s\n", VERSION);
     
    @@ -223,12 +217,6 @@
             restore_flags(flags);
     }
     
    -/*
    - * pcxe_init() is our init_module():
    - */
    -module_init(pcxe_init);
    -module_cleanup(pcxe_cleanup);
    -
     static inline struct channel *chan(register struct tty_struct *tty)
     {
             if (tty) {
    @@ -1013,9 +1001,6 @@
     }
     #endif
     
    -module_init(pcxe_init)
    -module_exit(pcxe_exit)
    -
     static struct tty_operations pcxe_ops = {
             .open = pcxe_open,
             .close = pcxe_close,
    @@ -1561,6 +1546,8 @@
             return ret;
     }
     
    +module_init(pcxe_init)
    +module_exit(pcxe_cleanup)
     
     static void pcxxpoll(unsigned long dummy)
     {
    @@ -1995,6 +1982,7 @@
             volatile struct board_chan *bc;
             unsigned long flags;
             int mflag = 0;
    + int mstat;
     
             if(ch)
                     bc = ch->brdchan;
    @@ -2069,6 +2057,7 @@
             pcxxparam(tty,ch);
             memoff(ch);
             restore_flags(flags);
    + return 0;
     }
     
     

    -
    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/


  • Next message: Peter Zijlstra: "Re: [patch] voluntary-preempt-2.6.9-rc1-bk4-Q5"

    Relevant Pages

    • dsniff and Suse 9.2
      ... I'm getting the following compile error: ... arpspoof.c:60: warning: passing arg 6 of `libnet_build_ethernet' from ... arpspoof.c:64: error: (Each undeclared identifier is reported only ...
      (comp.os.linux.misc)
    • dsniff and Suse 9.2
      ... I'm getting the following compile error: ... arpspoof.c:60: warning: passing arg 6 of `libnet_build_ethernet' from ... arpspoof.c:64: error: (Each undeclared identifier is reported only ...
      (alt.os.linux.suse)
    • TEA crypto in 2.4: undefined MODULE_ALIAS
      ... I get this compile error: ... tea.c:242: warning: type defaults to `int' in declaration of `MODULE_ALIAS' ... tea.c:242: warning: data definition has no type or storage class ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [BK PATCHES] 2.6.x experimental net driver updates
      ... I got the following compile error when trying to compile e100 statically ... drivers/net/e100.c:170: warning: type defaults to `int' in declaration ... drivers/net/e100.c:170: warning: function declaration isn't a prototype ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Make assign illegal for class
      ... and generate a warning? ... constructor but I have no idea about generating a compile error inside it). ... - Mark Randall ... Prev by Date: ...
      (microsoft.public.vc.language)