test/usb_prl.c: Format with clang-format
BRANCH=none
TEST=none
@@ -34,14 +34,14 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
static enum pd_power_role get_partner_power_role(int port)
{
- return pd_get_power_role(port) == PD_ROLE_SINK ?
- PD_ROLE_SOURCE : PD_ROLE_SINK;
+ return pd_get_power_role(port) == PD_ROLE_SINK ? PD_ROLE_SOURCE :
+ PD_ROLE_SINK;
}
static enum pd_data_role get_partner_data_role(int port)
{
- return pd_get_data_role(port) == PD_ROLE_UFP ?
- PD_ROLE_DFP : PD_ROLE_UFP;
+ return pd_get_data_role(port) == PD_ROLE_UFP ? PD_ROLE_DFP :
+ PD_ROLE_UFP;
}
static void enable_prl(int port, int en)
@@ -61,8 +61,8 @@ static int test_receive_control_msg(void)
uint16_t header = PD_HEADER(PD_CTRL_DR_SWAP,
get_partner_power_role(port),
get_partner_data_role(port),
- mock_tc_port[port].msg_rx_id,
- 0, mock_tc_port[port].rev, 0);
+ mock_tc_port[port].msg_rx_id, 0,
+ mock_tc_port[port].rev, 0);
/* Set up the message to be received. */
mock_tcpm_rx_msg(port, header, 0, NULL);
@@ -113,8 +113,8 @@ static int test_discard_queued_tx_when_rx_happens(void)
uint16_t header = PD_HEADER(PD_CTRL_DR_SWAP,
get_partner_power_role(port),
get_partner_data_role(port),
- mock_tc_port[port].msg_rx_id,
- 0, mock_tc_port[port].rev, 0);
+ mock_tc_port[port].msg_rx_id, 0,
+ mock_tc_port[port].rev, 0);
uint8_t *buf = tx_emsg[port].buf;
uint8_t len = 8;
uint8_t i = 0;
@@ -173,7 +173,6 @@ void run_test(int argc, char **argv)
RUN_TEST(test_discard_queued_tx_when_rx_happens);
/* TODO add tests here */
-
/* Do basic state machine validity checks last. */
RUN_TEST(test_prl_no_parent_cycles);
RUN_TEST(test_prl_all_states_named);
