From: Olaf Hering Date: Tue, 22 Jul 2014 07:19:16 +0000 (+0200) Subject: mini-os: tpm: remove usage of inline keyword X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b5b5d2114948ae355648d8731c1a4033291ab944;p=people%2Fliuw%2Flibxenctrl-split%2Fmini-os.git mini-os: tpm: remove usage of inline keyword Compilation fails with gcc-4.3: tpmback.c: In function 'tpmback_resp': tpmback.c:148: error: inlining failed in call to 'tpmdev_check_req': call is unlikely and code size would grow tpmback.c:165: error: called from here tpmback.c: In function 'new_tpmif': tpmback.c:384: error: inlining failed in call to '__init_tpmif': call is unlikely and code size would grow tpmback.c:425: error: called from here Adjust code to use static instead of inline, it has the same effect. Change also tpmif_req_ready and tpmif_req_finished before they start to cause failures. Signed-off-by: Olaf Hering Acked-by: Samuel Thibault --- diff --git a/tpmback.c b/tpmback.c index 31da8d5..00b66e8 100644 --- a/tpmback.c +++ b/tpmback.c @@ -140,12 +140,12 @@ int globalinit = 0; * Duplicates are not allowed * **********************************/ -inline void tpmif_req_ready(tpmif_t* tpmif) { +static void tpmif_req_ready(tpmif_t* tpmif) { tpmif->flags |= TPMIF_REQ_READY; gtpmdev.flags |= TPMIF_REQ_READY; } -inline void tpmdev_check_req(void) { +static void tpmdev_check_req(void) { int i; int flags; local_irq_save(flags); @@ -160,7 +160,7 @@ inline void tpmdev_check_req(void) { local_irq_restore(flags); } -inline void tpmif_req_finished(tpmif_t* tpmif) { +static void tpmif_req_finished(tpmif_t* tpmif) { tpmif->flags &= ~TPMIF_REQ_READY; tpmdev_check_req(); } @@ -382,7 +382,7 @@ int tpmif_change_state(tpmif_t* tpmif, enum xenbus_state state) /********************************** * TPMIF CREATION AND DELETION * *******************************/ -inline tpmif_t* __init_tpmif(domid_t domid, unsigned int handle) +static tpmif_t* __init_tpmif(domid_t domid, unsigned int handle) { tpmif_t* tpmif; tpmif = malloc(sizeof(*tpmif));