diff --git a/.clang-ignore b/.clang-ignore
deleted file mode 100644
index bcefaf6..0000000
--- a/.clang-ignore
+++ /dev/null
@@ -1,8 +0,0 @@
-astlpc.c
-core.c
-libmctp.h
-serial.c
-tests/test_bridge.c
-tests/test_eid.c
-tests/test_seq.c
-utils/mctp-demux-daemon.c
diff --git a/astlpc.c b/astlpc.c
index 4cf5dac..0281099 100644
--- a/astlpc.c
+++ b/astlpc.c
@@ -113,7 +113,7 @@
 };
 
 struct mctp_binding_astlpc {
-	struct mctp_binding	binding;
+	struct mctp_binding binding;
 
 	void *lpc_map;
 	struct mctp_astlpc_layout layout;
@@ -132,7 +132,7 @@
 	uint8_t kcs_status;
 };
 
-#define binding_to_astlpc(b) \
+#define binding_to_astlpc(b)                                                   \
 	container_of(b, struct mctp_binding_astlpc, binding)
 
 #define astlpc_prlog(ctx, lvl, fmt, ...)                                       \
@@ -276,12 +276,12 @@
 
 static const uint32_t control_size = 0x100;
 
-#define LPC_WIN_SIZE                (1 * 1024 * 1024)
+#define LPC_WIN_SIZE (1 * 1024 * 1024)
 
-#define KCS_STATUS_BMC_READY		0x80
-#define KCS_STATUS_CHANNEL_ACTIVE	0x40
-#define KCS_STATUS_IBF			0x02
-#define KCS_STATUS_OBF			0x01
+#define KCS_STATUS_BMC_READY	  0x80
+#define KCS_STATUS_CHANNEL_ACTIVE 0x40
+#define KCS_STATUS_IBF		  0x02
+#define KCS_STATUS_OBF		  0x01
 
 static inline int mctp_astlpc_kcs_write(struct mctp_binding_astlpc *astlpc,
 					enum mctp_binding_astlpc_kcs_reg reg,
@@ -416,8 +416,9 @@
 		hdr.layout.tx_size = htobe32(layout->rx.size);
 
 		return mctp_astlpc_lpc_write(astlpc, &hdr.layout,
-				offsetof(struct mctp_lpcmap_hdr, layout),
-				sizeof(hdr.layout));
+					     offsetof(struct mctp_lpcmap_hdr,
+						      layout),
+					     sizeof(hdr.layout));
 	}
 
 	assert(astlpc->mode == MCTP_BINDING_ASTLPC_MODE_HOST);
@@ -428,8 +429,9 @@
 	 */
 	rx_size_be = htobe32(layout->rx.size);
 	return mctp_astlpc_lpc_write(astlpc, &rx_size_be,
-			offsetof(struct mctp_lpcmap_hdr, layout.rx_size),
-			sizeof(rx_size_be));
+				     offsetof(struct mctp_lpcmap_hdr,
+					      layout.rx_size),
+				     sizeof(rx_size_be));
 }
 
 static bool
@@ -457,9 +459,11 @@
 	}
 
 	/* Check that the baseline transmission unit is supported */
-	if (buf->size < astlpc->proto->packet_size(MCTP_PACKET_SIZE(MCTP_BTU))) {
+	if (buf->size <
+	    astlpc->proto->packet_size(MCTP_PACKET_SIZE(MCTP_BTU))) {
 		mctp_prerr(
-			"%s packet buffer too small: Require %" PRIu32 " bytes to support the %u byte baseline transmission unit, found %" PRIu32,
+			"%s packet buffer too small: Require %" PRIu32
+			" bytes to support the %u byte baseline transmission unit, found %" PRIu32,
 			name,
 			astlpc->proto->packet_size(MCTP_PACKET_SIZE(MCTP_BTU)),
 			MCTP_BTU, buf->size);
@@ -697,9 +701,8 @@
 	bmc_ver_cur = be16toh(hdr.bmc_ver_cur);
 
 	/* Calculate the expected value of negotiated_ver */
-	negotiated = mctp_astlpc_negotiate_version(bmc_ver_min, bmc_ver_cur,
-						   ASTLPC_VER_MIN,
-						   ASTLPC_VER_CUR);
+	negotiated = mctp_astlpc_negotiate_version(
+		bmc_ver_min, bmc_ver_cur, ASTLPC_VER_MIN, ASTLPC_VER_CUR);
 	if (!negotiated) {
 		astlpc_prerr(astlpc, "Cannot negotiate with invalid versions");
 		return -EINVAL;
@@ -781,13 +784,12 @@
 }
 
 static int mctp_astlpc_kcs_send(struct mctp_binding_astlpc *astlpc,
-		uint8_t data)
+				uint8_t data)
 {
 	uint8_t status;
 	int rc;
 
-	rc = mctp_astlpc_kcs_read(astlpc, MCTP_ASTLPC_KCS_REG_STATUS,
-			&status);
+	rc = mctp_astlpc_kcs_read(astlpc, MCTP_ASTLPC_KCS_REG_STATUS, &status);
 	if (rc) {
 		astlpc_prwarn(astlpc, "KCS status read failed");
 		return -EIO;
@@ -805,7 +807,7 @@
 }
 
 static int mctp_binding_astlpc_tx(struct mctp_binding *b,
-		struct mctp_pktbuf *pkt)
+				  struct mctp_pktbuf *pkt)
 {
 	struct mctp_binding_astlpc *astlpc = binding_to_astlpc(b);
 	uint32_t len, len_be;
@@ -997,7 +999,8 @@
 	packet = astlpc->proto->packet_size(body) - 4;
 	pkt = mctp_pktbuf_alloc(&astlpc->binding, packet);
 	if (!pkt) {
-		astlpc_prwarn(astlpc, "unable to allocate pktbuf len 0x%x", packet);
+		astlpc_prwarn(astlpc, "unable to allocate pktbuf len 0x%x",
+			      packet);
 		return;
 	}
 
@@ -1117,7 +1120,7 @@
 	}
 
 	if (astlpc->proto->version == 0 ||
-			updated & KCS_STATUS_CHANNEL_ACTIVE) {
+	    updated & KCS_STATUS_CHANNEL_ACTIVE) {
 		bool enable;
 
 		astlpc->layout.rx.state = buffer_state_idle;
@@ -1176,18 +1179,20 @@
 		break;
 	case 0x1:
 		if (astlpc->layout.rx.state != buffer_state_released) {
-			astlpc_prerr(astlpc,
-				     "Protocol error: Invalid Rx buffer state for event %d: %d\n",
-				     data, astlpc->layout.rx.state);
+			astlpc_prerr(
+				astlpc,
+				"Protocol error: Invalid Rx buffer state for event %d: %d\n",
+				data, astlpc->layout.rx.state);
 			return 0;
 		}
 		mctp_astlpc_rx_start(astlpc);
 		break;
 	case 0x2:
 		if (astlpc->layout.tx.state != buffer_state_released) {
-			astlpc_prerr(astlpc,
-				     "Protocol error: Invalid Tx buffer state for event %d: %d\n",
-				     data, astlpc->layout.tx.state);
+			astlpc_prerr(
+				astlpc,
+				"Protocol error: Invalid Tx buffer state for event %d: %d\n",
+				data, astlpc->layout.tx.state);
 			return 0;
 		}
 		mctp_astlpc_tx_complete(astlpc);
@@ -1349,13 +1354,15 @@
 
 	/* Map the reserved memory at the top of the 28-bit LPC firmware address space */
 	map.addr = 0x0FFFFFFF & -map.size;
-	astlpc_prinfo(astlpc,
-		      "Configuring FW2AHB to map reserved memory at 0x%08x for 0x%x in the LPC FW cycle address-space",
-		      map.addr, map.size);
+	astlpc_prinfo(
+		astlpc,
+		"Configuring FW2AHB to map reserved memory at 0x%08x for 0x%x in the LPC FW cycle address-space",
+		map.addr, map.size);
 
 	rc = ioctl(fd, ASPEED_LPC_CTRL_IOCTL_MAP, &map);
 	if (rc) {
-		astlpc_prwarn(astlpc, "Failed to map FW2AHB to reserved memory");
+		astlpc_prwarn(astlpc,
+			      "Failed to map FW2AHB to reserved memory");
 		close(fd);
 		return -1;
 	}
@@ -1385,7 +1392,8 @@
 }
 
 static int __mctp_astlpc_fileio_kcs_read(void *arg,
-		enum mctp_binding_astlpc_kcs_reg reg, uint8_t *val)
+					 enum mctp_binding_astlpc_kcs_reg reg,
+					 uint8_t *val)
 {
 	struct mctp_binding_astlpc *astlpc = arg;
 	off_t offset = reg;
@@ -1397,7 +1405,8 @@
 }
 
 static int __mctp_astlpc_fileio_kcs_write(void *arg,
-		enum mctp_binding_astlpc_kcs_reg reg, uint8_t val)
+					  enum mctp_binding_astlpc_kcs_reg reg,
+					  uint8_t val)
 {
 	struct mctp_binding_astlpc *astlpc = arg;
 	off_t offset = reg;
@@ -1417,7 +1426,7 @@
 	pollfd->events = 0;
 
 	release = astlpc->layout.rx.state == buffer_state_prepared ||
-			astlpc->layout.tx.state == buffer_state_prepared;
+		  astlpc->layout.tx.state == buffer_state_prepared;
 
 	pollfd->events = release ? POLLOUT : POLLIN;
 
diff --git a/core.c b/core.c
index 2f87692..5a5d247 100644
--- a/core.c
+++ b/core.c
@@ -38,43 +38,45 @@
 };
 
 struct mctp_msg_ctx {
-	uint8_t		src;
-	uint8_t		dest;
-	uint8_t		tag;
-	uint8_t		last_seq;
-	void		*buf;
-	size_t		buf_size;
-	size_t		buf_alloc_size;
-	size_t		fragment_size;
+	uint8_t src;
+	uint8_t dest;
+	uint8_t tag;
+	uint8_t last_seq;
+	void *buf;
+	size_t buf_size;
+	size_t buf_alloc_size;
+	size_t fragment_size;
 };
 
 struct mctp {
-	int			n_busses;
-	struct mctp_bus		*busses;
+	int n_busses;
+	struct mctp_bus *busses;
 
 	/* Message RX callback */
-	mctp_rx_fn		message_rx;
-	void			*message_rx_data;
+	mctp_rx_fn message_rx;
+	void *message_rx_data;
 
 	/* Packet capture callback */
-	mctp_capture_fn		capture;
-	void			*capture_data;
+	mctp_capture_fn capture;
+	void *capture_data;
 
 	/* Message reassembly.
 	 * @todo: flexible context count
 	 */
-	struct mctp_msg_ctx	msg_ctxs[16];
+	struct mctp_msg_ctx msg_ctxs[16];
 
 	enum {
 		ROUTE_ENDPOINT,
 		ROUTE_BRIDGE,
-	}			route_policy;
+	} route_policy;
 	size_t max_message_size;
 };
 
 #ifndef BUILD_ASSERT
-#define BUILD_ASSERT(x) \
-	do { (void)sizeof(char[0-(!(x))]); } while (0)
+#define BUILD_ASSERT(x)                                                        \
+	do {                                                                   \
+		(void)sizeof(char[0 - (!(x))]);                                \
+	} while (0)
 #endif
 
 #ifndef ARRAY_SIZE
@@ -172,8 +174,8 @@
 }
 
 /* Message reassembly */
