Skip to contentSkip to conversation

ATM - kill __free_atm_dev()

PATCH New John Levon 1 participant 1 message Sep 5, 2003

Subsystems (3)
lore
Share & tools
lore

John Levon

author
#0 lore raw

PATCH 1/1 ATM - kill __free_atm_dev()

Apply the "Levonov abstraction penalty" - the wrapping of kfree() is pure obfuscation.

regards
john

net/atm/resources.c +3 -8
diff -Naurp -X dontdiff linux-cvs/net/atm/resources.c linux-fixes/net/atm/resources.c
@@ -42,11 +42,6 @@ static struct atm_dev *__alloc_atm_dev(c
 	return dev;
 }
 
-static void __free_atm_dev(struct atm_dev *dev)
-{
-	kfree(dev);
-}
-
 static struct atm_dev *__atm_dev_lookup(int number)
 {
 	struct atm_dev *dev;
@@ -88,7 +83,7 @@ struct atm_dev *atm_dev_register(const c
 		if ((inuse = __atm_dev_lookup(number))) {
 			atm_dev_put(inuse);
 			spin_unlock(&atm_dev_lock);
-			__free_atm_dev(dev);
+			kfree(dev);
 			return NULL;
 		}
 		dev->number = number;
@@ -119,7 +114,7 @@ struct atm_dev *atm_dev_register(const c
 			spin_lock(&atm_dev_lock);
 			list_del(&dev->dev_list);
 			spin_unlock(&atm_dev_lock);
-			__free_atm_dev(dev);
+			kfree(dev);
 			return NULL;
 		}
 	}
@@ -154,7 +149,7 @@ void atm_dev_deregister(struct atm_dev *
                 }
         }
 
-	__free_atm_dev(dev);
+	kfree(dev);
 }
 
 void shutdown_atm_dev(struct atm_dev *dev)