summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorAaron Gamble <jgamble@nvidia.com>2013-06-28 13:17:14 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 13:39:02 -0700
commitd5cda7d6432099b74d6d4890459a4cde1e0545dd (patch)
tree959bc36a05814c0c1ca4f091e1abf1cdb00c1c6e /security
parentbdba933c99d310070abe7c713aaf4e01bf6bc912 (diff)
security: tlk_driver: result_origin consistency
For the sake of consistency with other projects, change: OTE_ERROR_ORIGIN_* return_origin error_origin to match result_origin Change-Id: I571c81a387ab35ed05cc3002371bc5d6ae606178 Signed-off-by: Aaron Gamble <jgamble@nvidia.com> Reviewed-on: http://git-master/r/243549 (cherry picked from commit 1a1e6ac1e74a2594662f4601f7a37baf4d4b78bd) Reviewed-on: http://git-master/r/256381 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: James Zhao <jamesz@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'security')
-rw-r--r--security/tlk_driver/ote_comms.c4
-rw-r--r--security/tlk_driver/ote_device.c8
-rw-r--r--security/tlk_driver/ote_protocol.h2
-rw-r--r--security/tlk_driver/ote_types.h8
4 files changed, 11 insertions, 11 deletions
diff --git a/security/tlk_driver/ote_comms.c b/security/tlk_driver/ote_comms.c
index 693650c0d566..40a3ec723ce8 100644
--- a/security/tlk_driver/ote_comms.c
+++ b/security/tlk_driver/ote_comms.c
@@ -291,7 +291,7 @@ void te_open_session(struct te_opensession *cmd,
ret = te_setup_temp_buffers(request, context);
if (ret != OTE_SUCCESS) {
pr_err("te_setup_temp_buffers failed err (0x%x)\n", ret);
- SET_RESULT(request, ret, OTE_ERROR_ORIGIN_API);
+ SET_RESULT(request, ret, OTE_RESULT_ORIGIN_API);
return;
}
@@ -338,7 +338,7 @@ void te_launch_operation(struct te_launchop *cmd,
ret = te_setup_temp_buffers(request, context);
if (ret != OTE_SUCCESS) {
pr_err("te_setup_temp_buffers failed err (0x%x)\n", ret);
- SET_RESULT(request, ret, OTE_ERROR_ORIGIN_API);
+ SET_RESULT(request, ret, OTE_RESULT_ORIGIN_API);
return;
}
diff --git a/security/tlk_driver/ote_device.c b/security/tlk_driver/ote_device.c
index 5c5447b89a51..f9b0e5647efd 100644
--- a/security/tlk_driver/ote_device.c
+++ b/security/tlk_driver/ote_device.c
@@ -32,7 +32,7 @@
#include "ote_protocol.h"
-#define SET_ANSWER(a, r, ro) { a.result = r; a.return_origin = ro; }
+#define SET_ANSWER(a, r, ro) { a.result = r; a.result_origin = ro; }
#define CREATE_TRACE_POINTS
#include <trace/events/nvsecurity.h>
@@ -293,7 +293,7 @@ static long te_handle_trustedapp_ioctl(struct file *file,
if (!cmd_desc || (operation->list_count && !params)) {
SET_ANSWER(answer,
OTE_ERROR_OUT_OF_MEMORY,
- OTE_ERROR_ORIGIN_COMMS);
+ OTE_RESULT_ORIGIN_COMMS);
pr_err("failed to get cmd_desc/params\n");
goto error;
}
@@ -322,7 +322,7 @@ static long te_handle_trustedapp_ioctl(struct file *file,
if (!cmd_desc) {
SET_ANSWER(answer,
OTE_ERROR_OUT_OF_MEMORY,
- OTE_ERROR_ORIGIN_COMMS);
+ OTE_RESULT_ORIGIN_COMMS);
pr_err("failed to get cmd_desc\n");
goto error;
}
@@ -344,7 +344,7 @@ static long te_handle_trustedapp_ioctl(struct file *file,
if (!cmd_desc || (operation->list_count && !params)) {
SET_ANSWER(answer,
OTE_ERROR_OUT_OF_MEMORY,
- OTE_ERROR_ORIGIN_COMMS);
+ OTE_RESULT_ORIGIN_COMMS);
pr_err("failed to get cmd_desc/params\n");
goto error;
}
diff --git a/security/tlk_driver/ote_protocol.h b/security/tlk_driver/ote_protocol.h
index 531406e8b3fb..b471a1812549 100644
--- a/security/tlk_driver/ote_protocol.h
+++ b/security/tlk_driver/ote_protocol.h
@@ -167,7 +167,7 @@ struct te_request {
struct te_answer {
uint32_t result;
uint32_t session_id;
- uint32_t return_origin;
+ uint32_t result_origin;
};
void te_open_session(struct te_opensession *cmd,
diff --git a/security/tlk_driver/ote_types.h b/security/tlk_driver/ote_types.h
index ef82d4ffec9d..593400f7a03a 100644
--- a/security/tlk_driver/ote_types.h
+++ b/security/tlk_driver/ote_types.h
@@ -67,13 +67,13 @@ enum {
*/
enum {
/* Originated from OTE Client API */
- OTE_ERROR_ORIGIN_API = 1,
+ OTE_RESULT_ORIGIN_API = 1,
/* Originated from Underlying Communication Stack */
- OTE_ERROR_ORIGIN_COMMS = 2,
+ OTE_RESULT_ORIGIN_COMMS = 2,
/* Originated from Common OTE Code */
- OTE_ERROR_ORIGIN_KERNEL = 3,
+ OTE_RESULT_ORIGIN_KERNEL = 3,
/* Originated from Trusted APP Code */
- OTE_ERROR_ORIGIN_TRUSTED_APP = 4,
+ OTE_RESULT_ORIGIN_TRUSTED_APP = 4,
};
#endif