-static struct mctp_msg_ctx *mctp_msg_ctx_lookup(struct mctp *mctp,
-		uint8_t src, uint8_t dest, uint8_t tag)
+static struct mctp_msg_ctx *mctp_msg_ctx_lookup(struct mctp *mctp, uint8_t src,
+						uint8_t dest, uint8_t tag)
 {
 	unsigned int i;
 
@@ -188,8 +190,8 @@
 	return NULL;
 }
 
-static struct mctp_msg_ctx *mctp_msg_ctx_create(struct mctp *mctp,
-		uint8_t src, uint8_t dest, uint8_t tag)
+static struct mctp_msg_ctx *mctp_msg_ctx_create(struct mctp *mctp, uint8_t src,
+						uint8_t dest, uint8_t tag)
 {
 	struct mctp_msg_ctx *ctx = NULL;
 	unsigned int i;
@@ -225,7 +227,7 @@
 }
 
 static int mctp_msg_ctx_add_pkt(struct mctp_msg_ctx *ctx,
-		struct mctp_pktbuf *pkt, size_t max_size)
+				struct mctp_pktbuf *pkt, size_t max_size)
 {
 	size_t len;
 
@@ -243,14 +245,14 @@
 		if (!ctx->buf_alloc_size) {
 			new_alloc_size = MAX(len, 4096UL);
 		} else {
-			new_alloc_size = MAX(ctx->buf_alloc_size * 2, len + ctx->buf_size);
+			new_alloc_size = MAX(ctx->buf_alloc_size * 2,
+					     len + ctx->buf_size);
 		}
 
 		/* Don't allow heap to grow beyond a limit */
 		if (new_alloc_size > max_size)
 			return -1;
 
-
 		lbuf = __mctp_realloc(ctx->buf, new_alloc_size);
 		if (lbuf) {
 			ctx->buf = lbuf;
@@ -274,7 +276,7 @@
 
 	mctp = __mctp_alloc(sizeof(*mctp));
 
-	if(!mctp)
+	if (!mctp)
 		return NULL;
 
 	memset(mctp, 0, sizeof(*mctp));
@@ -330,8 +332,8 @@
 	return 0;
 }
 
-static struct mctp_bus *find_bus_for_eid(struct mctp *mctp,
-		mctp_eid_t dest __attribute__((unused)))
+static struct mctp_bus *find_bus_for_eid(struct mctp *mctp, mctp_eid_t dest
+					 __attribute__((unused)))
 {
 	if (mctp->n_busses == 0)
 		return NULL;
@@ -341,9 +343,8 @@
 	return &mctp->busses[0];
 }
 
-int mctp_register_bus(struct mctp *mctp,
-		struct mctp_binding *binding,
-		mctp_eid_t eid)
+int mctp_register_bus(struct mctp *mctp, struct mctp_binding *binding,
+		      mctp_eid_t eid)
 {
 	int rc = 0;
 
@@ -388,8 +389,8 @@
 	free(mctp->busses);
 }
 
-int mctp_bridge_busses(struct mctp *mctp,
-		struct mctp_binding *b1, struct mctp_binding *b2)
+int mctp_bridge_busses(struct mctp *mctp, struct mctp_binding *b1,
+		       struct mctp_binding *b2)
 {
 	int rc = 0;
 
@@ -524,7 +525,6 @@
 			mctp_message_tx_on_bus(dest_bus, src, dest, tag_owner,
 					       msg_tag, buf, len);
 		}
-
 	}
 }
 
