From owner-svn-src-head@freebsd.org Thu Nov 12 10:12:22 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38EF7A2D0D0; Thu, 12 Nov 2015 10:12:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E206C17C9; Thu, 12 Nov 2015 10:12:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tACACLSM075145; Thu, 12 Nov 2015 10:12:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tACACKTI075143; Thu, 12 Nov 2015 10:12:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511121012.tACACKTI075143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 12 Nov 2015 10:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290711 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 10:12:22 -0000 Author: hselasky Date: Thu Nov 12 10:12:20 2015 New Revision: 290711 URL: https://svnweb.freebsd.org/changeset/base/290711 Log: Fix integer to pointer of different size conversion warnings when using GCC for 32-bit platforms. The integer size in this case is hardcoded 64-bit while the pointer size is 32-bit. Sponsored by: Mellanox Technologies MFC after: 2 weeks Modified: head/sys/ofed/drivers/infiniband/core/uverbs_cmd.c head/sys/ofed/drivers/infiniband/core/uverbs_main.c Modified: head/sys/ofed/drivers/infiniband/core/uverbs_cmd.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Thu Nov 12 09:56:25 2015 (r290710) +++ head/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Thu Nov 12 10:12:20 2015 (r290711) @@ -1379,7 +1379,8 @@ ssize_t ib_uverbs_create_cq(struct ib_uv return -EFAULT; return create_cq(file, buf, in_len, out_len, &cmd, - IB_USER_VERBS_CMD_BASIC, (void __user *)cmd.response); + IB_USER_VERBS_CMD_BASIC, + (void __user *) (unsigned long) cmd.response); } ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file, @@ -1609,7 +1610,7 @@ ssize_t ib_uverbs_create_qp(struct ib_uv if (copy_from_user(&cmd_obj, buf, cmd_size)) return -EFAULT; - response = (void __user *)cmd->response; + response = (void __user *) (unsigned long) cmd->response; if (!disable_raw_qp_enforcement && cmd->qp_type == IB_QPT_RAW_PACKET && !priv_check(curthread, PRIV_NET_RAW)) Modified: head/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/uverbs_main.c Thu Nov 12 09:56:25 2015 (r290710) +++ head/sys/ofed/drivers/infiniband/core/uverbs_main.c Thu Nov 12 10:12:20 2015 (r290711) @@ -81,8 +81,8 @@ static struct ib_udata_ops uverbs_copy_e #define INIT_UDATA_EX(udata, ibuf, obuf, ilen, olen) \ do { \ (udata)->ops = &uverbs_copy_ex; \ - (udata)->inbuf = (void __user *)(ibuf); \ - (udata)->outbuf = (void __user *)(obuf); \ + (udata)->inbuf = (void __user *)(unsigned long)(ibuf); \ + (udata)->outbuf = (void __user *)(unsigned long)(obuf); \ (udata)->inlen = (ilen); \ (udata)->outlen = (olen); \ } while (0)