All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Nenad Corbic <ncorbic@sangoma.com>, "David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH] Eliminate MOD_ from wanrouter
Date: Fri, 18 Jul 2003 13:35:12 -0700	[thread overview]
Message-ID: <20030718133512.434b1e70.shemminger@osdl.org> (raw)

Wan router register/unregister doesn't need MOD_INC/MOD_DEC because it
can't be unloaded as long as it's symbols are in use by the calling module.

Patch against 2.6.0-test1

diff -Nru a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
--- a/net/wanrouter/wanmain.c	Fri Jul 18 13:20:48 2003
+++ b/net/wanrouter/wanmain.c	Fri Jul 18 13:20:48 2003
@@ -305,7 +305,6 @@
 	wandev->dev  = NULL;
 	wandev->next = wanrouter_router_devlist;
 	wanrouter_router_devlist = wandev;
-        MOD_INC_USE_COUNT;	/* prevent module from unloading */
 	return 0;
 }
 
@@ -350,7 +349,6 @@
 		wanrouter_router_devlist = wandev->next;
 
 	wanrouter_proc_delete(wandev);
-        MOD_DEC_USE_COUNT;
 	return 0;
 }
 

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-18 20:35 Stephen Hemminger [this message]
2003-07-20  4:48 ` [PATCH] Eliminate MOD_ from wanrouter 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=20030718133512.434b1e70.shemminger@osdl.org \
    --to=shemminger@osdl.org \
    --cc=davem@redhat.com \
    --cc=ncorbic@sangoma.com \
    --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.