Commit 63319ba2 authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

staging/mei: mei-amt-version - make all function static and used

This patch eliminates following type of warnings
warning: no previous prototype for '...func...' [-Wmissing-prototypes]

For this is a single file example lets make all API-like functions
be static.
Since all static functions should be used so let's call
to amt_host_if_deinit() even if in this example it's not really necessary
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Acked-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4b00706c
...@@ -293,7 +293,7 @@ struct amt_host_if { ...@@ -293,7 +293,7 @@ struct amt_host_if {
}; };
bool amt_host_if_init(struct amt_host_if *acmd, static bool amt_host_if_init(struct amt_host_if *acmd,
unsigned long send_timeout, bool verbose) unsigned long send_timeout, bool verbose)
{ {
acmd->send_timeout = (send_timeout) ? send_timeout : 20000; acmd->send_timeout = (send_timeout) ? send_timeout : 20000;
...@@ -301,13 +301,13 @@ bool amt_host_if_init(struct amt_host_if *acmd, ...@@ -301,13 +301,13 @@ bool amt_host_if_init(struct amt_host_if *acmd,
return acmd->initialized; return acmd->initialized;
} }
void amt_host_if_deinit(struct amt_host_if *acmd) static void amt_host_if_deinit(struct amt_host_if *acmd)
{ {
mei_deinit(&acmd->mei_cl); mei_deinit(&acmd->mei_cl);
acmd->initialized = false; acmd->initialized = false;
} }
uint32_t amt_verify_code_versions(const struct amt_host_if_resp_header *resp) static uint32_t amt_verify_code_versions(const struct amt_host_if_resp_header *resp)
{ {
uint32_t status = AMT_STATUS_SUCCESS; uint32_t status = AMT_STATUS_SUCCESS;
struct amt_code_versions *code_ver; struct amt_code_versions *code_ver;
...@@ -346,7 +346,7 @@ uint32_t amt_verify_code_versions(const struct amt_host_if_resp_header *resp) ...@@ -346,7 +346,7 @@ uint32_t amt_verify_code_versions(const struct amt_host_if_resp_header *resp)
return status; return status;
} }
uint32_t amt_verify_response_header(uint32_t command, static uint32_t amt_verify_response_header(uint32_t command,
const struct amt_host_if_msg_header *resp_hdr, const struct amt_host_if_msg_header *resp_hdr,
uint32_t response_size) uint32_t response_size)
{ {
...@@ -409,7 +409,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd, ...@@ -409,7 +409,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd,
} }
uint32_t amt_get_code_versions(struct amt_host_if *cmd, static uint32_t amt_get_code_versions(struct amt_host_if *cmd,
struct amt_code_versions *versions) struct amt_code_versions *versions)
{ {
struct amt_host_if_resp_header *response = NULL; struct amt_host_if_resp_header *response = NULL;
...@@ -455,6 +455,8 @@ int main(int argc, char **argv) ...@@ -455,6 +455,8 @@ int main(int argc, char **argv)
status = amt_get_code_versions(&acmd, &ver); status = amt_get_code_versions(&acmd, &ver);
amt_host_if_deinit(&acmd);
switch (status) { switch (status) {
case AMT_STATUS_HOST_IF_EMPTY_RESPONSE: case AMT_STATUS_HOST_IF_EMPTY_RESPONSE:
printf("Intel AMT: DISABLED\n"); printf("Intel AMT: DISABLED\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment