s390/qdio: clean up usage of qdio_data

This removes the last remaining accesses to ->qdio_data from internal
code. Just pass the qdio_irq struct where needed instead.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Julian Wiedmann 2020-06-02 14:23:32 +02:00 коммит произвёл Vasily Gorbik
Родитель 64438e1bc0
Коммит 3d6c6f20d9
1 изменённых файлов: 7 добавлений и 10 удалений

Просмотреть файл

@ -916,10 +916,10 @@ static void qdio_int_handler_pci(struct qdio_irq *irq_ptr)
} }
} }
static void qdio_handle_activate_check(struct ccw_device *cdev, static void qdio_handle_activate_check(struct qdio_irq *irq_ptr,
unsigned long intparm, int cstat, int dstat) unsigned long intparm, int cstat,
int dstat)
{ {
struct qdio_irq *irq_ptr = cdev->private->qdio_data;
struct qdio_q *q; struct qdio_q *q;
DBF_ERROR("%4x ACT CHECK", irq_ptr->schid.sch_no); DBF_ERROR("%4x ACT CHECK", irq_ptr->schid.sch_no);
@ -946,11 +946,9 @@ no_handler:
lgr_info_log(); lgr_info_log();
} }
static void qdio_establish_handle_irq(struct ccw_device *cdev, int cstat, static void qdio_establish_handle_irq(struct qdio_irq *irq_ptr, int cstat,
int dstat) int dstat)
{ {
struct qdio_irq *irq_ptr = cdev->private->qdio_data;
DBF_DEV_EVENT(DBF_INFO, irq_ptr, "qest irq"); DBF_DEV_EVENT(DBF_INFO, irq_ptr, "qest irq");
if (cstat) if (cstat)
@ -997,7 +995,7 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm,
switch (irq_ptr->state) { switch (irq_ptr->state) {
case QDIO_IRQ_STATE_INACTIVE: case QDIO_IRQ_STATE_INACTIVE:
qdio_establish_handle_irq(cdev, cstat, dstat); qdio_establish_handle_irq(irq_ptr, cstat, dstat);
break; break;
case QDIO_IRQ_STATE_CLEANUP: case QDIO_IRQ_STATE_CLEANUP:
qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE); qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE);
@ -1009,7 +1007,7 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm,
return; return;
} }
if (cstat || dstat) if (cstat || dstat)
qdio_handle_activate_check(cdev, intparm, cstat, qdio_handle_activate_check(irq_ptr, intparm, cstat,
dstat); dstat);
break; break;
case QDIO_IRQ_STATE_STOPPED: case QDIO_IRQ_STATE_STOPPED:
@ -1513,12 +1511,11 @@ static int handle_outbound(struct qdio_q *q, unsigned int callflags,
int do_QDIO(struct ccw_device *cdev, unsigned int callflags, int do_QDIO(struct ccw_device *cdev, unsigned int callflags,
int q_nr, unsigned int bufnr, unsigned int count) int q_nr, unsigned int bufnr, unsigned int count)
{ {
struct qdio_irq *irq_ptr; struct qdio_irq *irq_ptr = cdev->private->qdio_data;
if (bufnr >= QDIO_MAX_BUFFERS_PER_Q || count > QDIO_MAX_BUFFERS_PER_Q) if (bufnr >= QDIO_MAX_BUFFERS_PER_Q || count > QDIO_MAX_BUFFERS_PER_Q)
return -EINVAL; return -EINVAL;
irq_ptr = cdev->private->qdio_data;
if (!irq_ptr) if (!irq_ptr)
return -ENODEV; return -ENODEV;