[libvirt] [PATCH] device_conf: Let compiler decide on inlining functions

Martin Kletzander mkletzan at redhat.com
Tue Aug 2 05:52:07 UTC 2016

On Mon, Aug 01, 2016 at 06:21:49PM +0200, Michal Privoznik wrote:
>There's no point in forcing some functions to be both 'static'
>and 'inline' at the same time at the header file level. This
>leads to a situation where just linking the file defines those
>function (potentially needlessly). Instead, we should let the
>compiler (linker) decide whether the function are small enough to
>be inlined or not.

If I understand it correctly, these will not get inlined after your
change at all because they will be assembled only in that device_conf.c.
If you wanted to make the compiler decide, you'd need to keep it in the
header file and just remove the inline keyword.

But I'm not basing this on anything more than my common sense, so if I'm
wrong, feel free to correct me with some facts =)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160802/ff7f9807/attachment-0001.sig>

More information about the libvir-list mailing list