diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-10-12 10:11:38 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-10-12 10:13:07 -0400 |
commit | b18a2db416088ad54a4bfb59c0b932be383aee83 (patch) | |
tree | 6a5bbd0dde9552cbff5eca9f7b08d50dbe3b01ff /drivers/s390 | |
parent | 5a291321d6b7ab40923b9a42b36746f7b5ca0055 (diff) |
[S390] qdio: dont cast function pointers and use them to call functions.
According to C99 6.3.2.3 it's undefined what happens if a converted
pointer is used to call a function whose type is not compatible with
the pointed-to type.
That's what the qdio code is doing, so fix it.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/qdio.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index d8d479876ec7..151636cc8f24 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c | |||
@@ -1024,9 +1024,9 @@ __qdio_outbound_processing(struct qdio_q *q) | |||
1024 | } | 1024 | } |
1025 | 1025 | ||
1026 | static void | 1026 | static void |
1027 | qdio_outbound_processing(struct qdio_q *q) | 1027 | qdio_outbound_processing(unsigned long q) |
1028 | { | 1028 | { |
1029 | __qdio_outbound_processing(q); | 1029 | __qdio_outbound_processing((struct qdio_q *) q); |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | /************************* INBOUND ROUTINES *******************************/ | 1032 | /************************* INBOUND ROUTINES *******************************/ |
@@ -1449,9 +1449,10 @@ out: | |||
1449 | } | 1449 | } |
1450 | 1450 | ||
1451 | static void | 1451 | static void |
1452 | tiqdio_inbound_processing(struct qdio_q *q) | 1452 | tiqdio_inbound_processing(unsigned long q) |
1453 | { | 1453 | { |
1454 | __tiqdio_inbound_processing(q, atomic_read(&spare_indicator_usecount)); | 1454 | __tiqdio_inbound_processing((struct qdio_q *) q, |
1455 | atomic_read(&spare_indicator_usecount)); | ||
1455 | } | 1456 | } |
1456 | 1457 | ||
1457 | static void | 1458 | static void |
@@ -1494,9 +1495,9 @@ again: | |||
1494 | } | 1495 | } |
1495 | 1496 | ||
1496 | static void | 1497 | static void |
1497 | qdio_inbound_processing(struct qdio_q *q) | 1498 | qdio_inbound_processing(unsigned long q) |
1498 | { | 1499 | { |
1499 | __qdio_inbound_processing(q); | 1500 | __qdio_inbound_processing((struct qdio_q *) q); |
1500 | } | 1501 | } |
1501 | 1502 | ||
1502 | /************************* MAIN ROUTINES *******************************/ | 1503 | /************************* MAIN ROUTINES *******************************/ |
@@ -1760,12 +1761,15 @@ qdio_fill_qs(struct qdio_irq *irq_ptr, struct ccw_device *cdev, | |||
1760 | q->handler=input_handler; | 1761 | q->handler=input_handler; |
1761 | q->dev_st_chg_ind=irq_ptr->dev_st_chg_ind; | 1762 | q->dev_st_chg_ind=irq_ptr->dev_st_chg_ind; |
1762 | 1763 | ||
1763 | q->tasklet.data=(unsigned long)q; | ||
1764 | /* q->is_thinint_q isn't valid at this time, but | 1764 | /* q->is_thinint_q isn't valid at this time, but |
1765 | * irq_ptr->is_thinint_irq is */ | 1765 | * irq_ptr->is_thinint_irq is |
1766 | q->tasklet.func=(void(*)(unsigned long)) | 1766 | */ |
1767 | ((irq_ptr->is_thinint_irq)?&tiqdio_inbound_processing: | 1767 | if (irq_ptr->is_thinint_irq) |
1768 | &qdio_inbound_processing); | 1768 | tasklet_init(&q->tasklet, tiqdio_inbound_processing, |
1769 | (unsigned long) q); | ||
1770 | else | ||
1771 | tasklet_init(&q->tasklet, qdio_inbound_processing, | ||
1772 | (unsigned long) q); | ||
1769 | 1773 | ||
1770 | /* actually this is not used for inbound queues. yet. */ | 1774 | /* actually this is not used for inbound queues. yet. */ |
1771 | atomic_set(&q->busy_siga_counter,0); | 1775 | atomic_set(&q->busy_siga_counter,0); |
@@ -1836,13 +1840,10 @@ qdio_fill_qs(struct qdio_irq *irq_ptr, struct ccw_device *cdev, | |||
1836 | q->last_move_ftc=0; | 1840 | q->last_move_ftc=0; |
1837 | q->handler=output_handler; | 1841 | q->handler=output_handler; |
1838 | 1842 | ||
1839 | q->tasklet.data=(unsigned long)q; | 1843 | tasklet_init(&q->tasklet, qdio_outbound_processing, |
1840 | q->tasklet.func=(void(*)(unsigned long)) | 1844 | (unsigned long) q); |
1841 | &qdio_outbound_processing; | 1845 | setup_timer(&q->timer, qdio_outbound_processing, |
1842 | q->timer.function=(void(*)(unsigned long)) | 1846 | (unsigned long) q); |
1843 | &qdio_outbound_processing; | ||
1844 | q->timer.data = (long)q; | ||
1845 | init_timer(&q->timer); | ||
1846 | 1847 | ||
1847 | atomic_set(&q->busy_siga_counter,0); | 1848 | atomic_set(&q->busy_siga_counter,0); |
1848 | q->timing.busy_start=0; | 1849 | q->timing.busy_start=0; |