From: Amitoj Kaur Chawla Date: Sun, 1 Nov 2015 10:46:40 +0000 (+0530) Subject: staging: rdma: hfi1: sdma: Remove wrapper functions X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8edf75020f60b2e1572291f93e0898351d478795;p=linux-beck.git staging: rdma: hfi1: sdma: Remove wrapper functions Drop wrapper functions sdma_start_err_halt_wait() and sdma_start_sw_clean_up() that can be replaced by a direct call to schedule_work() and tasklet_hi_schedule() respectively both of which are standard kernel functions. Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c index 2a1da2189900..f1855457fa32 100644 --- a/drivers/staging/rdma/hfi1/sdma.c +++ b/drivers/staging/rdma/hfi1/sdma.c @@ -236,7 +236,6 @@ static void sdma_hw_clean_up_task(unsigned long); static void sdma_put(struct sdma_state *); static void sdma_set_state(struct sdma_engine *, enum sdma_states); static void sdma_start_hw_clean_up(struct sdma_engine *); -static void sdma_start_sw_clean_up(struct sdma_engine *); static void sdma_sw_clean_up_task(unsigned long); static void sdma_sendctrl(struct sdma_engine *, unsigned); static void init_sdma_regs(struct sdma_engine *, u32, uint); @@ -470,12 +469,6 @@ static void sdma_err_halt_wait(struct work_struct *work) sdma_process_event(sde, sdma_event_e15_hw_halt_done); } -static void sdma_start_err_halt_wait(struct sdma_engine *sde) -{ - schedule_work(&sde->err_halt_worker); -} - - static void sdma_err_progress_check_schedule(struct sdma_engine *sde) { if (!is_bx(sde->dd) && HFI1_CAP_IS_KSET(SDMA_AHG)) { @@ -682,11 +675,6 @@ static void sdma_start_hw_clean_up(struct sdma_engine *sde) tasklet_hi_schedule(&sde->sdma_hw_clean_up_task); } -static void sdma_start_sw_clean_up(struct sdma_engine *sde) -{ - tasklet_hi_schedule(&sde->sdma_sw_clean_up_task); -} - static void sdma_set_state(struct sdma_engine *sde, enum sdma_states next_state) { @@ -2308,7 +2296,7 @@ static void __sdma_process_event(struct sdma_engine *sde, case sdma_event_e50_hw_cleaned: break; case sdma_event_e60_hw_halted: - sdma_start_err_halt_wait(sde); + schedule_work(&sde->err_halt_worker); break; case sdma_event_e70_go_idle: ss->go_s99_running = 0; @@ -2389,7 +2377,7 @@ static void __sdma_process_event(struct sdma_engine *sde, break; case sdma_event_e60_hw_halted: sdma_set_state(sde, sdma_state_s50_hw_halt_wait); - sdma_start_err_halt_wait(sde); + schedule_work(&sde->err_halt_worker); break; case sdma_event_e70_go_idle: break; @@ -2452,7 +2440,7 @@ static void __sdma_process_event(struct sdma_engine *sde, switch (event) { case sdma_event_e00_go_hw_down: sdma_set_state(sde, sdma_state_s00_hw_down); - sdma_start_sw_clean_up(sde); + tasklet_hi_schedule(&sde->sdma_sw_clean_up_task); break; case sdma_event_e10_go_hw_start: break; @@ -2494,13 +2482,13 @@ static void __sdma_process_event(struct sdma_engine *sde, switch (event) { case sdma_event_e00_go_hw_down: sdma_set_state(sde, sdma_state_s00_hw_down); - sdma_start_sw_clean_up(sde); + tasklet_hi_schedule(&sde->sdma_sw_clean_up_task); break; case sdma_event_e10_go_hw_start: break; case sdma_event_e15_hw_halt_done: sdma_set_state(sde, sdma_state_s30_sw_clean_up_wait); - sdma_start_sw_clean_up(sde); + tasklet_hi_schedule(&sde->sdma_sw_clean_up_task); break; case sdma_event_e25_hw_clean_up_done: break; @@ -2512,7 +2500,7 @@ static void __sdma_process_event(struct sdma_engine *sde, case sdma_event_e50_hw_cleaned: break; case sdma_event_e60_hw_halted: - sdma_start_err_halt_wait(sde); + schedule_work(&sde->err_halt_worker); break; case sdma_event_e70_go_idle: ss->go_s99_running = 0; @@ -2535,13 +2523,13 @@ static void __sdma_process_event(struct sdma_engine *sde, switch (event) { case sdma_event_e00_go_hw_down: sdma_set_state(sde, sdma_state_s00_hw_down); - sdma_start_sw_clean_up(sde); + tasklet_hi_schedule(&sde->sdma_sw_clean_up_task); break; case sdma_event_e10_go_hw_start: break; case sdma_event_e15_hw_halt_done: sdma_set_state(sde, sdma_state_s30_sw_clean_up_wait); - sdma_start_sw_clean_up(sde); + tasklet_hi_schedule(&sde->sdma_sw_clean_up_task); break; case sdma_event_e25_hw_clean_up_done: break; @@ -2553,7 +2541,7 @@ static void __sdma_process_event(struct sdma_engine *sde, case sdma_event_e50_hw_cleaned: break; case sdma_event_e60_hw_halted: - sdma_start_err_halt_wait(sde); + schedule_work(&sde->err_halt_worker); break; case sdma_event_e70_go_idle: ss->go_s99_running = 0; @@ -2575,7 +2563,7 @@ static void __sdma_process_event(struct sdma_engine *sde, switch (event) { case sdma_event_e00_go_hw_down: sdma_set_state(sde, sdma_state_s00_hw_down); - sdma_start_sw_clean_up(sde); + tasklet_hi_schedule(&sde->sdma_sw_clean_up_task); break; case sdma_event_e10_go_hw_start: break; @@ -2599,7 +2587,7 @@ static void __sdma_process_event(struct sdma_engine *sde, break; case sdma_event_e81_hw_frozen: sdma_set_state(sde, sdma_state_s82_freeze_sw_clean); - sdma_start_sw_clean_up(sde); + tasklet_hi_schedule(&sde->sdma_sw_clean_up_task); break; case sdma_event_e82_hw_unfreeze: break; @@ -2614,7 +2602,7 @@ static void __sdma_process_event(struct sdma_engine *sde, switch (event) { case sdma_event_e00_go_hw_down: sdma_set_state(sde, sdma_state_s00_hw_down); - sdma_start_sw_clean_up(sde); + tasklet_hi_schedule(&sde->sdma_sw_clean_up_task); break; case sdma_event_e10_go_hw_start: break; @@ -2658,7 +2646,7 @@ static void __sdma_process_event(struct sdma_engine *sde, switch (event) { case sdma_event_e00_go_hw_down: sdma_set_state(sde, sdma_state_s00_hw_down); - sdma_start_sw_clean_up(sde); + tasklet_hi_schedule(&sde->sdma_sw_clean_up_task); break; case sdma_event_e10_go_hw_start: break; @@ -2681,7 +2669,7 @@ static void __sdma_process_event(struct sdma_engine *sde, * progress check */ sdma_set_state(sde, sdma_state_s50_hw_halt_wait); - sdma_start_err_halt_wait(sde); + schedule_work(&sde->err_halt_worker); break; case sdma_event_e70_go_idle: sdma_set_state(sde, sdma_state_s60_idle_halt_wait);