hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/s390/net/ctcm_fsms.c
....@@ -307,8 +307,7 @@
307307 ch->ccw[1].count = ch->trans_skb->len;
308308 fsm_addtimer(&ch->timer, CTCM_TIME_5_SEC, CTC_EVENT_TIMER, ch);
309309 ch->prof.send_stamp = jiffies;
310
- rc = ccw_device_start(ch->cdev, &ch->ccw[0],
311
- (unsigned long)ch, 0xff, 0);
310
+ rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
312311 ch->prof.doios_multi++;
313312 if (rc != 0) {
314313 priv->stats.tx_dropped += i;
....@@ -417,8 +416,7 @@
417416 if (ctcm_checkalloc_buffer(ch))
418417 return;
419418 ch->ccw[1].count = ch->max_bufsize;
420
- rc = ccw_device_start(ch->cdev, &ch->ccw[0],
421
- (unsigned long)ch, 0xff, 0);
419
+ rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
422420 if (rc != 0)
423421 ctcm_ccw_check_rc(ch, rc, "normal RX");
424422 }
....@@ -478,8 +476,7 @@
478476
479477 fsm_newstate(fi, (CHANNEL_DIRECTION(ch->flags) == CTCM_READ)
480478 ? CTC_STATE_RXINIT : CTC_STATE_TXINIT);
481
- rc = ccw_device_start(ch->cdev, &ch->ccw[0],
482
- (unsigned long)ch, 0xff, 0);
479
+ rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
483480 if (rc != 0) {
484481 fsm_deltimer(&ch->timer);
485482 fsm_newstate(fi, CTC_STATE_SETUPWAIT);
....@@ -527,8 +524,7 @@
527524 return;
528525 ch->ccw[1].count = ch->max_bufsize;
529526 fsm_newstate(fi, CTC_STATE_RXIDLE);
530
- rc = ccw_device_start(ch->cdev, &ch->ccw[0],
531
- (unsigned long)ch, 0xff, 0);
527
+ rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
532528 if (rc != 0) {
533529 fsm_newstate(fi, CTC_STATE_RXINIT);
534530 ctcm_ccw_check_rc(ch, rc, "initial RX");
....@@ -571,8 +567,7 @@
571567 /* Such conditional locking is undeterministic in
572568 * static view. => ignore sparse warnings here. */
573569
574
- rc = ccw_device_start(ch->cdev, &ch->ccw[6],
575
- (unsigned long)ch, 0xff, 0);
570
+ rc = ccw_device_start(ch->cdev, &ch->ccw[6], 0, 0xff, 0);
576571 if (event == CTC_EVENT_TIMER) /* see above comments */
577572 spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
578573 if (rc != 0) {
....@@ -637,7 +632,7 @@
637632 fsm_newstate(fi, CTC_STATE_STARTWAIT);
638633 fsm_addtimer(&ch->timer, 1000, CTC_EVENT_TIMER, ch);
639634 spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
640
- rc = ccw_device_halt(ch->cdev, (unsigned long)ch);
635
+ rc = ccw_device_halt(ch->cdev, 0);
641636 spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
642637 if (rc != 0) {
643638 if (rc != -EBUSY)
....@@ -672,7 +667,7 @@
672667 * static view. => ignore sparse warnings here. */
673668 oldstate = fsm_getstate(fi);
674669 fsm_newstate(fi, CTC_STATE_TERM);
675
- rc = ccw_device_halt(ch->cdev, (unsigned long)ch);
670
+ rc = ccw_device_halt(ch->cdev, 0);
676671
677672 if (event == CTC_EVENT_STOP)
678673 spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
....@@ -799,7 +794,7 @@
799794 fsm_addtimer(&ch->timer, CTCM_TIME_5_SEC, CTC_EVENT_TIMER, ch);
800795 if (!IS_MPC(ch) &&
801796 (CHANNEL_DIRECTION(ch->flags) == CTCM_READ)) {
802
- int rc = ccw_device_halt(ch->cdev, (unsigned long)ch);
797
+ int rc = ccw_device_halt(ch->cdev, 0);
803798 if (rc != 0)
804799 ctcm_ccw_check_rc(ch, rc,
805800 "HaltIO in chx_setuperr");
....@@ -851,7 +846,7 @@
851846 /* Such conditional locking is a known problem for
852847 * sparse because its undeterministic in static view.
853848 * Warnings should be ignored here. */
854
- rc = ccw_device_halt(ch->cdev, (unsigned long)ch);
849
+ rc = ccw_device_halt(ch->cdev, 0);
855850 if (event == CTC_EVENT_TIMER)
856851 spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags);
857852 if (rc != 0) {
....@@ -947,8 +942,8 @@
947942 ch2 = priv->channel[CTCM_WRITE];
948943 fsm_newstate(ch2->fsm, CTC_STATE_DTERM);
949944
950
- ccw_device_halt(ch->cdev, (unsigned long)ch);
951
- ccw_device_halt(ch2->cdev, (unsigned long)ch2);
945
+ ccw_device_halt(ch->cdev, 0);
946
+ ccw_device_halt(ch2->cdev, 0);
952947 }
953948
954949 /**
....@@ -1041,8 +1036,7 @@
10411036 ctcmpc_dumpit((char *)&ch->ccw[3],
10421037 sizeof(struct ccw1) * 3);
10431038
1044
- rc = ccw_device_start(ch->cdev, &ch->ccw[3],
1045
- (unsigned long)ch, 0xff, 0);
1039
+ rc = ccw_device_start(ch->cdev, &ch->ccw[3], 0, 0xff, 0);
10461040 if (event == CTC_EVENT_TIMER)
10471041 spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev),
10481042 saveflags);
....@@ -1361,8 +1355,7 @@
13611355 ch->prof.send_stamp = jiffies;
13621356 if (do_debug_ccw)
13631357 ctcmpc_dumpit((char *)&ch->ccw[0], sizeof(struct ccw1) * 3);
1364
- rc = ccw_device_start(ch->cdev, &ch->ccw[0],
1365
- (unsigned long)ch, 0xff, 0);
1358
+ rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
13661359 ch->prof.doios_multi++;
13671360 if (rc != 0) {
13681361 priv->stats.tx_dropped += i;
....@@ -1462,8 +1455,7 @@
14621455 if (dolock)
14631456 spin_lock_irqsave(
14641457 get_ccwdev_lock(ch->cdev), saveflags);
1465
- rc = ccw_device_start(ch->cdev, &ch->ccw[0],
1466
- (unsigned long)ch, 0xff, 0);
1458
+ rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
14671459 if (dolock) /* see remark about conditional locking */
14681460 spin_unlock_irqrestore(
14691461 get_ccwdev_lock(ch->cdev), saveflags);
....@@ -1569,8 +1561,7 @@
15691561 if (event == CTC_EVENT_START)
15701562 /* see remark about conditional locking */
15711563 spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
1572
- rc = ccw_device_start(ch->cdev, &ch->ccw[0],
1573
- (unsigned long)ch, 0xff, 0);
1564
+ rc = ccw_device_start(ch->cdev, &ch->ccw[0], 0, 0xff, 0);
15741565 if (event == CTC_EVENT_START)
15751566 spin_unlock_irqrestore(
15761567 get_ccwdev_lock(ch->cdev), saveflags);
....@@ -1704,6 +1695,7 @@
17041695 grp->changed_side = 2;
17051696 break;
17061697 }
1698
+ fallthrough;
17071699 case MPCG_STATE_XID0IOWAIX:
17081700 case MPCG_STATE_XID7INITW:
17091701 case MPCG_STATE_XID7INITX:
....@@ -1824,8 +1816,7 @@
18241816
18251817 spin_lock_irqsave(get_ccwdev_lock(wch->cdev), saveflags);
18261818 wch->prof.send_stamp = jiffies;
1827
- rc = ccw_device_start(wch->cdev, &wch->ccw[3],
1828
- (unsigned long) wch, 0xff, 0);
1819
+ rc = ccw_device_start(wch->cdev, &wch->ccw[3], 0, 0xff, 0);
18291820 spin_unlock_irqrestore(get_ccwdev_lock(wch->cdev), saveflags);
18301821
18311822 if ((grp->sweep_req_pend_num == 0) &&