common/rollback.c: Format with clang-format
BRANCH=none
TEST=none
@@ -188,8 +188,8 @@ failed:
#ifdef CONFIG_ROLLBACK_UPDATE
#ifdef CONFIG_ROLLBACK_SECRET_SIZE
-static int add_entropy(uint8_t *dst, const uint8_t *src,
- const uint8_t *add, unsigned int add_len)
+static int add_entropy(uint8_t *dst, const uint8_t *src, const uint8_t *add,
+ unsigned int add_len)
{
int ret = 0;
#ifdef CONFIG_SHA256
@@ -240,8 +240,8 @@ failed:
*
* @return EC_SUCCESS on success, EC_ERROR_* on error.
*/
-static int rollback_update(int32_t next_min_version,
- const uint8_t *entropy, unsigned int length)
+static int rollback_update(int32_t next_min_version, const uint8_t *entropy,
+ unsigned int length)
{
/*
* When doing flash_write operation, the data needs to be in blocks
@@ -364,8 +364,7 @@ static int command_rollback_update(int argc, char **argv)
return rollback_update_version(min_version);
}
-DECLARE_CONSOLE_COMMAND(rollbackupdate, command_rollback_update,
- "min_version",
+DECLARE_CONSOLE_COMMAND(rollbackupdate, command_rollback_update, "min_version",
"Update rollback info");
#ifdef CONFIG_ROLLBACK_SECRET_SIZE
@@ -380,8 +379,7 @@ static int command_rollback_add_entropy(int argc, char **argv)
return rollback_add_entropy(argv[1], len);
}
-DECLARE_CONSOLE_COMMAND(rollbackaddent, command_rollback_add_entropy,
- "data",
+DECLARE_CONSOLE_COMMAND(rollbackaddent, command_rollback_add_entropy, "data",
"Add entropy to rollback block");
#ifdef CONFIG_RNG
@@ -438,8 +436,7 @@ hc_rollback_add_entropy(struct host_cmd_handler_args *args)
return EC_RES_INVALID_PARAM;
}
-DECLARE_HOST_COMMAND(EC_CMD_ADD_ENTROPY,
- hc_rollback_add_entropy,
+DECLARE_HOST_COMMAND(EC_CMD_ADD_ENTROPY, hc_rollback_add_entropy,
EC_VER_MASK(0));
#endif /* CONFIG_RNG */
#endif /* CONFIG_ROLLBACK_SECRET_SIZE */
@@ -467,9 +464,8 @@ static int command_rollback_info(int argc, char **argv)
if (ret)
goto failed;
- ccprintf("rollback %d: %08x %08x %08x",
- region, data.id, data.rollback_min_version,
- data.cookie);
+ ccprintf("rollback %d: %08x %08x %08x", region, data.id,
+ data.rollback_min_version, data.cookie);
#ifdef CONFIG_ROLLBACK_SECRET_SIZE
if (!system_is_locked()) {
/* If system is unlocked, show some of the secret. */
@@ -487,8 +483,7 @@ failed:
clear_rollback(&data);
return ret;
}
-DECLARE_SAFE_CONSOLE_COMMAND(rollbackinfo, command_rollback_info,
- NULL,
+DECLARE_SAFE_CONSOLE_COMMAND(rollbackinfo, command_rollback_info, NULL,
"Print rollback info");
static enum ec_status
@@ -515,6 +510,5 @@ failed:
clear_rollback(&data);
return ret;
}
-DECLARE_HOST_COMMAND(EC_CMD_ROLLBACK_INFO,
- host_command_rollback_info,
+DECLARE_HOST_COMMAND(EC_CMD_ROLLBACK_INFO, host_command_rollback_info,
EC_VER_MASK(0));
