s390/qdio: make SBAL address array type-safe
authorJulian Wiedmann <jwi@linux.ibm.com>
Mon, 28 Jan 2019 15:11:13 +0000 (16:11 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 7 Feb 2019 10:57:07 +0000 (11:57 +0100)
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: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/qdio.h
drivers/s390/cio/qdio_setup.c
drivers/s390/net/qeth_core_main.c
drivers/s390/scsi/zfcp_qdio.c

index d46edde7e4587e96d4bd148bf6c11f6bce963ee7..db5ef22c46e4e959eba66e203495f10c45740c7a 100644 (file)
@@ -361,8 +361,8 @@ struct qdio_initialize {
                                          unsigned long);
        int scan_threshold;
        unsigned long int_parm;
-       void **input_sbal_addr_array;
-       void **output_sbal_addr_array;
+       struct qdio_buffer **input_sbal_addr_array;
+       struct qdio_buffer **output_sbal_addr_array;
        struct qdio_outbuf_state *output_sbal_state_array;
 };
 
index e324d890a4f61840a8b2f6e3ef7a640b93c54579..a59887fad13e6e11e4300b7863b2487379edd706 100644 (file)
@@ -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,
-                               void **sbals_array, int i)
+                               struct qdio_buffer **sbals_array, int i)
 {
        struct qdio_q *prev;
        int j;
@@ -212,8 +212,8 @@ static void setup_queues(struct qdio_irq *irq_ptr,
                         struct qdio_initialize *qdio_init)
 {
        struct qdio_q *q;
-       void **input_sbal_array = qdio_init->input_sbal_addr_array;
-       void **output_sbal_array = qdio_init->output_sbal_addr_array;
+       struct qdio_buffer **input_sbal_array = qdio_init->input_sbal_addr_array;
+       struct qdio_buffer **output_sbal_array = qdio_init->output_sbal_addr_array;
        struct qdio_outbuf_state *output_sbal_state_array =
                                  qdio_init->output_sbal_state_array;
        int i;
index e63e03143ca7fa2f6995c7a24dbef9c981c7f41c..2b68022b027b05542cfb31785e476360ba32902f 100644 (file)
@@ -4979,8 +4979,8 @@ static int qeth_qdio_establish(struct qeth_card *card)
        init_data.output_handler         = qeth_qdio_output_handler;
        init_data.queue_start_poll_array = queue_start_poll;
        init_data.int_parm               = (unsigned long) card;
-       init_data.input_sbal_addr_array  = (void **) in_sbal_ptrs;
-       init_data.output_sbal_addr_array = (void **) out_sbal_ptrs;
+       init_data.input_sbal_addr_array  = in_sbal_ptrs;
+       init_data.output_sbal_addr_array = out_sbal_ptrs;
        init_data.output_sbal_state_array = card->qdio.out_bufstates;
        init_data.scan_threshold =
                (card->info.type == QETH_CARD_TYPE_IQD) ? 1 : 32;
index 10c4e8e3fd59485c0d71ad25598e8a640775b96b..661436a92f8e69903200a568304276b3f3b1b12f 100644 (file)
@@ -294,8 +294,8 @@ static void zfcp_qdio_setup_init_data(struct qdio_initialize *id,
        id->input_handler = zfcp_qdio_int_resp;
        id->output_handler = zfcp_qdio_int_req;
        id->int_parm = (unsigned long) qdio;
-       id->input_sbal_addr_array = (void **) (qdio->res_q);
-       id->output_sbal_addr_array = (void **) (qdio->req_q);
+       id->input_sbal_addr_array = qdio->res_q;
+       id->output_sbal_addr_array = qdio->req_q;
        id->scan_threshold =
                QDIO_MAX_BUFFERS_PER_Q - ZFCP_QDIO_MAX_SBALS_PER_REQ * 2;
 }