util/comm-host.c: Format with clang-format
BRANCH=none
TEST=none
#include "ec_commands.h"
#include "misc_util.h"
-
-int (*ec_command_proto)(int command, int version,
- const void *outdata, int outsize,
- void *indata, int insize);
+int (*ec_command_proto)(int command, int version, const void *outdata,
+ int outsize, void *indata, int insize);
int (*ec_readmem)(int offset, int bytes, void *dest);
@@ -45,8 +43,8 @@ static int fake_readmem(int offset, int bytes, void *dest)
if (bytes) {
p.size = bytes;
- c = ec_command(EC_CMD_READ_MEMMAP, 0, &p, sizeof(p),
- dest, p.size);
+ c = ec_command(EC_CMD_READ_MEMMAP, 0, &p, sizeof(p), dest,
+ p.size);
if (c < 0)
return c;
return p.size;
@@ -73,14 +71,12 @@ void set_command_offset(int offset)
command_offset = offset;
}
-int ec_command(int command, int version,
- const void *outdata, int outsize,
+int ec_command(int command, int version, const void *outdata, int outsize,
void *indata, int insize)
{
/* Offset command code to support sub-devices */
- return ec_command_proto(command_offset + command, version,
- outdata, outsize,
- indata, insize);
+ return ec_command_proto(command_offset + command, version, outdata,
+ outsize, indata, insize);
}
int comm_init_alt(int interfaces, const char *device_name, int i2c_bus)
@@ -99,8 +95,8 @@ int comm_init_alt(int interfaces, const char *device_name, int i2c_bus)
dev_is_cros_ec = !strcmp(CROS_EC_DEV_NAME, device_name);
/* Fallback to direct LPC on x86 */
- if (dev_is_cros_ec && (interfaces & COMM_LPC) &&
- comm_init_lpc && !comm_init_lpc())
+ if (dev_is_cros_ec && (interfaces & COMM_LPC) && comm_init_lpc &&
+ !comm_init_lpc())
return 0;
/* Fallback to direct I2C */
