From patchwork Mon Sep 5 21:08:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 9315307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 198386075E for ; Mon, 5 Sep 2016 21:33:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A2EA28886 for ; Mon, 5 Sep 2016 21:33:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F30CF288CF; Mon, 5 Sep 2016 21:33:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9245728886 for ; Mon, 5 Sep 2016 21:33:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754545AbcIEVdC (ORCPT ); Mon, 5 Sep 2016 17:33:02 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:38652 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754240AbcIEVdA (ORCPT ); Mon, 5 Sep 2016 17:33:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=obsidianresearch.com; s=rsa1; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=1e0NIHa3X/w1I7DwDFDB0leSm63O00Lo52wxnTcZXkY=; b=AfW2S9DJWmnmnr9YXLe3hZV+bqJx0coqwnhyCqC/7Lb1dJaHKHd05V89NcDf6i+zuWP9ySAdTgTwKtADVg8wbU1wpSmZE2Hv1f7XOckRHYU7j3XaOhG4MOdf4Pj4GmwZJdqoxU2X+m6vk1Xn7ue18Tn+ScEq9pTpULguXRgCRKQ=; Received: from [10.2.0.6] (helo=wakko.edm.orcorp.ca) by quartz.orcorp.ca with esmtps (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bh18e-0006hD-PN; Mon, 05 Sep 2016 15:09:09 -0600 From: Jason Gunthorpe To: Doug Ledford , linux-rdma@vger.kernel.org Cc: Devesh Sharma , Hal Rosenstock , Mike Marciniszyn , Moni Shoua , Sean Hefty , Steve Wise , Tatyana Nikolova , Vladimir Sokolovsky , Yishai Hadas Subject: [PATCH 28/28] Avoid gcc warning -Wpointer-to-int-cast Date: Mon, 5 Sep 2016 15:08:18 -0600 Message-Id: <1473109698-31408-29-git-send-email-jgunthorpe@obsidianresearch.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473109698-31408-1-git-send-email-jgunthorpe@obsidianresearch.com> References: <1473109698-31408-1-git-send-email-jgunthorpe@obsidianresearch.com> X-Broken-Reverse-DNS: no host name found for IP address 10.2.0.6 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In C99 casting a pointer to an integer should always be done via uintptr_t. When compiling on 32 bit all these sites produce warnings. Signed-off-by: Jason Gunthorpe --- iwpm/src/iwarp_pm_helper.c | 2 +- libhfi1verbs/src/verbs.c | 2 +- libi40iw/src/i40iw_uverbs.c | 2 +- libipathverbs/src/verbs.c | 2 +- librdmacm/src/rsocket.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iwpm/src/iwarp_pm_helper.c b/iwpm/src/iwarp_pm_helper.c index f5c7b96a22e1..89d2b6cef5e6 100644 --- a/iwpm/src/iwarp_pm_helper.c +++ b/iwpm/src/iwarp_pm_helper.c @@ -82,7 +82,7 @@ iwpm_mapping_request *create_iwpm_map_request(struct nlmsghdr *req_nlh, /* assochandle helps match iwpm request sent to remote peer with future iwpm accept/reject */ iwpm_map_req->assochandle = assochandle; if (!assochandle) - iwpm_map_req->assochandle = (__u64)iwpm_map_req; + iwpm_map_req->assochandle = (uintptr_t)iwpm_map_req; memcpy(&iwpm_map_req->src_addr, src_addr, sizeof(struct sockaddr_storage)); /* keep record of remote IP address and port */ diff --git a/libhfi1verbs/src/verbs.c b/libhfi1verbs/src/verbs.c index 854c5676908d..e245ad9e5b4f 100644 --- a/libhfi1verbs/src/verbs.c +++ b/libhfi1verbs/src/verbs.c @@ -607,7 +607,7 @@ int hfi1_modify_srq(struct ibv_srq *ibsrq, (sizeof(struct ibv_sge) * srq->rq.max_sge)) * srq->rq.size; } - cmd.offset_addr = (__u64) &offset; + cmd.offset_addr = (uintptr_t) &offset; ret = ibv_cmd_modify_srq(ibsrq, attr, attr_mask, &cmd.ibv_cmd, sizeof cmd); if (ret) { diff --git a/libi40iw/src/i40iw_uverbs.c b/libi40iw/src/i40iw_uverbs.c index db69b66c1e90..8369e10f61ee 100644 --- a/libi40iw/src/i40iw_uverbs.c +++ b/libi40iw/src/i40iw_uverbs.c @@ -557,7 +557,7 @@ static int i40iw_vmapped_qp(struct i40iw_uqp *iwuqp, struct ibv_pd *pd, return 0; } cmd.user_wqe_buffers = (__u64)((uintptr_t)info->sq); - cmd.user_compl_ctx = (u64)&iwuqp->qp; + cmd.user_compl_ctx = (uintptr_t)&iwuqp->qp; ret = ibv_cmd_create_qp(pd, &iwuqp->ibv_qp, attr, &cmd.ibv_cmd, sizeof(cmd), &resp->ibv_resp, sizeof(struct i40iw_ucreate_qp_resp)); diff --git a/libipathverbs/src/verbs.c b/libipathverbs/src/verbs.c index 17d54cd4026b..578a38af3428 100644 --- a/libipathverbs/src/verbs.c +++ b/libipathverbs/src/verbs.c @@ -583,7 +583,7 @@ int ipath_modify_srq(struct ibv_srq *ibsrq, (sizeof(struct ibv_sge) * srq->rq.max_sge)) * srq->rq.size; } - cmd.offset_addr = (__u64) &offset; + cmd.offset_addr = (uintptr_t) &offset; ret = ibv_cmd_modify_srq(ibsrq, attr, attr_mask, &cmd.ibv_cmd, sizeof cmd); if (ret) { diff --git a/librdmacm/src/rsocket.c b/librdmacm/src/rsocket.c index 5645f40d2460..205101f1702f 100644 --- a/librdmacm/src/rsocket.c +++ b/librdmacm/src/rsocket.c @@ -4290,7 +4290,7 @@ static void tcp_svc_send_keepalive(struct rsocket *rs) if (rs_ctrl_avail(rs) && (rs->state & rs_connected)) { rs->ctrl_seqno++; rs_post_write(rs, NULL, 0, rs_msg_set(RS_OP_CTRL, RS_CTRL_KEEPALIVE), - 0, (uint64_t) NULL, (uint64_t) NULL); + 0, (uintptr_t) NULL, (uintptr_t) NULL); } fastlock_release(&rs->cq_lock); }