Commit f7ec2d2a authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

s390/qeth: clean up a magic number in the OAT callback

Use the correct struct member instead of hardcoding its offset.
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2ccd31f8
...@@ -4839,7 +4839,6 @@ static int qeth_setadpparms_query_oat_cb(struct qeth_card *card, ...@@ -4839,7 +4839,6 @@ static int qeth_setadpparms_query_oat_cb(struct qeth_card *card,
{ {
struct qeth_ipa_cmd *cmd = (struct qeth_ipa_cmd *)data; struct qeth_ipa_cmd *cmd = (struct qeth_ipa_cmd *)data;
struct qeth_qoat_priv *priv; struct qeth_qoat_priv *priv;
char *resdata;
int resdatalen; int resdatalen;
QETH_CARD_TEXT(card, 3, "qoatcb"); QETH_CARD_TEXT(card, 3, "qoatcb");
...@@ -4848,13 +4847,12 @@ static int qeth_setadpparms_query_oat_cb(struct qeth_card *card, ...@@ -4848,13 +4847,12 @@ static int qeth_setadpparms_query_oat_cb(struct qeth_card *card,
priv = (struct qeth_qoat_priv *)reply->param; priv = (struct qeth_qoat_priv *)reply->param;
resdatalen = cmd->data.setadapterparms.hdr.cmdlength; resdatalen = cmd->data.setadapterparms.hdr.cmdlength;
resdata = (char *)data + 28;
if (resdatalen > (priv->buffer_len - priv->response_len)) if (resdatalen > (priv->buffer_len - priv->response_len))
return -ENOSPC; return -ENOSPC;
memcpy((priv->buffer + priv->response_len), resdata, memcpy(priv->buffer + priv->response_len,
resdatalen); &cmd->data.setadapterparms.hdr, resdatalen);
priv->response_len += resdatalen; priv->response_len += resdatalen;
if (cmd->data.setadapterparms.hdr.seq_no < if (cmd->data.setadapterparms.hdr.seq_no <
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment