From: Julian Wiedmann Date: Tue, 14 Jul 2020 14:23:02 +0000 (+0200) Subject: s390/qeth: clean up a magic number in the OAT callback X-Git-Tag: v5.10.7~1943^2~253^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7ec2d2a920edf6a5ffba21ce57181429cfc68b0;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 31fa9ff..c5ff7ed 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 <