mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: Christoph Hellwig <hch@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] fix non-modular ftape compile
Date: Thu, 25 Sep 2003 13:03:25 +0200	[thread overview]
Message-ID: <20030925110325.GK15696@fs.tum.de> (raw)
In-Reply-To: <20030925113816.A9693@infradead.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


  reply	other threads:[~2003-09-25 11:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-25 10:23 Adrian Bunk
2003-09-25 10:38 ` Christoph Hellwig
2003-09-25 11:03   ` Adrian Bunk [this message]
2003-09-25 11:19     ` Christoph Hellwig
2003-09-25 11:30       ` Adrian Bunk

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=20030925110325.GK15696@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®