@@ -579,8 +579,8 @@
 		if (ctx) {
 			mctp_msg_ctx_reset(ctx);
 		} else {
-			ctx = mctp_msg_ctx_create(mctp,
-					hdr->src, hdr->dest, tag);
+			ctx = mctp_msg_ctx_create(mctp, hdr->src, hdr->dest,
+						  tag);
 			/* If context creation fails due to exhaution of contexts we
 			* can support, drop the packet */
 			if (!ctx) {
@@ -620,9 +620,9 @@
 		len = mctp_pktbuf_size(pkt);
 
 		if (len > ctx->fragment_size) {
-			mctp_prdebug("Unexpected fragment size. Expected" \
-				" less than %zu, received = %zu",
-				ctx->fragment_size, len);
+			mctp_prdebug("Unexpected fragment size. Expected"
+				     " less than %zu, received = %zu",
+				     ctx->fragment_size, len);
 			mctp_msg_ctx_drop(ctx);
 			goto out;
 		}
@@ -637,7 +637,7 @@
 
 	case 0:
 		/* Neither SOM nor EOM */
-		ctx = mctp_msg_ctx_lookup(mctp, hdr->src,hdr->dest, tag);
+		ctx = mctp_msg_ctx_lookup(mctp, hdr->src, hdr->dest, tag);
 		if (!ctx)
 			goto out;
 
@@ -653,8 +653,9 @@
 		len = mctp_pktbuf_size(pkt);
 
 		if (len != ctx->fragment_size) {
-			mctp_prdebug("Unexpected fragment size. Expected = %zu " \
-				"received = %zu", ctx->fragment_size, len);
+			mctp_prdebug("Unexpected fragment size. Expected = %zu "
+				     "received = %zu",
+				     ctx->fragment_size, len);
 			mctp_msg_ctx_drop(ctx);
 			goto out;
 		}
@@ -672,8 +673,7 @@
 	mctp_pktbuf_free(pkt);
 }
 
-static int mctp_packet_tx(struct mctp_bus *bus,
-		struct mctp_pktbuf *pkt)
+static int mctp_packet_tx(struct mctp_bus *bus, struct mctp_pktbuf *pkt)
 {
 	struct mctp *mctp = bus->binding->mctp;
 
@@ -716,22 +716,22 @@
 cleanup_tail:
 	if (!bus->tx_queue_head)
 		bus->tx_queue_tail = NULL;
-
 }
 
 void mctp_binding_set_tx_enabled(struct mctp_binding *binding, bool enable)
 {
 	struct mctp_bus *bus = binding->bus;
 
-	switch(bus->state) {
+	switch (bus->state) {
 	case mctp_bus_state_constructed:
 		if (!enable)
 			return;
 
 		if (binding->pkt_size < MCTP_PACKET_SIZE(MCTP_BTU)) {
-			mctp_prerr("Cannot start %s binding with invalid MTU: %zu",
-				   binding->name,
-				   MCTP_BODY_SIZE(binding->pkt_size));
+			mctp_prerr(
+				"Cannot start %s binding with invalid MTU: %zu",
+				binding->name,
+				MCTP_BODY_SIZE(binding->pkt_size));
 			return;
 		}
 
@@ -780,8 +780,9 @@
 			return -EINVAL;
 	}
 
-	mctp_prdebug("%s: Generating packets for transmission of %zu byte message from %hhu to %hhu",
-		     __func__, msg_len, src, dest);
+	mctp_prdebug(
+		"%s: Generating packets for transmission of %zu byte message from %hhu to %hhu",
+		__func__, msg_len, src, dest);
 
 	/* queue up packets, each of max MCTP_MTU size */
 	for (p = 0, i = 0; p < msg_len; i++) {
@@ -790,7 +791,7 @@
 			payload_len = max_payload_len;
 
 		pkt = mctp_pktbuf_alloc(bus->binding,
-				payload_len + sizeof(*hdr));
+					payload_len + sizeof(*hdr));
 		hdr = mctp_pktbuf_hdr(pkt);
 
 		hdr->ver = bus->binding->version & 0xf;
@@ -803,8 +804,8 @@
 			hdr->flags_seq_tag |= MCTP_HDR_FLAG_SOM;
 		if (p + payload_len >= msg_len)
 			hdr->flags_seq_tag |= MCTP_HDR_FLAG_EOM;
-		hdr->flags_seq_tag |=
-			(i & MCTP_HDR_SEQ_MASK) << MCTP_HDR_SEQ_SHIFT;
+		hdr->flags_seq_tag |= (i & MCTP_HDR_SEQ_MASK)
+				      << MCTP_HDR_SEQ_SHIFT;
 
 		memcpy(mctp_pktbuf_data(pkt), (uint8_t *)msg + p, payload_len);
 
diff --git a/format-code.sh b/format-code.sh
deleted file mode 100755
index d34554d..0000000
--- a/format-code.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-: ${CLANG_FORMAT:=clang-format}
-
-FILES=$(comm -3 <(sort .clang-ignore) <(git ls-files | grep '.*\.[ch]$' | sort))
-
-if [ -n "$FILES" ]
-then
-    $CLANG_FORMAT -style=file -i $FILES
-fi
diff --git a/libmctp.h b/libmctp.h
index 8e13c29..b34abfe 100644
--- a/libmctp.h
+++ b/libmctp.h
@@ -15,15 +15,15 @@
 typedef uint8_t mctp_eid_t;
 
 /* Special Endpoint ID values */
-#define MCTP_EID_NULL 0
+#define MCTP_EID_NULL	   0
 #define MCTP_EID_BROADCAST 0xff
 
 /* MCTP packet definitions */
 struct mctp_hdr {
-	uint8_t	ver;
-	uint8_t	dest;
-	uint8_t	src;
-	uint8_t	flags_seq_tag;
+	uint8_t ver;
+	uint8_t dest;
+	uint8_t src;
+	uint8_t flags_seq_tag;
 };
 
 /* Definitions for flags_seq_tag field */
@@ -41,17 +41,17 @@
 #define MCTP_MESSAGE_TO_DST false
 
 /* Baseline Transmission Unit and packet size */
-#define MCTP_BTU		64
-#define MCTP_PACKET_SIZE(unit)	((unit) + sizeof(struct mctp_hdr))
-#define MCTP_BODY_SIZE(unit)	((unit) - sizeof(struct mctp_hdr))
+#define MCTP_BTU	       64
+#define MCTP_PACKET_SIZE(unit) ((unit) + sizeof(struct mctp_hdr))
+#define MCTP_BODY_SIZE(unit)   ((unit) - sizeof(struct mctp_hdr))
 
 /* packet buffers */
 
 struct mctp_pktbuf {
-	size_t		start, end, size;
-	size_t		mctp_hdr_off;
+	size_t start, end, size;
+	size_t mctp_hdr_off;
 	struct mctp_pktbuf *next;
-	unsigned char	data[];
+	unsigned char data[];
 };
 
 struct mctp_binding;
@@ -73,7 +73,8 @@
 struct mctp *mctp_init(void);
 void mctp_set_max_message_size(struct mctp *mctp, size_t message_size);
 typedef void (*mctp_capture_fn)(struct mctp_pktbuf *pkt, void *user);
-void mctp_set_capture_handler(struct mctp *mctp, mctp_capture_fn fn, void *user);
+void mctp_set_capture_handler(struct mctp *mctp, mctp_capture_fn fn,
+			      void *user);
 void mctp_destroy(struct mctp *mctp);
 
 /* Register a binding to the MCTP core, and creates a bus (populating
@@ -83,9 +84,8 @@
  * and will deliver local packets to a RX callback - see `mctp_set_rx_all()`
  * below.
  */
-int mctp_register_bus(struct mctp *mctp,
-		struct mctp_binding *binding,
-		mctp_eid_t eid);
+int mctp_register_bus(struct mctp *mctp, struct mctp_binding *binding,
+		      mctp_eid_t eid);
 
 void mctp_unregister_bus(struct mctp *mctp, struct mctp_binding *binding);
 
@@ -95,8 +95,8 @@
  * defined, so no packets are considered local. Instead, all messages from one
  * binding are forwarded to the other.
  */
-int mctp_bridge_busses(struct mctp *mctp,
-		struct mctp_binding *b1, struct mctp_binding *b2);
+int mctp_bridge_busses(struct mctp *mctp, struct mctp_binding *b1,
+		       struct mctp_binding *b2);
 
 typedef void (*mctp_rx_fn)(uint8_t src_eid, bool tag_owner, uint8_t msg_tag,
 			   void *data, void *msg, size_t len);
@@ -138,9 +138,8 @@
 void mctp_bus_rx(struct mctp_binding *binding, struct mctp_pktbuf *pkt);
 
 /* environment-specific allocation */
-void mctp_set_alloc_ops(void *(*alloc)(size_t),
-		void (*free)(void *),
-		void *(realloc)(void *, size_t));
+void mctp_set_alloc_ops(void *(*alloc)(size_t), void (*free)(void *),
+			void *(realloc)(void *, size_t));
 
 /* environment-specific logging */
 
@@ -150,12 +149,11 @@
 
 /* these should match the syslog-standard LOG_* definitions, for
  * easier use with syslog */
-#define MCTP_LOG_ERR		3
-#define MCTP_LOG_WARNING	4
-#define MCTP_LOG_NOTICE		5
-#define MCTP_LOG_INFO		6
-#define MCTP_LOG_DEBUG		7
-
+#define MCTP_LOG_ERR	 3
+#define MCTP_LOG_WARNING 4
+#define MCTP_LOG_NOTICE	 5
+#define MCTP_LOG_INFO	 6
+#define MCTP_LOG_DEBUG	 7
 
 #ifdef __cplusplus
 }
diff --git a/serial.c b/serial.c
index 35c4a02..22517a7 100644
--- a/serial.c
+++ b/serial.c
@@ -65,14 +65,14 @@
 	int fd;
 	unsigned long bus_id;
 
-	mctp_serial_tx_fn	tx_fn;
-	void			*tx_fn_data;
+	mctp_serial_tx_fn tx_fn;
+	void *tx_fn_data;
 
 	/* receive buffer and state */
-	uint8_t			rxbuf[1024];
-	struct mctp_pktbuf	*rx_pkt;
-	uint8_t			rx_exp_len;
-	uint16_t		rx_fcs;
+	uint8_t rxbuf[1024];
+	struct mctp_pktbuf *rx_pkt;
+	uint8_t rx_exp_len;
+	uint16_t rx_fcs;
 	enum {
 		STATE_WAIT_SYNC_START,
 		STATE_WAIT_REVISION,
@@ -85,26 +85,26 @@
 	} rx_state;
 
 	/* temporary transmit buffer */
-	uint8_t			txbuf[256];
+	uint8_t txbuf[256];
 };
 
-#define binding_to_serial(b) \
+#define binding_to_serial(b)                                                   \
 	container_of(b, struct mctp_binding_serial, binding)
 
-#define MCTP_SERIAL_REVISION		0x01
-#define MCTP_SERIAL_FRAMING_FLAG	0x7e
-#define MCTP_SERIAL_ESCAPE		0x7d
+#define MCTP_SERIAL_REVISION	 0x01
+#define MCTP_SERIAL_FRAMING_FLAG 0x7e
+#define MCTP_SERIAL_ESCAPE	 0x7d
 
 struct mctp_serial_header {
-	uint8_t	flag;
+	uint8_t flag;
 	uint8_t revision;
-	uint8_t	len;
+	uint8_t len;
 };
 
 struct mctp_serial_trailer {
-	uint8_t	fcs_msb;
+	uint8_t fcs_msb;
 	uint8_t fcs_lsb;
-	uint8_t	flag;
+	uint8_t flag;
 };
 
 static size_t mctp_serial_pkt_escape(struct mctp_pktbuf *pkt, uint8_t *buf)
@@ -133,7 +133,7 @@
 }
 
 static int mctp_binding_serial_tx(struct mctp_binding *b,
-		struct mctp_pktbuf *pkt)
+				  struct mctp_pktbuf *pkt)
 {
 	struct mctp_binding_serial *serial = binding_to_serial(b);
 	struct mctp_serial_header *hdr;
@@ -172,12 +172,12 @@
 		return mctp_write_all(mctp_serial_write, serial->fd,
 				      &serial->txbuf[0], len);
 
-	return mctp_write_all(serial->tx_fn, serial->tx_fn_data, &serial->txbuf[0],
-			      len);
+	return mctp_write_all(serial->tx_fn, serial->tx_fn_data,
+			      &serial->txbuf[0], len);
 }
 
 static void mctp_serial_finish_packet(struct mctp_binding_serial *serial,
-		bool valid)
+				      bool valid)
 {
 	struct mctp_pktbuf *pkt = serial->rx_pkt;
 	assert(pkt);
@@ -189,13 +189,12 @@
 }
 
 static void mctp_serial_start_packet(struct mctp_binding_serial *serial,
-		uint8_t len)
+				     uint8_t len)
 {
 	serial->rx_pkt = mctp_pktbuf_alloc(&serial->binding, len);
 }
 
