All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: acme@ghostprotocols.net
Cc: dccp@vger.kernel.org, netdev@vger.kernel.org
Subject: [RFC] [Patch 1/4] dccp: Remove old CCID-module references
Date: Sat, 20 Dec 2008 09:08:08 +0100	[thread overview]
Message-ID: <20081220080808.GB3853@gerrit.erg.abdn.ac.uk> (raw)
In-Reply-To: 20081218.222842.174783235.davem@davemloft.net

dccp: Remove module references

This removes module references of CCID modules, which are no longer
needed as the configured CCIDs are linked into dccp.ko.
 
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
 net/dccp/ccid.c        |   12 ------------
 net/dccp/ccid.h        |    2 --
 net/dccp/ccids/ccid2.c |    1 -
 net/dccp/ccids/ccid3.c |    1 -
 4 files changed, 16 deletions(-)

--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -29,7 +29,6 @@ struct tcp_info;
  *  @ccid_id: numerical CCID ID (up to %CCID_MAX, cf. table 5 in RFC 4340, 10.)
  *  @ccid_ccmps: the CCMPS including network/transport headers (0 when disabled)
  *  @ccid_name: alphabetical identifier string for @ccid_id
- *  @ccid_owner: module which implements/owns this CCID
  *  @ccid_hc_{r,t}x_slab: memory pool for the receiver/sender half-connection
  *  @ccid_hc_{r,t}x_obj_size: size of the receiver/sender half-connection socket
  *
