diff mbox

[net-next,v2,08/10] switchdev: remove "ABORT" transaction phase

Message ID 1442995078-10491-9-git-send-email-jiri@resnulli.us
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Jiri Pirko Sept. 23, 2015, 7:57 a.m. UTC
From: Jiri Pirko <jiri@mellanox.com>

No longer used by drivers, as transaction queue with item destructors
takes care of abort phase internally in switchdev code. So kill it.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 include/net/switchdev.h   |  1 -
 net/switchdev/switchdev.c | 10 ++--------
 2 files changed, 2 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index f61ee38..9cf372f 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -19,7 +19,6 @@ 
 
 enum switchdev_trans_ph {
 	SWITCHDEV_TRANS_PREPARE,
-	SWITCHDEV_TRANS_ABORT,
 	SWITCHDEV_TRANS_COMMIT,
 };
 
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 6f35ca1..45b60f1 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -240,11 +240,8 @@  int switchdev_port_attr_set(struct net_device *dev, struct switchdev_attr *attr)
 		 * released.
 		 */
 
-		if (err != -EOPNOTSUPP) {
-			trans.ph = SWITCHDEV_TRANS_ABORT;
-			__switchdev_port_attr_set(dev, attr, &trans);
+		if (err != -EOPNOTSUPP)
 			switchdev_trans_items_destroy(&trans);
-		}
 
 		return err;
 	}
@@ -326,11 +323,8 @@  int switchdev_port_obj_add(struct net_device *dev, struct switchdev_obj *obj)
 		 * released.
 		 */
 
-		if (err != -EOPNOTSUPP) {
-			trans.ph = SWITCHDEV_TRANS_ABORT;
-			__switchdev_port_obj_add(dev, obj, &trans);
+		if (err != -EOPNOTSUPP)
 			switchdev_trans_items_destroy(&trans);
-		}
 
 		return err;
 	}