From mboxrd@z Thu Jan 1 00:00:00 1970 From: bernd@petrovitsch.priv.at (Bernd Petrovitsch) Date: Mon, 23 Dec 2013 13:03:00 +0100 Subject: Linux-wireless: why use macro to call functions In-Reply-To: <52b80f05.c7b60e0a.2515.5c5e@mx.google.com> References: <52b80f05.c7b60e0a.2515.5c5e@mx.google.com> Message-ID: <1387800180.1784.65.camel@thorin> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi! On Mon, 2013-12-23 at 11:23 +0100, Martin Brugnara wrote: [...] > Why here is used a macro instead of an inline func. Maybe you should get a book to learn "C"? The macro uses "goto" which won't work with inline functions in that situation. Since the macro uses the only argument exactly once, it actually makes no functional/semantic difference if it is a macro or would be an inline function (and performance-wise very probably too with any somewhat recent compiler). And the macro just avoids to copy-paste identical lines/logic. And you surely should learn to quote correctly and thus avoid top posting completely. [... fullquote deleted ...] Bernd -- Bernd Petrovitsch Email : bernd at petrovitsch.priv.at LUGA : http://www.luga.at