]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
s390/qeth: use u64_to_user_ptr() in the OAT code
authorJulian Wiedmann <jwi@linux.ibm.com>
Tue, 14 Jul 2020 14:23:01 +0000 (16:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Jul 2020 21:53:45 +0000 (14:53 -0700)
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>
drivers/s390/net/qeth_core_main.c

index bd6489d87ede01ef44e031979bc5e3bee0b7e733..31fa9ffc7cf4ec3b998566944967cba3d36a787b 100644 (file)
@@ -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)) {