diff options
author | Felix Manlunas | 2018-08-29 03:51:44 +0200 |
---|---|---|
committer | David S. Miller | 2018-08-30 05:07:42 +0200 |
commit | 64fecd3ec512a14a5837ab4eee2779201f353da5 (patch) | |
tree | 1748b6ba76c831db76a7f304c5e0b7bd2387d835 /drivers/net/ethernet/cavium/liquidio/octeon_main.h | |
parent | liquidio: change octnic_ctrl_pkt to do synchronous soft commands (diff) | |
download | kernel-qcow2-linux-64fecd3ec512a14a5837ab4eee2779201f353da5.tar.gz kernel-qcow2-linux-64fecd3ec512a14a5837ab4eee2779201f353da5.tar.xz kernel-qcow2-linux-64fecd3ec512a14a5837ab4eee2779201f353da5.zip |
liquidio: remove obsolete functions and data structures
1. Remove unused functions and data structures.
2. Change the sending of the remaining soft commands to synchronous.
Signed-off-by: Weilin Chang <weilin.chang@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/octeon_main.h')
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_main.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_main.h b/drivers/net/ethernet/cavium/liquidio/octeon_main.h index de2a2290d5de..38c055f3c213 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_main.h +++ b/drivers/net/ethernet/cavium/liquidio/octeon_main.h @@ -146,48 +146,6 @@ err_release_region: return 1; } -static inline int -sleep_cond(wait_queue_head_t *wait_queue, int *condition) -{ - int errno = 0; - wait_queue_entry_t we; - - init_waitqueue_entry(&we, current); - add_wait_queue(wait_queue, &we); - while (!(READ_ONCE(*condition))) { - set_current_state(TASK_INTERRUPTIBLE); - if (signal_pending(current)) { - errno = -EINTR; - goto out; - } - schedule(); - } -out: - set_current_state(TASK_RUNNING); - remove_wait_queue(wait_queue, &we); - return errno; -} - -/* Gives up the CPU for a timeout period. - * Check that the condition is not true before we go to sleep for a - * timeout period. - */ -static inline void -sleep_timeout_cond(wait_queue_head_t *wait_queue, - int *condition, - int timeout) -{ - wait_queue_entry_t we; - - init_waitqueue_entry(&we, current); - add_wait_queue(wait_queue, &we); - set_current_state(TASK_INTERRUPTIBLE); - if (!(*condition)) - schedule_timeout(timeout); - set_current_state(TASK_RUNNING); - remove_wait_queue(wait_queue, &we); -} - /* input parameter: * sc: pointer to a soft request * timeout: milli sec which an application wants to wait for the |