mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 23:34:05 +08:00
qeth: fix some trace formating issues
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>
This commit is contained in:
parent
bca516502e
commit
8a59314848
@ -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));
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user