diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2020-07-14 16:23:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-14 14:53:45 -0700 |
commit | f7ec2d2a920edf6a5ffba21ce57181429cfc68b0 (patch) | |
tree | 2d507b193c6945025e711ccac3292eacb85bdb92 | |
parent | 2ccd31f8c28fb8e99eb4a70d2d06f5d61ee2c6ab (diff) |
s390/qeth: clean up a magic number in the OAT callback
Use the correct struct member instead of hardcoding its offset.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 31fa9ffc7cf4..c5ff7edb4ba1 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -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_qoat_priv *priv; - char *resdata; int resdatalen; QETH_CARD_TEXT(card, 3, "qoatcb"); @@ -4848,13 +4847,12 @@ static int qeth_setadpparms_query_oat_cb(struct qeth_card *card, priv = (struct qeth_qoat_priv *)reply->param; resdatalen = cmd->data.setadapterparms.hdr.cmdlength; - resdata = (char *)data + 28; if (resdatalen > (priv->buffer_len - priv->response_len)) return -ENOSPC; - memcpy((priv->buffer + priv->response_len), resdata, - resdatalen); + memcpy(priv->buffer + priv->response_len, + &cmd->data.setadapterparms.hdr, resdatalen); priv->response_len += resdatalen; if (cmd->data.setadapterparms.hdr.seq_no < |