s390/qeth: remove extra L3 adapterparms query
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>
Tue, 15 Aug 2017 15:02:41 +0000 (17:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Aug 2017 17:58:39 +0000 (10:58 -0700)
qeth_l3_setadapter_parms() queries the device for supported
adapterparms, even though they already have been queried as part of the
device's high-level setup. Remove that extra call.

The only call chain for qeth_l3_setadapter_parms() is
__qeth_l3_set_online()
qeth_core_hardsetup_card()
qeth_query_setadapterparms()
qeth_l3_setadapter_parms()
qeth_query_setadapterparms()

, and we only reach qeth_l3_setadapter_parms() if the first
adapterparms query succeeds. Hence removing the second query results in
no loss of functionality.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_l3_main.c

index 6648f02d61ea88f00c47d7ede816389968f82415..13124e6fd9d3ba035a3db2ea2ff77c057ffdc616 100644 (file)
@@ -890,22 +890,10 @@ static inline u8 qeth_l3_get_qeth_hdr_flags6(int cast_type)
 
 static int qeth_l3_setadapter_parms(struct qeth_card *card)
 {
-       int rc;
+       int rc = 0;
 
        QETH_DBF_TEXT(SETUP, 2, "setadprm");
 
-       if (!qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
-               dev_info(&card->gdev->dev,
-                       "set adapter parameters not supported.\n");
-               QETH_DBF_TEXT(SETUP, 2, " notsupp");
-               return 0;
-       }
-       rc = qeth_query_setadapterparms(card);
-       if (rc) {
-               QETH_DBF_MESSAGE(2, "%s couldn't set adapter parameters: "
-                       "0x%x\n", dev_name(&card->gdev->dev), rc);
-               return rc;
-       }
        if (qeth_adp_supported(card, IPA_SETADP_ALTER_MAC_ADDRESS)) {
                rc = qeth_setadpparms_change_macaddr(card);
                if (rc)