diff mbox

[03/16] api: odp_crypto.h: return descriptions

Message ID 1422528008-29845-4-git-send-email-ola.liljedahl@linaro.org
State New
Headers show

Commit Message

Ola Liljedahl Jan. 29, 2015, 10:39 a.m. UTC
Updated doxygen descriptions, particularly the @return/@retval descriptions.
No change of implementation necessary.

Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org>
---
(This document/code contribution attached is provided under the terms of
agreement LES-LTM-21309)

 platform/linux-generic/include/api/odp_crypto.h | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/include/api/odp_crypto.h b/platform/linux-generic/include/api/odp_crypto.h
index da6041c..ed51860 100644
--- a/platform/linux-generic/include/api/odp_crypto.h
+++ b/platform/linux-generic/include/api/odp_crypto.h
@@ -218,7 +218,8 @@  typedef struct odp_crypto_compl_status {
  * @param session           Created session else ODP_CRYPTO_SESSION_INVALID
  * @param status            Failure code if unsuccessful
  *
- * @return 0 if successful else -1
+ * @retval 0 on success
+ * @retval <0 on failure
  */
 int
 odp_crypto_session_create(odp_crypto_session_params_t *params,
@@ -242,7 +243,8 @@  odp_crypto_session_create(odp_crypto_session_params_t *params,
  * @param posted            Pointer to return posted, TRUE for async operation
  * @param completion_event  Event by which the operation results are delivered.
  *
- * @return 0 if successful else -1
+ * @retval 0 on success
+ * @retval <0 on failure
  */
 int
 odp_crypto_operation(odp_crypto_op_params_t *params,
@@ -281,7 +283,7 @@  odp_crypto_get_operation_compl_status(odp_event_t completion_event,
  *
  * @param completion_event  Event containing operation results
  *
- * @return Packet structure where data now resides
+ * @return Handle for packet where data now resides
  */
 odp_packet_t
 odp_crypto_get_operation_compl_packet(odp_event_t completion_event);
@@ -297,18 +299,20 @@  void *
 odp_crypto_get_operation_compl_ctx(odp_event_t completion_event);
 
 /**
- * Generate random byte string
+ * Generate random byte data
  *
- * @param buf          Pointer to store result
- * @param len          Pointer to input length value as well as return value
- * @param use_entropy  Use entropy
+ * @param[out]    buf   Output buffer
+ * @param[in,out] bufsz Size of output buffer, updated with size of data
+ * actually written.
+ * @param use_entropy   Use entropy
  *
  * @todo Define the implication of the use_entropy parameter
  *
- * @return 0 if succesful
+ * @retval 0 on success and '*bufsz' updated with size of data written
+ * @retval <0 on failure
  */
 int
-odp_hw_random_get(uint8_t *buf, size_t *len, bool use_entropy);
+odp_hw_random_get(uint8_t *buf, size_t *bufsz, bool use_entropy);
 
 /**
  * @}