From patchwork Mon May 23 18:31:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 809662 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4NIVsok025834 for ; Mon, 23 May 2011 18:31:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756215Ab1EWSbv (ORCPT ); Mon, 23 May 2011 14:31:51 -0400 Received: from na3sys010aog104.obsmtp.com ([74.125.245.76]:49819 "HELO na3sys010aog104.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756143Ab1EWSbv (ORCPT ); Mon, 23 May 2011 14:31:51 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]) (using TLSv1) by na3sys010aob104.postini.com ([74.125.244.12]) with SMTP ID DSNKTdqoFo8B6FNiiX9REU/x+U3rcelpZSPg@postini.com; Mon, 23 May 2011 11:31:51 PDT Received: by pwi15 with SMTP id 15so3403808pwi.5 for ; Mon, 23 May 2011 11:31:50 -0700 (PDT) Received: by 10.142.161.2 with SMTP id j2mr854824wfe.375.1306175510291; Mon, 23 May 2011 11:31:50 -0700 (PDT) Received: from localhost.localdomain ([216.200.155.2]) by mx.google.com with ESMTPS id x11sm6035354wfd.13.2011.05.23.11.31.49 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 May 2011 11:31:49 -0700 (PDT) From: Roland Dreier To: David Dillow Cc: linux-rdma@vger.kernel.org Subject: [PATCH/RFC] IB/srp: Fix integer -> pointer cast warnings Date: Mon, 23 May 2011 11:31:45 -0700 Message-Id: <1306175505-1988-1-git-send-email-roland@kernel.org> X-Mailer: git-send-email 1.7.4.1 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 23 May 2011 18:31:54 +0000 (UTC) From: Roland Dreier Hi Dave, Recently did a 32-bit build and saw this. I assume this patch would be OK with you... -- 8< ---- snip ---- Fix drivers/infiniband/ulp/srp/ib_srp.c: In function 'srp_handle_recv': drivers/infiniband/ulp/srp/ib_srp.c:1150: warning: cast to pointer from integer of different size drivers/infiniband/ulp/srp/ib_srp.c: In function 'srp_send_completion': drivers/infiniband/ulp/srp/ib_srp.c:1234: warning: cast to pointer from integer of different size by adding an intermediate cast to uintptr_t. Signed-off-by: Roland Dreier Acked-by: David Dillow --- drivers/infiniband/ulp/srp/ib_srp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 376d640..ee165fd 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1147,7 +1147,7 @@ static void srp_process_aer_req(struct srp_target_port *target, static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc) { struct ib_device *dev = target->srp_host->srp_dev->dev; - struct srp_iu *iu = (struct srp_iu *) wc->wr_id; + struct srp_iu *iu = (struct srp_iu *) (uintptr_t) wc->wr_id; int res; u8 opcode; @@ -1231,7 +1231,7 @@ static void srp_send_completion(struct ib_cq *cq, void *target_ptr) break; } - iu = (struct srp_iu *) wc.wr_id; + iu = (struct srp_iu *) (uintptr_t) wc.wr_id; list_add(&iu->list, &target->free_tx); } }