s390: remove unneeded variables
authorPeter Senna Tschudin <peter.senna@gmail.com>
Tue, 4 Aug 2015 15:11:47 +0000 (17:11 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 7 Aug 2015 07:57:01 +0000 (09:57 +0200)
This patch remove unneeded variables used to store return values.

These issues were detected with the Coccinelle script:
scripts/coccinelle/misc/returnvar.cocci

[heiko.carstens@de.ibm.com]: make qeth_l[2/3]_stop() return void

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/eadm_sch.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c

index bee8c11cd08661008815e1bfb5e9c548f4d1f795..b3f44bc7f64489e32c40d76304b7c73b88456bc8 100644 (file)
@@ -336,7 +336,6 @@ static int eadm_subchannel_sch_event(struct subchannel *sch, int process)
 {
        struct eadm_private *private;
        unsigned long flags;
-       int ret = 0;
 
        spin_lock_irqsave(sch->lock, flags);
        if (!device_is_registered(&sch->dev))
@@ -356,7 +355,7 @@ static int eadm_subchannel_sch_event(struct subchannel *sch, int process)
 out_unlock:
        spin_unlock_irqrestore(sch->lock, flags);
 
-       return ret;
+       return 0;
 }
 
 static struct css_device_id eadm_subchannel_ids[] = {
index 2e65b989a9ea529b4e69a555eee2f2fb494c2752..a8556692f632ec3000be0c8d8fd43d3b56396afb 100644 (file)
@@ -390,10 +390,8 @@ static int qeth_l2_vlan_rx_kill_vid(struct net_device *dev,
        return rc;
 }
 
-static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
+static void qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
 {
-       int rc = 0;
-
        QETH_DBF_TEXT(SETUP , 2, "stopcard");
        QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
 
@@ -427,7 +425,6 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
                qeth_clear_cmd_buffers(&card->read);
                qeth_clear_cmd_buffers(&card->write);
        }
-       return rc;
 }
 
 static int qeth_l2_process_inbound_buffer(struct qeth_card *card,
index 70eb2f61bb9269221f4c389838b67bf90fc071ba..a1aaa36e9ebb425d5c45933baa58e40b598a570a 100644 (file)
@@ -2158,10 +2158,8 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev)
        return card ;
 }
 
-static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
+static void qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
 {
-       int rc = 0;
-
        QETH_DBF_TEXT(SETUP, 2, "stopcard");
        QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
 
@@ -2196,7 +2194,6 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
                qeth_clear_cmd_buffers(&card->read);
                qeth_clear_cmd_buffers(&card->write);
        }
-       return rc;
 }
 
 /*