cmd: mmc: don't assign unused values
[platform/kernel/u-boot.git] / cmd / tpm-common.c
index 88c9e08..47adaff 100644 (file)
@@ -46,7 +46,7 @@ void print_byte_string(u8 *data, size_t count)
  *                     NULL is passed, a large enough buffer will be allocated,
  *                     and the caller must free it.
  * @param count_ptr    output variable for the length of byte string
- * @return pointer to output buffer
+ * Return: pointer to output buffer
  */
 void *parse_byte_string(char *bytes, u8 *data, size_t *count_ptr)
 {
@@ -68,7 +68,7 @@ void *parse_byte_string(char *bytes, u8 *data, size_t *count_ptr)
        for (i = 0; i < length; i += 2) {
                byte[0] = bytes[i];
                byte[1] = bytes[i + 1];
-               data[i / 2] = (u8)simple_strtoul(byte, NULL, 16);
+               data[i / 2] = (u8)hextoul(byte, NULL);
        }
 
        if (count_ptr)
@@ -81,7 +81,7 @@ void *parse_byte_string(char *bytes, u8 *data, size_t *count_ptr)
  * report_return_code() - Report any error and return failure or success
  *
  * @param return_code  TPM command return code
- * @return value of enum command_ret_t
+ * Return: value of enum command_ret_t
  */
 int report_return_code(int return_code)
 {
@@ -97,7 +97,7 @@ int report_return_code(int return_code)
  * Return number of values defined by a type string.
  *
  * @param type_str     type string
- * @return number of values of type string
+ * Return: number of values of type string
  */
 int type_string_get_num_values(const char *type_str)
 {
@@ -108,7 +108,7 @@ int type_string_get_num_values(const char *type_str)
  * Return total size of values defined by a type string.
  *
  * @param type_str     type string
- * @return total size of values of type string, or 0 if type string
+ * Return: total size of values of type string, or 0 if type string
  *  contains illegal type character.
  */
 size_t type_string_get_space_size(const char *type_str)
@@ -140,7 +140,7 @@ size_t type_string_get_space_size(const char *type_str)
  *
  * @param type_str     type string
  * @param count                pointer for storing size of buffer
- * @return pointer to buffer or NULL on error
+ * Return: pointer to buffer or NULL on error
  */
 void *type_string_alloc(const char *type_str, u32 *count)
 {
@@ -164,7 +164,7 @@ void *type_string_alloc(const char *type_str, u32 *count)
  * @param type_str     type string
  * @param values       text strings of values to be packed
  * @param data         output buffer of values
- * @return 0 on success, non-0 on error
+ * Return: 0 on success, non-0 on error
  */
 int type_string_pack(const char *type_str, char * const values[],
                     u8 *data)
@@ -202,7 +202,7 @@ int type_string_pack(const char *type_str, char * const values[],
  * @param type_str     type string
  * @param data         input buffer of values
  * @param vars         names of environment variables
- * @return 0 on success, non-0 on error
+ * Return: 0 on success, non-0 on error
  */
 int type_string_write_vars(const char *type_str, u8 *data,
                           char * const vars[])
@@ -302,7 +302,7 @@ int do_tpm_device(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
        int rc;
 
        if (argc == 2) {
-               num = simple_strtoul(argv[1], NULL, 10);
+               num = dectoul(argv[1], NULL);
 
                rc = tpm_set_device(num);
                if (rc)