diff mbox

[net-next,3/3] caif: Remove unused enum and parameter in cfserl

Message ID 1322680968-6470-3-git-send-email-sjur.brandeland@stericsson.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

sjur.brandeland@stericsson.com Nov. 30, 2011, 7:22 p.m. UTC
Remove unused enum cfcnfg_phy_type and the parameter to cfserl_create.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
 include/net/caif/cfcnfg.h |   14 --------------
 include/net/caif/cfserl.h |    4 ++--
 net/caif/caif_dev.c       |    2 +-
 net/caif/cfserl.c         |    3 +--
 4 files changed, 4 insertions(+), 19 deletions(-)

Comments

David Miller Nov. 30, 2011, 10:04 p.m. UTC | #1
From: Sjur Brændeland <sjur.brandeland@stericsson.com>
Date: Wed, 30 Nov 2011 20:22:48 +0100

>  			link_support = cfserl_create(dev->ifindex,
> -					CFPHYTYPE_FRAG, caifdev->use_stx);
> +							caifdev->use_stx);
>  			if (!link_support) {
>  				pr_warn("Out of memory\n");
>  				break;
 ...
> -struct cflayer *cfserl_create(int type, int instance, bool use_stx)
> +struct cflayer *cfserl_create(int instance, bool use_stx)
>  {

Looks like this code was always buggy, passing the index in the type parameter
and the type in the instance parameter.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Dec. 1, 2011, 4:38 a.m. UTC | #2
From: Sjur Brændeland <sjur.brandeland@stericsson.com>
Date: Wed, 30 Nov 2011 20:22:48 +0100

> Remove unused enum cfcnfg_phy_type and the parameter to cfserl_create.
> 
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h
index a421723..90b4ff8 100644
--- a/include/net/caif/cfcnfg.h
+++ b/include/net/caif/cfcnfg.h
@@ -14,18 +14,6 @@ 
 struct cfcnfg;
 
 /**
- * enum cfcnfg_phy_type -  Types of physical layers defined in CAIF Stack
- *
- * @CFPHYTYPE_FRAG:	Fragmented frames physical interface.
- * @CFPHYTYPE_CAIF:	Generic CAIF physical interface
- */
-enum cfcnfg_phy_type {
-	CFPHYTYPE_FRAG = 1,
-	CFPHYTYPE_CAIF,
-	CFPHYTYPE_MAX
-};
-
-/**
  * enum cfcnfg_phy_preference - Physical preference HW Abstraction
  *
  * @CFPHYPREF_UNSPECIFIED:	Default physical interface
@@ -66,8 +54,6 @@  void cfcnfg_remove(struct cfcnfg *cfg);
  * cfcnfg_add_phy_layer() - Adds a physical layer to the CAIF stack.
  * @cnfg:	Pointer to a CAIF configuration object, created by
  *		cfcnfg_create().
- * @phy_type:	Specifies the type of physical interface, e.g.
- *			CFPHYTYPE_FRAG.
  * @dev:	Pointer to link layer device
  * @phy_layer:	Specify the physical layer. The transmit function
  *		MUST be set in the structure.
diff --git a/include/net/caif/cfserl.h b/include/net/caif/cfserl.h
index b837432..f121299 100644
--- a/include/net/caif/cfserl.h
+++ b/include/net/caif/cfserl.h
@@ -8,5 +8,5 @@ 
 #define CFSERL_H_
 #include <net/caif/caif_layer.h>
 
-struct cflayer *cfserl_create(int type, int instance, bool use_stx);
-#endif				/* CFSERL_H_ */
+struct cflayer *cfserl_create(int instance, bool use_stx);
+#endif
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index 70034c0..f7e8c70 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -295,7 +295,7 @@  static int caif_device_notify(struct notifier_block *me, unsigned long what,
 		if (caifdev->use_frag) {
 			head_room = 1;
 			link_support = cfserl_create(dev->ifindex,
-					CFPHYTYPE_FRAG, caifdev->use_stx);
+							caifdev->use_stx);
 			if (!link_support) {
 				pr_warn("Out of memory\n");
 				break;
diff --git a/net/caif/cfserl.c b/net/caif/cfserl.c
index 797c8d1..8e68b97 100644
--- a/net/caif/cfserl.c
+++ b/net/caif/cfserl.c
@@ -31,7 +31,7 @@  static int cfserl_transmit(struct cflayer *layr, struct cfpkt *pkt);
 static void cfserl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
 				int phyid);
 
-struct cflayer *cfserl_create(int type, int instance, bool use_stx)
+struct cflayer *cfserl_create(int instance, bool use_stx)
 {
 	struct cfserl *this = kzalloc(sizeof(struct cfserl), GFP_ATOMIC);
 	if (!this)
@@ -40,7 +40,6 @@  struct cflayer *cfserl_create(int type, int instance, bool use_stx)
 	this->layer.receive = cfserl_receive;
 	this->layer.transmit = cfserl_transmit;
 	this->layer.ctrlcmd = cfserl_ctrlcmd;
-	this->layer.type = type;
 	this->usestx = use_stx;
 	spin_lock_init(&this->sync);
 	snprintf(this->layer.name, CAIF_LAYER_NAME_SZ, "ser1");