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@aepfle.de>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
Olaf Hering authored and Ian Campbell committed 2014-07-24 16:23:18 +01:00
1 parent 52bdfeacbb
commit c552a43edb
1 file changed
+4 -4
+4 -4
View File
@@ -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));
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.