-static void mctp_rx_consume_one(struct mctp_binding_serial *serial,
-		uint8_t c)
+static void mctp_rx_consume_one(struct mctp_binding_serial *serial, uint8_t c)
 {
 	struct mctp_pktbuf *pkt = serial->rx_pkt;
 
@@ -226,7 +225,7 @@
 		break;
 	case STATE_WAIT_LEN:
 		if (c > serial->binding.pkt_size ||
-				c < sizeof(struct mctp_hdr)) {
+		    c < sizeof(struct mctp_hdr)) {
 			mctp_prdebug("invalid size %d", c);
 			serial->rx_state = STATE_WAIT_SYNC_START;
 		} else {
@@ -279,8 +278,8 @@
 
 	mctp_prdebug(" -> state: %d", serial->rx_state);
 }
-static void mctp_rx_consume(struct mctp_binding_serial *serial,
-		const void *buf, size_t len)
+static void mctp_rx_consume(struct mctp_binding_serial *serial, const void *buf,
+			    size_t len)
 {
 	size_t i;
 
@@ -317,7 +316,7 @@
 }
 
 int mctp_serial_open_path(struct mctp_binding_serial *serial,
-		const char *device)
+			  const char *device)
 {
 	serial->fd = open(device, O_RDWR);
 	if (serial->fd < 0)
@@ -333,14 +332,14 @@
 #endif
 
 void mctp_serial_set_tx_fn(struct mctp_binding_serial *serial,
-		mctp_serial_tx_fn fn, void *data)
+			   mctp_serial_tx_fn fn, void *data)
 {
 	serial->tx_fn = fn;
 	serial->tx_fn_data = data;
 }
 
