Commit 8edf7502 authored by Amitoj Kaur Chawla's avatar Amitoj Kaur Chawla Committed by Greg Kroah-Hartman

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: default avatarAmitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e5b6131
...@@ -236,7 +236,6 @@ static void sdma_hw_clean_up_task(unsigned long); ...@@ -236,7 +236,6 @@ static void sdma_hw_clean_up_task(unsigned long);
static void sdma_put(struct sdma_state *); static void sdma_put(struct sdma_state *);
static void sdma_set_state(struct sdma_engine *, enum sdma_states); 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_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_sw_clean_up_task(unsigned long);
static void sdma_sendctrl(struct sdma_engine *, unsigned); static void sdma_sendctrl(struct sdma_engine *, unsigned);
static void init_sdma_regs(struct sdma_engine *, u32, uint); static void init_sdma_regs(struct sdma_engine *, u32, uint);
...@@ -470,12 +469,6 @@ static void sdma_err_halt_wait(struct work_struct *work) ...@@ -470,12 +469,6 @@ static void sdma_err_halt_wait(struct work_struct *work)
sdma_process_event(sde, sdma_event_e15_hw_halt_done); 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) static void sdma_err_progress_check_schedule(struct sdma_engine *sde)
{ {
if (!is_bx(sde->dd) && HFI1_CAP_IS_KSET(SDMA_AHG)) { 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) ...@@ -682,11 +675,6 @@ static void sdma_start_hw_clean_up(struct sdma_engine *sde)
tasklet_hi_schedule(&sde->sdma_hw_clean_up_task); 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, static void sdma_set_state(struct sdma_engine *sde,
enum sdma_states next_state) enum sdma_states next_state)
{ {
...@@ -2308,7 +2296,7 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2308,7 +2296,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
case sdma_event_e50_hw_cleaned: case sdma_event_e50_hw_cleaned:
break; break;
case sdma_event_e60_hw_halted: case sdma_event_e60_hw_halted:
sdma_start_err_halt_wait(sde); schedule_work(&sde->err_halt_worker);
break; break;
case sdma_event_e70_go_idle: case sdma_event_e70_go_idle:
ss->go_s99_running = 0; ss->go_s99_running = 0;
...@@ -2389,7 +2377,7 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2389,7 +2377,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
break; break;
case sdma_event_e60_hw_halted: case sdma_event_e60_hw_halted:
sdma_set_state(sde, sdma_state_s50_hw_halt_wait); sdma_set_state(sde, sdma_state_s50_hw_halt_wait);
sdma_start_err_halt_wait(sde); schedule_work(&sde->err_halt_worker);
break; break;
case sdma_event_e70_go_idle: case sdma_event_e70_go_idle:
break; break;
...@@ -2452,7 +2440,7 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2452,7 +2440,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
switch (event) { switch (event) {
case sdma_event_e00_go_hw_down: case sdma_event_e00_go_hw_down:
sdma_set_state(sde, sdma_state_s00_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; break;
case sdma_event_e10_go_hw_start: case sdma_event_e10_go_hw_start:
break; break;
...@@ -2494,13 +2482,13 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2494,13 +2482,13 @@ static void __sdma_process_event(struct sdma_engine *sde,
switch (event) { switch (event) {
case sdma_event_e00_go_hw_down: case sdma_event_e00_go_hw_down:
sdma_set_state(sde, sdma_state_s00_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; break;
case sdma_event_e10_go_hw_start: case sdma_event_e10_go_hw_start:
break; break;
case sdma_event_e15_hw_halt_done: case sdma_event_e15_hw_halt_done:
sdma_set_state(sde, sdma_state_s30_sw_clean_up_wait); 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; break;
case sdma_event_e25_hw_clean_up_done: case sdma_event_e25_hw_clean_up_done:
break; break;
...@@ -2512,7 +2500,7 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2512,7 +2500,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
case sdma_event_e50_hw_cleaned: case sdma_event_e50_hw_cleaned:
break; break;
case sdma_event_e60_hw_halted: case sdma_event_e60_hw_halted:
sdma_start_err_halt_wait(sde); schedule_work(&sde->err_halt_worker);
break; break;
case sdma_event_e70_go_idle: case sdma_event_e70_go_idle:
ss->go_s99_running = 0; ss->go_s99_running = 0;
...@@ -2535,13 +2523,13 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2535,13 +2523,13 @@ static void __sdma_process_event(struct sdma_engine *sde,
switch (event) { switch (event) {
case sdma_event_e00_go_hw_down: case sdma_event_e00_go_hw_down:
sdma_set_state(sde, sdma_state_s00_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; break;
case sdma_event_e10_go_hw_start: case sdma_event_e10_go_hw_start:
break; break;
case sdma_event_e15_hw_halt_done: case sdma_event_e15_hw_halt_done:
sdma_set_state(sde, sdma_state_s30_sw_clean_up_wait); 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; break;
case sdma_event_e25_hw_clean_up_done: case sdma_event_e25_hw_clean_up_done:
break; break;
...@@ -2553,7 +2541,7 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2553,7 +2541,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
case sdma_event_e50_hw_cleaned: case sdma_event_e50_hw_cleaned:
break; break;
case sdma_event_e60_hw_halted: case sdma_event_e60_hw_halted:
sdma_start_err_halt_wait(sde); schedule_work(&sde->err_halt_worker);
break; break;
case sdma_event_e70_go_idle: case sdma_event_e70_go_idle:
ss->go_s99_running = 0; ss->go_s99_running = 0;
...@@ -2575,7 +2563,7 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2575,7 +2563,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
switch (event) { switch (event) {
case sdma_event_e00_go_hw_down: case sdma_event_e00_go_hw_down:
sdma_set_state(sde, sdma_state_s00_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; break;
case sdma_event_e10_go_hw_start: case sdma_event_e10_go_hw_start:
break; break;
...@@ -2599,7 +2587,7 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2599,7 +2587,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
break; break;
case sdma_event_e81_hw_frozen: case sdma_event_e81_hw_frozen:
sdma_set_state(sde, sdma_state_s82_freeze_sw_clean); 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; break;
case sdma_event_e82_hw_unfreeze: case sdma_event_e82_hw_unfreeze:
break; break;
...@@ -2614,7 +2602,7 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2614,7 +2602,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
switch (event) { switch (event) {
case sdma_event_e00_go_hw_down: case sdma_event_e00_go_hw_down:
sdma_set_state(sde, sdma_state_s00_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; break;
case sdma_event_e10_go_hw_start: case sdma_event_e10_go_hw_start:
break; break;
...@@ -2658,7 +2646,7 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2658,7 +2646,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
switch (event) { switch (event) {
case sdma_event_e00_go_hw_down: case sdma_event_e00_go_hw_down:
sdma_set_state(sde, sdma_state_s00_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; break;
case sdma_event_e10_go_hw_start: case sdma_event_e10_go_hw_start:
break; break;
...@@ -2681,7 +2669,7 @@ static void __sdma_process_event(struct sdma_engine *sde, ...@@ -2681,7 +2669,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
* progress check * progress check
*/ */
sdma_set_state(sde, sdma_state_s50_hw_halt_wait); sdma_set_state(sde, sdma_state_s50_hw_halt_wait);
sdma_start_err_halt_wait(sde); schedule_work(&sde->err_halt_worker);
break; break;
case sdma_event_e70_go_idle: case sdma_event_e70_go_idle:
sdma_set_state(sde, sdma_state_s60_idle_halt_wait); sdma_set_state(sde, sdma_state_s60_idle_halt_wait);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment