[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/3] 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 <olaf@xxxxxxxxx>
---
 extras/mini-os/tpmback.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/extras/mini-os/tpmback.c b/extras/mini-os/tpmback.c
index 31da8d5..00b66e8 100644
--- a/extras/mini-os/tpmback.c
+++ b/extras/mini-os/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));

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.