-int mctp_serial_rx(struct mctp_binding_serial *serial,
-		const void *buf, size_t len)
+int mctp_serial_rx(struct mctp_binding_serial *serial, const void *buf,
+		   size_t len)
 {
 	mctp_rx_consume(serial, buf, len);
 	return 0;
diff --git a/tests/test_bridge.c b/tests/test_bridge.c
index 923ee82..a37fbd0 100644
--- a/tests/test_bridge.c
+++ b/tests/test_bridge.c
@@ -11,22 +11,22 @@
 #include "test-utils.h"
 
 struct mctp_binding_bridge {
-	struct mctp_binding	binding;
-	int			rx_count;
-	int			tx_count;
-	uint8_t			last_pkt_data;
+	struct mctp_binding binding;
+	int rx_count;
+	int tx_count;
+	uint8_t last_pkt_data;
 };
 
 struct test_ctx {
-	struct mctp			*mctp;
-	struct mctp_binding_bridge	*bindings[2];
+	struct mctp *mctp;
+	struct mctp_binding_bridge *bindings[2];
 };
 
 static int mctp_binding_bridge_tx(struct mctp_binding *b,
-		struct mctp_pktbuf *pkt)
+				  struct mctp_pktbuf *pkt)
 {
-	struct mctp_binding_bridge *binding = container_of(b,
-			struct mctp_binding_bridge, binding);
+	struct mctp_binding_bridge *binding =
+		container_of(b, struct mctp_binding_bridge, binding);
 
 	binding->tx_count++;
 	assert(mctp_pktbuf_size(pkt) == sizeof(struct mctp_hdr) + 1);
@@ -36,14 +36,13 @@
 }
 
 static void mctp_binding_bridge_rx(struct mctp_binding_bridge *binding,
-		uint8_t key)
+				   uint8_t key)
 {
 	struct mctp_pktbuf *pkt;
 	struct mctp_hdr *hdr;
 	uint8_t *buf;
 
-	pkt = mctp_pktbuf_alloc(&binding->binding,
-			sizeof(struct mctp_hdr) + 1);
+	pkt = mctp_pktbuf_alloc(&binding->binding, sizeof(struct mctp_hdr) + 1);
 	assert(pkt);
 
 	hdr = mctp_pktbuf_hdr(pkt);
@@ -83,9 +82,8 @@
 	ctx->bindings[0] = mctp_binding_bridge_init();
 	ctx->bindings[1] = mctp_binding_bridge_init();
 
-	mctp_bridge_busses(ctx->mctp,
-			&ctx->bindings[0]->binding,
-			&ctx->bindings[1]->binding);
+	mctp_bridge_busses(ctx->mctp, &ctx->bindings[0]->binding,
+			   &ctx->bindings[1]->binding);
 
 	mctp_binding_set_tx_enabled(&ctx->bindings[0]->binding, true);
 	mctp_binding_set_tx_enabled(&ctx->bindings[1]->binding, true);
diff --git a/tests/test_eid.c b/tests/test_eid.c
index 5c089ad..2fbbd5a 100644
--- a/tests/test_eid.c
+++ b/tests/test_eid.c
@@ -10,15 +10,15 @@
 #include "test-utils.h"
 
 struct test_ctx {
-	struct mctp			*mctp;
-	struct mctp_binding_test	*binding;
-	int				rx_count;
-	mctp_eid_t			src_eid;
+	struct mctp *mctp;
+	struct mctp_binding_test *binding;
+	int rx_count;
+	mctp_eid_t src_eid;
 };
 
-static void
-test_rx(uint8_t eid, bool tag_owner __unused, uint8_t msg_tag __unused,
-	void *data, void *msg __unused, size_t len __unused)
+static void test_rx(uint8_t eid, bool tag_owner __unused,
+		    uint8_t msg_tag __unused, void *data, void *msg __unused,
+		    size_t len __unused)
 {
 	struct test_ctx *ctx = data;
 
@@ -29,8 +29,7 @@
 	ctx->src_eid = eid;
 }
 
-static void create_packet(struct mctp_hdr *pkt,
-		mctp_eid_t src, mctp_eid_t dest)
+static void create_packet(struct mctp_hdr *pkt, mctp_eid_t src, mctp_eid_t dest)
 {
 	memset(pkt, 0, sizeof(*pkt));
 	pkt->src = src;
@@ -45,8 +44,8 @@
 	const mctp_eid_t remote_eid = 9;
 	const mctp_eid_t other_eid = 10;
 	struct {
-		struct mctp_hdr	hdr;
-		uint8_t		payload[1];
+		struct mctp_hdr hdr;
+		uint8_t payload[1];
 	} pktbuf;
 
 	mctp_test_stack_init(&ctx->mctp, &ctx->binding, local_eid);
diff --git a/tests/test_seq.c b/tests/test_seq.c
index e128457..22242ba 100644
--- a/tests/test_seq.c
+++ b/tests/test_seq.c
@@ -14,16 +14,15 @@
 #endif
 
 struct test_ctx {
-	struct mctp			*mctp;
-	struct mctp_binding_test	*binding;
-	int				rx_count;
-	uint8_t				rx_data[4];
-	size_t				rx_len;
+	struct mctp *mctp;
+	struct mctp_binding_test *binding;
+	int rx_count;
+	uint8_t rx_data[4];
+	size_t rx_len;
 };
 
-static void
-test_rx(uint8_t eid __unused, bool tag_owner __unused,
-	uint8_t msg_tag __unused, void *data, void *msg, size_t len)
+static void test_rx(uint8_t eid __unused, bool tag_owner __unused,
+		    uint8_t msg_tag __unused, void *data, void *msg, size_t len)
 {
 	struct test_ctx *ctx = data;
 
@@ -40,10 +39,10 @@
 #define SEQ(x) (x << MCTP_HDR_SEQ_SHIFT)
 
 struct test {
-	int		n_packets;
-	uint8_t		flags_seq_tags[4];
-	int		exp_rx_count;
-	size_t		exp_rx_len;
+	int n_packets;
+	uint8_t flags_seq_tags[4];
+	int exp_rx_count;
+	size_t exp_rx_len;
 } tests[] = {
 	{
 		/* single packet */
@@ -102,8 +101,8 @@
 	const mctp_eid_t local_eid = 8;
 	const mctp_eid_t remote_eid = 9;
 	struct {
-		struct mctp_hdr	hdr;
-		uint8_t		payload[1];
+		struct mctp_hdr hdr;
+		uint8_t payload[1];
 	} pktbuf;
 	int i;
 
@@ -121,8 +120,7 @@
 		pktbuf.hdr.flags_seq_tag = test->flags_seq_tags[i];
 		pktbuf.payload[0] = i;
 
-		mctp_binding_test_rx_raw(ctx->binding,
-				&pktbuf, sizeof(pktbuf));
+		mctp_binding_test_rx_raw(ctx->binding, &pktbuf, sizeof(pktbuf));
 	}
 
 	assert(ctx->rx_count == test->exp_rx_count);
@@ -136,7 +134,6 @@
 	mctp_destroy(ctx->mctp);
 }
 
-
 int main(void)
 {
 	struct test_ctx ctx;
diff --git a/utils/mctp-demux-daemon.c b/utils/mctp-demux-daemon.c
index c356769..f9893bb 100644
--- a/utils/mctp-demux-daemon.c
+++ b/utils/mctp-demux-daemon.c
@@ -54,24 +54,24 @@
 };
 
 struct client {
-	bool		active;
-	int		sock;
-	uint8_t		type;
+	bool active;
+	int sock;
+	uint8_t type;
 };
 
 struct ctx {
-	struct mctp	*mctp;
-	struct binding	*binding;
-	bool		verbose;
-	int		local_eid;
-	void		*buf;
-	size_t		buf_size;
+	struct mctp *mctp;
+	struct binding *binding;
+	bool verbose;
+	int local_eid;
+	void *buf;
+	size_t buf_size;
 
-	int		sock;
-	struct pollfd	*pollfds;
+	int sock;
+	struct pollfd *pollfds;
 
-	struct client	*clients;
-	int		n_clients;
+	struct client *clients;
+	int n_clients;
 
 	struct {
 		struct capture binding;
@@ -99,16 +99,16 @@
 		close(client->sock);
 
 		ctx->n_clients--;
-		memmove(&ctx->clients[i], &ctx->clients[i+1],
-				(ctx->n_clients - i) * sizeof(*ctx->clients));
+		memmove(&ctx->clients[i], &ctx->clients[i + 1],
+			(ctx->n_clients - i) * sizeof(*ctx->clients));
 		ctx->clients = realloc(ctx->clients,
-				ctx->n_clients * sizeof(*ctx->clients));
+				       ctx->n_clients * sizeof(*ctx->clients));
 	}
 }
 
-static void
-rx_message(uint8_t eid, bool tag_owner __unused, uint8_t msg_tag __unused,
-	   void *data, void *msg, size_t len)
+static void rx_message(uint8_t eid, bool tag_owner __unused,
+		       uint8_t msg_tag __unused, void *data, void *msg,
+		       size_t len)
 {
 	struct ctx *ctx = data;
 	struct iovec iov[2];
@@ -124,7 +124,7 @@
 
 	if (ctx->verbose)
 		fprintf(stderr, "MCTP message received: len %zd, type %d\n",
-				len, type);
+			len, type);
 
 	memset(&msghdr, 0, sizeof(msghdr));
 	msghdr.msg_iov = iov;
@@ -152,13 +152,12 @@
 
 	if (removed)
 		client_remove_inactive(ctx);
-
 }
 
 static int binding_null_init(struct mctp *mctp __unused,
-		struct binding *binding __unused,
-		mctp_eid_t eid __unused,
-		int n_params, char * const *params __unused)
+			     struct binding *binding __unused,
+			     mctp_eid_t eid __unused, int n_params,
+			     char *const *params __unused)
 {
 	if (n_params != 0) {
 		warnx("null binding doesn't accept parameters");
@@ -168,7 +167,8 @@
 }
 
 static int binding_serial_init(struct mctp *mctp, struct binding *binding,
-		mctp_eid_t eid, int n_params, char * const *params)
+			       mctp_eid_t eid, int n_params,
+			       char *const *params)
 {
 	struct mctp_binding_serial *serial;
 	const char *path;
@@ -207,8 +207,8 @@
 }
 
 static int binding_astlpc_init(struct mctp *mctp, struct binding *binding,
-		mctp_eid_t eid, int n_params,
-		char * const *params __attribute__((unused)))
+			       mctp_eid_t eid, int n_params,
+			       char *const *params __attribute__((unused)))
 {
 	struct mctp_binding_astlpc *astlpc;
 
@@ -249,26 +249,24 @@
 	return mctp_astlpc_poll(binding->data);
 }
 
