diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2020-07-14 16:23:01 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-14 14:53:45 -0700 |
commit | 2ccd31f8c28fb8e99eb4a70d2d06f5d61ee2c6ab (patch) | |
tree | f98a95250bea9321e37aa061749f43a0cbb95625 | |
parent | 65878fd95261d3a831e085e2c6f1e8a6d7979b14 (diff) |
s390/qeth: use u64_to_user_ptr() in the OAT code
Use the correct helper for casting to a user pointer.
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 bd6489d87ede..31fa9ffc7cf4 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -4907,10 +4907,8 @@ static int qeth_query_oat_command(struct qeth_card *card, char __user *udata) rc = qeth_send_ipa_cmd(card, iob, qeth_setadpparms_query_oat_cb, &priv); if (!rc) { - if (is_compat_task()) - tmp = compat_ptr(oat_data.ptr); - else - tmp = (void __user *)(unsigned long)oat_data.ptr; + tmp = is_compat_task() ? compat_ptr(oat_data.ptr) : + u64_to_user_ptr(oat_data.ptr); if (copy_to_user(tmp, priv.buffer, priv.response_len)) { |