2005-12-03 12:24:39

by Adrian Bunk

[permalink] [raw]
Subject: [2.6 patch] make i2o_iop_free() static inline

It's only a micro-optimizatin, but why not save a few bytes?


Signed-off-by: Adrian Bunk <[email protected]>

--- linux-2.6.15-rc3-mm1/drivers/message/i2o/core.h.old 2005-12-03 02:47:00.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/message/i2o/core.h 2005-12-03 02:49:05.000000000 +0100
@@ -38,7 +38,15 @@

/* IOP */
extern struct i2o_controller *i2o_iop_alloc(void);
-extern void i2o_iop_free(struct i2o_controller *);
+
+/**
+ * i2o_iop_free - Free the i2o_controller struct
+ * @c: I2O controller to free
+ */
+static inline void i2o_iop_free(struct i2o_controller *c)
+{
+ kfree(c);
+}

extern int i2o_iop_add(struct i2o_controller *);
extern void i2o_iop_remove(struct i2o_controller *);
--- linux-2.6.15-rc3-mm1/drivers/message/i2o/iop.c.old 2005-12-03 02:47:14.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/message/i2o/iop.c 2005-12-03 02:48:21.000000000 +0100
@@ -1051,15 +1051,6 @@
}

/**
- * i2o_iop_free - Free the i2o_controller struct
- * @c: I2O controller to free
- */
-void i2o_iop_free(struct i2o_controller *c)
-{
- kfree(c);
-};
-
-/**
* i2o_iop_release - release the memory for a I2O controller
* @dev: I2O controller which should be released
*


2005-12-04 22:35:17

by Markus Lidel

[permalink] [raw]
Subject: Re: [2.6 patch] make i2o_iop_free() static inline

Hello,

Adrian Bunk wrote:
> It's only a micro-optimizatin, but why not save a few bytes?

I fully agree :-)

Thanks!

> Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Markus Lidel <[email protected]>

Best regards,


Markus Lidel
------------------------------------------
Markus Lidel (Senior IT Consultant)

Shadow Connect GmbH
Carl-Reisch-Weg 12
D-86381 Krumbach
Germany

Phone: +49 82 82/99 51-0
Fax: +49 82 82/99 51-11

E-Mail: [email protected]
URL: http://www.shadowconnect.com