-struct binding bindings[] = {
-	{
-		.name = "null",
-		.init = binding_null_init,
-	},
-	{
-		.name = "serial",
-		.init = binding_serial_init,
-		.destroy = NULL,
-		.init_pollfd = binding_serial_init_pollfd,
-		.process = binding_serial_process,
-	},
-	{
-		.name = "astlpc",
-		.init = binding_astlpc_init,
-		.destroy = binding_astlpc_destroy,
-		.init_pollfd = binding_astlpc_init_pollfd,
-		.process = binding_astlpc_process,
-	}
-};
+struct binding bindings[] = { {
+				      .name = "null",
+				      .init = binding_null_init,
+			      },
+			      {
+				      .name = "serial",
+				      .init = binding_serial_init,
+				      .destroy = NULL,
+				      .init_pollfd = binding_serial_init_pollfd,
+				      .process = binding_serial_process,
+			      },
+			      {
+				      .name = "astlpc",
+				      .init = binding_astlpc_init,
+				      .destroy = binding_astlpc_destroy,
+				      .init_pollfd = binding_astlpc_init_pollfd,
+				      .process = binding_astlpc_process,
+			      } };
 
 struct binding *binding_lookup(const char *name)
 {
@@ -301,7 +299,7 @@
 	}
 
 	rc = bind(ctx->sock, (struct sockaddr *)&addr,
-			sizeof(addr.sun_family) + namelen);
+		  sizeof(addr.sun_family) + namelen);
 	if (rc) {
 		warn("can't bind socket");
 		goto err_close;
@@ -330,10 +328,10 @@
 		return -1;
 
 	ctx->n_clients++;
-	ctx->clients = realloc(ctx->clients,
-			ctx->n_clients * sizeof(struct client));
+	ctx->clients =
+		realloc(ctx->clients, ctx->n_clients * sizeof(struct client));
 
-	client = &ctx->clients[ctx->n_clients-1];
+	client = &ctx->clients[ctx->n_clients - 1];
 	memset(client, 0, sizeof(*client));
 	client->active = true;
 	client->sock = fd;
@@ -361,7 +359,7 @@
 		}
 		if (ctx->verbose)
 			fprintf(stderr, "client[%d] registered for type %u\n",
-					idx, type);
+				idx, type);
 		client->type = type;
 		return 0;
 	}
