Re: [2.6 patch] fix non-modular ftape compile

From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 09/25/03

  • Next message: David S. Miller: "Re: [PATCH] 2.6.0-test5-bk11 PKT_CAN_SHARE_SKB [1/3] include/linux/netdevice.h"
    Date:	Thu, 25 Sep 2003 13:03:25 +0200
    To: Christoph Hellwig <hch@infradead.org>, linux-kernel@vger.kernel.org
    
    

    On Thu, Sep 25, 2003 at 11:38:16AM +0100, Christoph Hellwig wrote:
    > On Thu, Sep 25, 2003 at 12:23:09PM +0200, Adrian Bunk wrote:
    > > ftape_proc_destroy is only available #ifdef MODULE, the following patch
    > > fixes the link error:
    >
    > I'd suggest to kill the #ifdef MODULE instead and mark it __exit.
    > Same result but less ifdef crap..

    It increases the kernel size since in 2.6 __exit functions are discarded
    at runtime and not at link time.

    Anyway, I agree with your suggestion. The following patch works instead
    of the first patch I sent.

    --- linux-2.6.0-test5-mm4-no-smp-2.95/drivers/char/ftape/lowlevel/ftape-proc.c.old 2003-09-25 12:46:18.000000000 +0200
    +++ linux-2.6.0-test5-mm4-no-smp-2.95/drivers/char/ftape/lowlevel/ftape-proc.c 2003-09-25 12:46:50.000000000 +0200
    @@ -207,11 +207,9 @@
                     ftape_read_proc, NULL) != NULL;
     }
     
    -#ifdef MODULE
    -void ftape_proc_destroy(void)
    +void __exit ftape_proc_destroy(void)
     {
             remove_proc_entry("ftape", &proc_root);
     }
    -#endif
     
     #endif /* defined(CONFIG_PROC_FS) && defined(CONFIG_FT_PROC_FS) */

    cu
    Adrian

    -- 
           "Is there not promise of rain?" Ling Tan asked suddenly out
            of the darkness. There had been need of rain for many days.
           "Only a promise," Lao Er said.
                                           Pearl S. Buck - Dragon Seed
    -
    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: David S. Miller: "Re: [PATCH] 2.6.0-test5-bk11 PKT_CAN_SHARE_SKB [1/3] include/linux/netdevice.h"

    Relevant Pages

    • Re: 2.6.11-rc2-mm1
      ... > It breaks compilation with gcc-4.0 ... This patch is correct, too. ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.6 patch] i386: always use 4k stacks
      ... reverting my patch would be more ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: RFC: [2.6 patch] better i386 CPU selection
      ... I had a short try to port Debian's patch ... This is not related to the issues my patch addresses. ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.6 patch] update Dag Brattlis email address
      ... > This patch is huge. ... There had been need of rain for many days. ... Pearl S. Buck - Dragon Seed ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [-mm patch] SCSI_QLA2ABC options must select FW_LOADER
      ... > I send a patch for this yesterday that lets SCSI_QLA2XXX select ... stay as it is (with the fixes from my patches) doesn't matter much - ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)