summaryrefslogtreecommitdiff
path: root/chip/host
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 14:14:38 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-29 12:07:24 +0000
commit7601df3bc0c934ff8b496522843c68c9b927d729 (patch)
tree812e2ee0eab7f9d315f655e032f460062eb08f71 /chip/host
parentc53ba8e52810b7587d4db04868cd45736a3ebb30 (diff)
downloadchrome-ec-7601df3bc0c934ff8b496522843c68c9b927d729.tar.gz
chip/host/i2c.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: I4341e5fb521ff6059d928a35dfb19be2a6d4ab7b Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729167 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'chip/host')
-rw-r--r--chip/host/i2c.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/chip/host/i2c.c b/chip/host/i2c.c
index ba4ab376d2..32c138cf0f 100644
--- a/chip/host/i2c.c
+++ b/chip/host/i2c.c
@@ -52,8 +52,7 @@ int test_attach_i2c(const int port, const uint16_t addr_flags)
int i;
for (i = 0; i < MAX_DETACHED_DEV_COUNT; ++i)
- if (detached_devs[i].valid &&
- detached_devs[i].port == port &&
+ if (detached_devs[i].valid && detached_devs[i].port == port &&
detached_devs[i].addr_flags == addr_flags)
break;
@@ -64,22 +63,19 @@ int test_attach_i2c(const int port, const uint16_t addr_flags)
return EC_SUCCESS;
}
-static int test_check_detached(const int port,
- const uint16_t addr_flags)
+static int test_check_detached(const int port, const uint16_t addr_flags)
{
int i;
for (i = 0; i < MAX_DETACHED_DEV_COUNT; ++i)
- if (detached_devs[i].valid &&
- detached_devs[i].port == port &&
+ if (detached_devs[i].valid && detached_devs[i].port == port &&
detached_devs[i].addr_flags == addr_flags)
return 1;
return 0;
}
-int chip_i2c_xfer(const int port, const uint16_t addr_flags,
- const uint8_t *out, int out_size,
- uint8_t *in, int in_size, int flags)
+int chip_i2c_xfer(const int port, const uint16_t addr_flags, const uint8_t *out,
+ int out_size, uint8_t *in, int in_size, int flags)
{
const struct test_i2c_xfer *p;
int rv;
@@ -87,9 +83,8 @@ int chip_i2c_xfer(const int port, const uint16_t addr_flags,
if (test_check_detached(port, addr_flags))
return EC_ERROR_UNKNOWN;
for (p = __test_i2c_xfer; p < __test_i2c_xfer_end; ++p) {
- rv = p->routine(port, addr_flags,
- out, out_size,
- in, in_size, flags);
+ rv = p->routine(port, addr_flags, out, out_size, in, in_size,
+ flags);
if (rv != EC_ERROR_INVAL)
return rv;
}