switchdev: remove "ABORT" transaction phase
authorJiri Pirko <jiri@mellanox.com>
Thu, 24 Sep 2015 08:02:47 +0000 (10:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Sep 2015 05:59:22 +0000 (22:59 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/switchdev.h
net/switchdev/switchdev.c

index f61ee38c7c9639142604bd1d6bac61c3f8003780..9cf372fe136502053ba600bf280e0f51c72575c0 100644 (file)
@@ -19,7 +19,6 @@
 
 enum switchdev_trans_ph {
        SWITCHDEV_TRANS_PREPARE,
-       SWITCHDEV_TRANS_ABORT,
        SWITCHDEV_TRANS_COMMIT,
 };
 
index d1c7d51620b1a34371d1e39c2c42e71cfb687f54..1adeedade0fbb963f01df487ce60b69bf4a16aa2 100644 (file)
@@ -248,11 +248,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;
        }
@@ -334,11 +331,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;
        }