Commit bdf11767 authored by Julian Wiedmann's avatar Julian Wiedmann Committed by Martin Schwidefsky

s390/qdio: make SBAL address array type-safe

There is no need to use void pointers, all drivers are in agreement
about the underlying data structure of the SBAL arrays.
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: default avatarBenjamin Block <bblock@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent cfbb4a7a
...@@ -361,8 +361,8 @@ struct qdio_initialize { ...@@ -361,8 +361,8 @@ struct qdio_initialize {
unsigned long); unsigned long);
int scan_threshold; int scan_threshold;
unsigned long int_parm; unsigned long int_parm;
void **input_sbal_addr_array; struct qdio_buffer **input_sbal_addr_array;
void **output_sbal_addr_array; struct qdio_buffer **output_sbal_addr_array;
struct qdio_outbuf_state *output_sbal_state_array; struct qdio_outbuf_state *output_sbal_state_array;
}; };
......
...@@ -181,7 +181,7 @@ static void setup_queues_misc(struct qdio_q *q, struct qdio_irq *irq_ptr, ...@@ -181,7 +181,7 @@ static void setup_queues_misc(struct qdio_q *q, struct qdio_irq *irq_ptr,
} }
static void setup_storage_lists(struct qdio_q *q, struct qdio_irq *irq_ptr, static void setup_storage_lists(struct qdio_q *q, struct qdio_irq *irq_ptr,
void **sbals_array, int i) struct qdio_buffer **sbals_array, int i)
{ {
struct qdio_q *prev; struct qdio_q *prev;
int j; int j;
...@@ -212,8 +212,8 @@ static void setup_queues(struct qdio_irq *irq_ptr, ...@@ -212,8 +212,8 @@ static void setup_queues(struct qdio_irq *irq_ptr,
struct qdio_initialize *qdio_init) struct qdio_initialize *qdio_init)
{ {
struct qdio_q *q; struct qdio_q *q;
void **input_sbal_array = qdio_init->input_sbal_addr_array; struct qdio_buffer **input_sbal_array = qdio_init->input_sbal_addr_array;
void **output_sbal_array = qdio_init->output_sbal_addr_array; struct qdio_buffer **output_sbal_array = qdio_init->output_sbal_addr_array;
struct qdio_outbuf_state *output_sbal_state_array = struct qdio_outbuf_state *output_sbal_state_array =
qdio_init->output_sbal_state_array; qdio_init->output_sbal_state_array;
int i; int i;
......
...@@ -4979,8 +4979,8 @@ static int qeth_qdio_establish(struct qeth_card *card) ...@@ -4979,8 +4979,8 @@ static int qeth_qdio_establish(struct qeth_card *card)
init_data.output_handler = qeth_qdio_output_handler; init_data.output_handler = qeth_qdio_output_handler;
init_data.queue_start_poll_array = queue_start_poll; init_data.queue_start_poll_array = queue_start_poll;
init_data.int_parm = (unsigned long) card; init_data.int_parm = (unsigned long) card;
init_data.input_sbal_addr_array = (void **) in_sbal_ptrs; init_data.input_sbal_addr_array = in_sbal_ptrs;
init_data.output_sbal_addr_array = (void **) out_sbal_ptrs; init_data.output_sbal_addr_array = out_sbal_ptrs;
init_data.output_sbal_state_array = card->qdio.out_bufstates; init_data.output_sbal_state_array = card->qdio.out_bufstates;
init_data.scan_threshold = init_data.scan_threshold =
(card->info.type == QETH_CARD_TYPE_IQD) ? 1 : 32; (card->info.type == QETH_CARD_TYPE_IQD) ? 1 : 32;
......
...@@ -294,8 +294,8 @@ static void zfcp_qdio_setup_init_data(struct qdio_initialize *id, ...@@ -294,8 +294,8 @@ static void zfcp_qdio_setup_init_data(struct qdio_initialize *id,
id->input_handler = zfcp_qdio_int_resp; id->input_handler = zfcp_qdio_int_resp;
id->output_handler = zfcp_qdio_int_req; id->output_handler = zfcp_qdio_int_req;
id->int_parm = (unsigned long) qdio; id->int_parm = (unsigned long) qdio;
id->input_sbal_addr_array = (void **) (qdio->res_q); id->input_sbal_addr_array = qdio->res_q;
id->output_sbal_addr_array = (void **) (qdio->req_q); id->output_sbal_addr_array = qdio->req_q;
id->scan_threshold = id->scan_threshold =
QDIO_MAX_BUFFERS_PER_Q - ZFCP_QDIO_MAX_SBALS_PER_REQ * 2; QDIO_MAX_BUFFERS_PER_Q - ZFCP_QDIO_MAX_SBALS_PER_REQ * 2;
} }
......
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