qeth: fix some trace formating issues
authorThomas Richter <tmricht@linux.vnet.ibm.com>
Wed, 22 Oct 2014 10:18:03 +0000 (12:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Oct 2014 02:21:39 +0000 (22:21 -0400)
This patch fixes trace formatting issues using the
QETH_CARD_TEXT_ macro. The total size of each trace entry
is 8 bytes. Some of the sprintf formats exceed these 8
bytes (for example using abcd:%d and the converted value
needs more than 3 bytes). The solution is to shorten the
text prepending the value or use a different format (%x).

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c

index 098bb0fff9cb7f8c9a66545b932370e270cedecf..f407e3763432648f3271a80e2d432b7da8736c65 100644 (file)
@@ -4134,7 +4134,7 @@ static int qeth_setadp_promisc_mode_cb(struct qeth_card *card,
 
        qeth_default_setadapterparms_cb(card, reply, (unsigned long)cmd);
        if (cmd->hdr.return_code) {
-               QETH_CARD_TEXT_(card, 4, "prmrc%2.2x", cmd->hdr.return_code);
+               QETH_CARD_TEXT_(card, 4, "prmrc%x", cmd->hdr.return_code);
                setparms->data.mode = SET_PROMISC_MODE_OFF;
        }
        card->info.promisc_mode = setparms->data.mode;
@@ -4501,13 +4501,13 @@ static int qeth_snmp_command_cb(struct qeth_card *card,
        snmp = &cmd->data.setadapterparms.data.snmp;
 
        if (cmd->hdr.return_code) {
-               QETH_CARD_TEXT_(card, 4, "scer1%i", cmd->hdr.return_code);
+               QETH_CARD_TEXT_(card, 4, "scer1%x", cmd->hdr.return_code);
                return 0;
        }
        if (cmd->data.setadapterparms.hdr.return_code) {
                cmd->hdr.return_code =
                        cmd->data.setadapterparms.hdr.return_code;
-               QETH_CARD_TEXT_(card, 4, "scer2%i", cmd->hdr.return_code);
+               QETH_CARD_TEXT_(card, 4, "scer2%x", cmd->hdr.return_code);
                return 0;
        }
        data_len = *((__u16 *)QETH_IPA_PDU_LEN_PDU1(data));
index c2679bfe7f6653ba369b8646eada7e554576768a..d02cd1a679432fc7ef485295d308bac046f96df9 100644 (file)
@@ -1512,7 +1512,7 @@ static void qeth_bridge_state_change(struct qeth_card *card,
 
        QETH_CARD_TEXT(card, 2, "brstchng");
        if (qports->entry_length != sizeof(struct qeth_sbp_port_entry)) {
-               QETH_CARD_TEXT_(card, 2, "BPsz%.8d", qports->entry_length);
+               QETH_CARD_TEXT_(card, 2, "BPsz%04x", qports->entry_length);
                return;
        }
        extrasize = sizeof(struct qeth_sbp_port_entry) * qports->num_entries;
index afebb9709763b0a011320b9ad7e66aa709eca9a3..857a990c74c26f72d3cad4b737f242f2f0ebcbd6 100644 (file)
@@ -2502,7 +2502,7 @@ static int qeth_l3_arp_query(struct qeth_card *card, char __user *udata)
                        rc = -EFAULT;
                        goto free_and_out;
                }
-               QETH_CARD_TEXT_(card, 4, "qacts");
+               QETH_CARD_TEXT(card, 4, "qacts");
        }
 free_and_out:
        kfree(qinfo.udata);