]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
s390/con3270: use proper type for tasklet function
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 2 Sep 2021 18:38:53 +0000 (20:38 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 7 Sep 2021 11:38:42 +0000 (13:38 +0200)
Get rid of this warning:

drivers/s390/char/con3270.c:629:22: warning: cast between incompatible function types from ‘void (*)(struct raw3270_request *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type]
  629 |                      (void (*)(unsigned long)) con3270_read_tasklet,
      |                      ^

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/char/con3270.c

index 87cdbace1453196d4bcd02b781f4e80a6f8f08b4..e4592890f20aeff10bb927a739c51edfd093fc35 100644 (file)
@@ -292,13 +292,15 @@ con3270_update(struct timer_list *t)
  * Read tasklet.
  */
 static void
-con3270_read_tasklet(struct raw3270_request *rrq)
+con3270_read_tasklet(unsigned long data)
 {
        static char kreset_data = TW_KR;
+       struct raw3270_request *rrq;
        struct con3270 *cp;
        unsigned long flags;
        int nr_up, deactivate;
 
+       rrq = (struct raw3270_request *)data;
        cp = (struct con3270 *) rrq->view;
        spin_lock_irqsave(&cp->view.lock, flags);
        nr_up = cp->nr_up;
@@ -625,8 +627,7 @@ con3270_init(void)
        INIT_LIST_HEAD(&condev->lines);
        INIT_LIST_HEAD(&condev->update);
        timer_setup(&condev->timer, con3270_update, 0);
-       tasklet_init(&condev->readlet, 
-                    (void (*)(unsigned long)) con3270_read_tasklet,
+       tasklet_init(&condev->readlet, con3270_read_tasklet,
                     (unsigned long) condev->read);
 
        raw3270_add_view(&condev->view, &con3270_fn, 1, RAW3270_VIEW_LOCK_IRQ);