]> xenbits.xensource.com Git - people/liuw/mini-os.git/commitdiff
mini-os: tpm: remove usage of inline keyword
authorOlaf Hering <olaf@aepfle.de>
Tue, 22 Jul 2014 07:19:16 +0000 (09:19 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 24 Jul 2014 15:23:18 +0000 (16:23 +0100)
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 <olaf@aepfle.de>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
tpmback.c

index 31da8d5946498ce5c2d2b987e08e567806e1c6d9..00b66e8efe344d9a7ca9b82dc199df328279246c 100644 (file)
--- 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));