Skip to content

Commit ff2aed7

Browse files
braunudavem330
authored andcommitted
ctcm: get rid of compile warning
-Wunused-but-set-variable generates compile warnings. The affected variables are removed. Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: Frank Blaschka <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 424f73b commit ff2aed7

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

drivers/s390/net/ctcm_main.c

-2
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,6 @@ static int ctcmpc_transmit_skb(struct channel *ch, struct sk_buff *skb)
672672
int ccw_idx;
673673
unsigned long hi;
674674
unsigned long saveflags = 0; /* avoids compiler warning */
675-
__u16 block_len;
676675

677676
CTCM_PR_DEBUG("Enter %s: %s, cp=%i ch=0x%p id=%s state=%s\n",
678677
__func__, dev->name, smp_processor_id(), ch,
@@ -719,7 +718,6 @@ static int ctcmpc_transmit_skb(struct channel *ch, struct sk_buff *skb)
719718
*/
720719
atomic_inc(&skb->users);
721720

722-
block_len = skb->len + TH_HEADER_LENGTH + PDU_HEADER_LENGTH;
723721
/*
724722
* IDAL support in CTCM is broken, so we have to
725723
* care about skb's above 2G ourselves.

drivers/s390/net/ctcm_mpc.c

+4-9
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,6 @@ static void ctcmpc_send_sweep_resp(struct channel *rch)
653653
struct net_device *dev = rch->netdev;
654654
struct ctcm_priv *priv = dev->ml_priv;
655655
struct mpc_group *grp = priv->mpcg;
656-
int rc = 0;
657656
struct th_sweep *header;
658657
struct sk_buff *sweep_skb;
659658
struct channel *ch = priv->channel[CTCM_WRITE];
@@ -665,16 +664,14 @@ static void ctcmpc_send_sweep_resp(struct channel *rch)
665664
CTCM_DBF_TEXT_(MPC_ERROR, CTC_DBF_ERROR,
666665
"%s(%s): sweep_skb allocation ERROR\n",
667666
CTCM_FUNTAIL, rch->id);
668-
rc = -ENOMEM;
669-
goto done;
667+
goto done;
670668
}
671669

672670
header = kmalloc(sizeof(struct th_sweep), gfp_type());
673671

674672
if (!header) {
675673
dev_kfree_skb_any(sweep_skb);
676-
rc = -ENOMEM;
677-
goto done;
674+
goto done;
678675
}
679676

680677
header->th.th_seg = 0x00 ;
@@ -1370,8 +1367,7 @@ static void mpc_action_go_inop(fsm_instance *fi, int event, void *arg)
13701367
struct net_device *dev = arg;
13711368
struct ctcm_priv *priv;
13721369
struct mpc_group *grp;
1373-
int rc = 0;
1374-
struct channel *wch, *rch;
1370+
struct channel *wch;
13751371

13761372
BUG_ON(dev == NULL);
13771373
CTCM_PR_DEBUG("Enter %s: %s\n", __func__, dev->name);
@@ -1396,7 +1392,6 @@ static void mpc_action_go_inop(fsm_instance *fi, int event, void *arg)
13961392
fsm_deltimer(&priv->restart_timer);
13971393

13981394
wch = priv->channel[CTCM_WRITE];
1399-
rch = priv->channel[CTCM_READ];
14001395

14011396
switch (grp->saved_state) {
14021397
case MPCG_STATE_RESET:
@@ -1435,7 +1430,7 @@ static void mpc_action_go_inop(fsm_instance *fi, int event, void *arg)
14351430

14361431
if (grp->send_qllc_disc == 1) {
14371432
grp->send_qllc_disc = 0;
1438-
rc = mpc_send_qllc_discontact(dev);
1433+
mpc_send_qllc_discontact(dev);
14391434
}
14401435

14411436
/* DO NOT issue DEV_EVENT_STOP directly out of this code */

0 commit comments

Comments
 (0)