@@ -48,7 +47,6 @@ struct ccid_operations {
 	unsigned char		ccid_id;
 	__u32			ccid_ccmps;
 	const char		*ccid_name;
-	struct module		*ccid_owner;
 	struct kmem_cache	*ccid_hc_rx_slab,
 				*ccid_hc_tx_slab;
 	__u32			ccid_hc_rx_obj_size,
--- a/net/dccp/ccid.c
+++ b/net/dccp/ccid.c
@@ -283,22 +283,14 @@ struct ccid *ccid_new(unsigned char id, 
 	if (ccid_ops == NULL)
 		goto out_unlock;
 
-	if (!try_module_get(ccid_ops->ccid_owner))
-		goto out_unlock;
-
 	ccids_read_unlock();
 
 	ccid = __ccid_new(ccid_ops, sk, rx, gfp);
-	if (ccid == NULL)
-		goto out_module_put;
 out:
 	return ccid;
 out_unlock:
 	ccids_read_unlock();
 	goto out;
-out_module_put:
-	module_put(ccid_ops->ccid_owner);
-	goto out;
 }
 
 EXPORT_SYMBOL_GPL(ccid_new);
@@ -320,10 +312,6 @@ static void ccid_delete(struct ccid *cci
 			ccid_ops->ccid_hc_tx_exit(sk);
 		kmem_cache_free(ccid_ops->ccid_hc_tx_slab,  ccid);
 	}
-	ccids_read_lock();
-	if (ccids[ccid_ops->ccid_id] != NULL)
-		module_put(ccid_ops->ccid_owner);
-	ccids_read_unlock();
 }
 
 void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk)
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -771,7 +771,6 @@ static void ccid2_hc_rx_packet_recv(stru
 struct ccid_operations ccid2_ops = {
 	.ccid_id		= DCCPC_CCID2,
 	.ccid_name		= "TCP-like",
-	.ccid_owner		= THIS_MODULE,
 	.ccid_hc_tx_obj_size	= sizeof(struct ccid2_hc_tx_sock),
 	.ccid_hc_tx_init	= ccid2_hc_tx_init,
 	.ccid_hc_tx_exit	= ccid2_hc_tx_exit,
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -943,7 +943,6 @@ static int ccid3_hc_rx_getsockopt(struct
 struct ccid_operations ccid3_ops = {
 	.ccid_id		   = DCCPC_CCID3,
 	.ccid_name		   = "TCP-Friendly Rate Control",
-	.ccid_owner		   = THIS_MODULE,
 	.ccid_hc_tx_obj_size	   = sizeof(struct ccid3_hc_tx_sock),
 	.ccid_hc_tx_init	   = ccid3_hc_tx_init,
 	.ccid_hc_tx_exit	   = ccid3_hc_tx_exit,

WARNING: multiple messages have this Message-ID (diff)
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: [RFC] [Patch 1/4] dccp: Remove old CCID-module references
Date: Sat, 20 Dec 2008 08:08:08 +0000	[thread overview]
Message-ID: <20081220080808.GB3853@gerrit.erg.abdn.ac.uk> (raw)

dccp: Remove module references

This removes module references of CCID modules, which are no longer
needed as the configured CCIDs are linked into dccp.ko.
 
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
 net/dccp/ccid.c        |   12 ------------
 net/dccp/ccid.h        |    2 --
 net/dccp/ccids/ccid2.c |    1 -
 net/dccp/ccids/ccid3.c |    1 -
 4 files changed, 16 deletions(-)

--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -29,7 +29,6 @@ struct tcp_info;
  *  @ccid_id: numerical CCID ID (up to %CCID_MAX, cf. table 5 in RFC 4340, 10.)
  *  @ccid_ccmps: the CCMPS including network/transport headers (0 when disabled)
  *  @ccid_name: alphabetical identifier string for @ccid_id
- *  @ccid_owner: module which implements/owns this CCID
  *  @ccid_hc_{r,t}x_slab: memory pool for the receiver/sender half-connection
  *  @ccid_hc_{r,t}x_obj_size: size of the receiver/sender half-connection socket
  *
@@ -48,7 +47,6 @@ struct ccid_operations {
 	unsigned char		ccid_id;
 	__u32			ccid_ccmps;
 	const char		*ccid_name;
-	struct module		*ccid_owner;
 	struct kmem_cache	*ccid_hc_rx_slab,
 				*ccid_hc_tx_slab;
 	__u32			ccid_hc_rx_obj_size,
--- a/net/dccp/ccid.c
+++ b/net/dccp/ccid.c
@@ -283,22 +283,14 @@ struct ccid *ccid_new(unsigned char id, 
 	if (ccid_ops = NULL)
 		goto out_unlock;
 
-	if (!try_module_get(ccid_ops->ccid_owner))
-		goto out_unlock;
-
 	ccids_read_unlock();
 
 	ccid = __ccid_new(ccid_ops, sk, rx, gfp);
-	if (ccid = NULL)
-		goto out_module_put;
 out:
 	return ccid;
 out_unlock:
 	ccids_read_unlock();
 	goto out;
-out_module_put:
-	module_put(ccid_ops->ccid_owner);
-	goto out;
 }
 
 EXPORT_SYMBOL_GPL(ccid_new);
@@ -320,10 +312,6 @@ static void ccid_delete(struct ccid *cci
 			ccid_ops->ccid_hc_tx_exit(sk);
 		kmem_cache_free(ccid_ops->ccid_hc_tx_slab,  ccid);
 	}
-	ccids_read_lock();
-	if (ccids[ccid_ops->ccid_id] != NULL)
-		module_put(ccid_ops->ccid_owner);
-	ccids_read_unlock();
 }
 
 void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk)
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -771,7 +771,6 @@ static void ccid2_hc_rx_packet_recv(stru
 struct ccid_operations ccid2_ops = {
 	.ccid_id		= DCCPC_CCID2,
 	.ccid_name		= "TCP-like",
-	.ccid_owner		= THIS_MODULE,
 	.ccid_hc_tx_obj_size	= sizeof(struct ccid2_hc_tx_sock),
 	.ccid_hc_tx_init	= ccid2_hc_tx_init,
 	.ccid_hc_tx_exit	= ccid2_hc_tx_exit,
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -943,7 +943,6 @@ static int ccid3_hc_rx_getsockopt(struct
 struct ccid_operations ccid3_ops = {
 	.ccid_id		   = DCCPC_CCID3,
 	.ccid_name		   = "TCP-Friendly Rate Control",
-	.ccid_owner		   = THIS_MODULE,
 	.ccid_hc_tx_obj_size	   = sizeof(struct ccid3_hc_tx_sock),
 	.ccid_hc_tx_init	   = ccid3_hc_tx_init,
 	.ccid_hc_tx_exit	   = ccid3_hc_tx_exit,

  parent reply	other threads:[~2008-12-20  8:08 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17 21:46 [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation Arnaldo Carvalho de Melo
2008-12-17 21:46 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Arnaldo Carvalho de Melo
2008-12-18  5:21 ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation David Miller
2008-12-18  5:21   ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: David Miller
2008-12-18  5:33   ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation Gerrit Renker
2008-12-18  5:33     ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Gerrit Renker
2008-12-19  3:15     ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation David Miller
2008-12-19  3:15       ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: David Miller
2008-12-19  5:24       ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation Gerrit Renker
2008-12-19  5:24         ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Gerrit Renker
2008-12-19  6:28         ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation David Miller
2008-12-19  6:28           ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: David Miller
2008-12-19  7:56           ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation gerrit
2008-12-19  7:56             ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: gerrit
2008-12-20 23:51             ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Auto-load (when supported) CCID plugins for negotiation Arnaldo Carvalho de Melo
2008-12-20 23:51               ` [RFCv2][PATCH] static builtin CCIDs was Re: [PATCH 2/5] dccp: Arnaldo Carvalho de Melo
2008-12-20  8:08           ` [RFC] [Patch 0/4] dccp: Working prototype of integrating the modules Gerrit Renker
2008-12-20  8:08             ` [RFC] [Patch 0/4] dccp: Working prototype of integrating the Gerrit Renker
2008-12-20  8:08           ` Gerrit Renker [this message]
2008-12-20  8:08             ` [RFC] [Patch 1/4] dccp: Remove old CCID-module references Gerrit Renker
2008-12-20  8:08           ` [RFC] [Patch 2/4] dccp: Lockless use of CCID blocks Gerrit Renker
2008-12-20  8:08             ` Gerrit Renker
2008-12-21  0:32             ` Arnaldo Carvalho de Melo
2008-12-21  0:32               ` Arnaldo Carvalho de Melo
2008-12-23 17:08               ` Gerrit Renker
2008-12-23 17:08                 ` Gerrit Renker
2008-12-23 17:17               ` Gerrit Renker
2008-12-23 17:17                 ` Gerrit Renker
2009-01-01 10:49                 ` Gerrit Renker
2009-01-01 10:49                   ` Gerrit Renker
2009-01-03  7:30                   ` [Patch 0/3] " Gerrit Renker
2009-01-03  7:30                     ` Gerrit Renker
2009-01-03  7:30                     ` [PATCH 1/3] dccp: Lockless integration of CCID congestion-control plugins Gerrit Renker
2009-01-03  7:30                       ` Gerrit Renker
2009-01-03  7:30                       ` [PATCH 2/3] dccp: Clean up ccid.c after integration of CCID plugins Gerrit Renker
2009-01-03  7:30                         ` Gerrit Renker
2009-01-03  7:30                         ` [PATCH 3/3] dccp: Integrate the TFRC library with DCCP Gerrit Renker
2009-01-03  7:30                           ` Gerrit Renker
2009-01-05  5:46                           ` David Miller
2009-01-05  5:46                             ` David Miller
2009-01-17  9:36                             ` [PATCH 0/4] dccp: Completing feature negotiation Gerrit Renker
2009-01-17  9:36                               ` Gerrit Renker
2009-01-17  9:36                               ` [PATCH 1/4] dccp: Initialisation framework for " Gerrit Renker
2009-01-17  9:36                                 ` Gerrit Renker
2009-01-17  9:36                                 ` [PATCH 2/4] dccp: Implement both feature-local and feature-remote Sequence Window feature Gerrit Renker
2009-01-17  9:36                                   ` Gerrit Renker
2009-01-17  9:36                                   ` [PATCH 3/4] dccp: Initialisation and type-checking of feature sysctls Gerrit Renker
2009-01-17  9:36                                     ` Gerrit Renker
2009-01-17  9:36                                     ` [PATCH 4/4] dccp: Debugging functions for feature negotiation Gerrit Renker
2009-01-17  9:36                                       ` Gerrit Renker
2009-01-19  5:40                                       ` David Miller
2009-01-19  5:40                                         ` David Miller
2009-01-19  5:40                                     ` [PATCH 3/4] dccp: Initialisation and type-checking of feature sysctls David Miller
2009-01-19  5:40                                       ` [PATCH 3/4] dccp: Initialisation and type-checking of feature David Miller
2009-01-19  5:40                                   ` [PATCH 2/4] dccp: Implement both feature-local and feature-remote Sequence Window feature David Miller
2009-01-19  5:40                                     ` [PATCH 2/4] dccp: Implement both feature-local and David Miller
2009-01-19  5:39                                 ` [PATCH 1/4] dccp: Initialisation framework for feature negotiation David Miller
2009-01-19  5:39                                   ` [PATCH 1/4] dccp: Initialisation framework for feature David Miller
2009-01-05  5:46                         ` [PATCH 2/3] dccp: Clean up ccid.c after integration of CCID plugins David Miller
2009-01-05  5:46                           ` [PATCH 2/3] dccp: Clean up ccid.c after integration of CCID David Miller
2009-01-05  5:45                       ` [PATCH 1/3] dccp: Lockless integration of CCID congestion-control plugins David Miller
2009-01-05  5:45                         ` [PATCH 1/3] dccp: Lockless integration of CCID David Miller
2008-12-20  8:08           ` [RFC] [Patch 3/4] dccp: Add unregister function Gerrit Renker
2008-12-20  8:08             ` Gerrit Renker
2008-12-21  0:35             ` Arnaldo Carvalho de Melo
2008-12-21  0:35               ` Arnaldo Carvalho de Melo
2008-12-20  8:08           ` [RFC] [Patch 4/4] dccp: Integrate the TFRC library (dependency) Gerrit Renker
2008-12-20  8:08             ` Gerrit Renker
2008-12-21  0:55             ` Arnaldo Carvalho de Melo
2008-12-21  0:55               ` Arnaldo Carvalho de Melo
2008-12-23 10:54               ` Gerrit Renker
2008-12-23 10:54                 ` Gerrit Renker

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=20081220080808.GB3853@gerrit.erg.abdn.ac.uk \
    --to=gerrit@erg.abdn.ac.uk \
    --cc=acme@ghostprotocols.net \
    --cc=dccp@vger.kernel.org \
    --cc=netdev@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 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.