All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Henner Eisen <eis@baty.hanse.de>, "David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH] Remove MOD_* from LAPB
Date: Fri, 18 Jul 2003 13:32:11 -0700	[thread overview]
Message-ID: <20030718133211.1c7ed08d.shemminger@osdl.org> (raw)

The MOD_INC and MOD_DEC in lapb are no longer necessary in 2.6 since
the module subsystem will not allow lapb to be unloaded as long as a module
that is referencing the symbols (lapb_register/lapb_unregister) is loaded.

The lapb parameter block does have callback's so it is up to the caller
to correctly unregister on module exit; and looking at the existing code
it does do that.

Patch is against 2.6-test1

diff -Nru a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c
--- a/net/lapb/lapb_iface.c	Fri Jul 18 13:21:02 2003
+++ b/net/lapb/lapb_iface.c	Fri Jul 18 13:21:02 2003
@@ -43,13 +43,11 @@
 static rwlock_t lapb_list_lock = RW_LOCK_UNLOCKED;
 
 /*
- *	Free an allocated lapb control block. This is done to centralise
- *	the MOD count code.
+ *	Free an allocated lapb control block. 
  */
 static void lapb_free_cb(struct lapb_cb *lapb)
 {
 	kfree(lapb);
-	MOD_DEC_USE_COUNT;
 }
 
 static __inline__ void lapb_hold(struct lapb_cb *lapb)
@@ -126,8 +124,6 @@
 
 	if (!lapb)
 		goto out;
-
-	MOD_INC_USE_COUNT;
 
 	memset(lapb, 0x00, sizeof(*lapb));
 

             reply	other threads:[~2003-07-18 20:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-18 20:32 Stephen Hemminger [this message]
2003-07-18 22:01 ` [PATCH] Allow lapb to be unloaded Stephen Hemminger
2003-07-20  4:47   ` David S. Miller
2003-07-20  4:44 ` [PATCH] Remove MOD_* from LAPB David S. Miller

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=20030718133211.1c7ed08d.shemminger@osdl.org \
    --to=shemminger@osdl.org \
    --cc=davem@redhat.com \
    --cc=eis@baty.hanse.de \
    --cc=netdev@oss.sgi.com \
    /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.