summaryrefslogtreecommitdiff
path: root/fuzz/usb_pd_fuzz.c
diff options
context:
space:
mode:
Diffstat (limited to 'fuzz/usb_pd_fuzz.c')
-rw-r--r--fuzz/usb_pd_fuzz.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fuzz/usb_pd_fuzz.c b/fuzz/usb_pd_fuzz.c
index 54b138e03c..777a86d592 100644
--- a/fuzz/usb_pd_fuzz.c
+++ b/fuzz/usb_pd_fuzz.c
@@ -114,7 +114,7 @@ int tcpm_enqueue_message(const int port)
pending = 1;
/* Wake PD task up so it can process incoming RX messages */
- task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE);
return EC_SUCCESS;
}
@@ -175,14 +175,13 @@ void run_test(int argc, char **argv)
memset(&mock_tcpc_state[port],
0, sizeof(mock_tcpc_state[port]));
- task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_TCPC_RESET, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TCPC_RESET);
task_wait_event(250 * MSEC);
mock_tcpc_state[port].cc1 = next_cc1;
mock_tcpc_state[port].cc2 = next_cc2;
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
task_wait_event(50 * MSEC);
/* Fake RX messages, one by one. */
@@ -234,7 +233,7 @@ int test_fuzz_one_input(const uint8_t *data, unsigned int size)
return 0;
}
- task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ, 0);
+ task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ);
pthread_cond_wait(&done_cond, &lock);
return 0;