@@ -407,11 +405,9 @@
 	eid = *(uint8_t *)ctx->buf;
 
 	if (ctx->verbose)
-		fprintf(stderr,
-			"client[%d] sent message: dest 0x%02x len %d\n",
+		fprintf(stderr, "client[%d] sent message: dest 0x%02x len %d\n",
 			idx, eid, rc - 1);
 
-
 	if (eid == ctx->local_eid)
 		rx_message(eid, MCTP_MESSAGE_TO_DST, 0, ctx, ctx->buf + 1,
 			   rc - 1);
@@ -425,8 +421,8 @@
 	return rc;
 }
 
-static int binding_init(struct ctx *ctx, const char *name,
-		int argc, char * const *argv)
+static int binding_init(struct ctx *ctx, const char *name, int argc,
+			char *const *argv)
 {
 	int rc;
 
@@ -436,8 +432,8 @@
 		return -1;
 	}
 
-	rc = ctx->binding->init(ctx->mctp, ctx->binding, ctx->local_eid,
-			argc, argv);
+	rc = ctx->binding->init(ctx->mctp, ctx->binding, ctx->local_eid, argc,
+				argv);
 	return rc;
 }
 
@@ -490,13 +486,13 @@
 			int i;
 
 			ctx->pollfds = realloc(ctx->pollfds,
-					(ctx->n_clients + FD_NR) *
-						sizeof(struct pollfd));
+					       (ctx->n_clients + FD_NR) *
+						       sizeof(struct pollfd));
 
 			for (i = 0; i < ctx->n_clients; i++) {
-				ctx->pollfds[FD_NR+i].fd =
+				ctx->pollfds[FD_NR + i].fd =
 					ctx->clients[i].sock;
-				ctx->pollfds[FD_NR+i].events = POLLIN;
+				ctx->pollfds[FD_NR + i].events = POLLIN;
 			}
 			clients_changed = false;
 		}
@@ -541,7 +537,7 @@
 		}
 
 		for (i = 0; i < ctx->n_clients; i++) {
-			if (!ctx->pollfds[FD_NR+i].revents)
+			if (!ctx->pollfds[FD_NR + i].revents)
 				continue;
 
 			rc = client_process_recv(ctx, i);
@@ -560,7 +556,6 @@
 			client_remove_inactive(ctx);
 	}
 
-
 	free(ctx->pollfds);
 
 	return rc;
@@ -586,7 +581,7 @@
 		fprintf(stderr, "  %s\n", bindings[i].name);
 }
 
-int main(int argc, char * const *argv)
+int main(int argc, char *const *argv)
 {
 	struct ctx *ctx, _ctx;
 	int rc;
@@ -667,7 +662,8 @@
 	if (ctx->pcap.binding.path) {
 		rc = capture_prepare(&ctx->pcap.binding);
 		if (rc == -1) {
-			fprintf(stderr, "Failed to initialise capture: %d\n", rc);
+			fprintf(stderr, "Failed to initialise capture: %d\n",
+				rc);
 			rc = EXIT_FAILURE;
 			goto cleanup_mctp;
 		}
@@ -679,13 +675,15 @@
 	if (ctx->pcap.socket.path) {
 		rc = capture_prepare(&ctx->pcap.socket);
 		if (rc == -1) {
-			fprintf(stderr, "Failed to initialise capture: %d\n", rc);
+			fprintf(stderr, "Failed to initialise capture: %d\n",
+				rc);
 			rc = EXIT_FAILURE;
 			goto cleanup_pcap_binding;
 		}
 	}
 
-	rc = binding_init(ctx, argv[optind], argc - optind - 1, argv + optind + 1);
+	rc = binding_init(ctx, argv[optind], argc - optind - 1,
+			  argv + optind + 1);
 	if (rc) {
 		fprintf(stderr, "Failed to initialise binding: %d\n", rc);
 		rc = EXIT_FAILURE;
@@ -720,5 +718,4 @@
 cleanup_mctp:
 
 	return rc;
-
 }
