From patchwork Thu Jan 9 10:53:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Bolle X-Patchwork-Id: 3458441 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B45DFC02DC for ; Thu, 9 Jan 2014 11:08:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A24A32013D for ; Thu, 9 Jan 2014 11:08:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE05120121 for ; Thu, 9 Jan 2014 11:08:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750912AbaAILIs (ORCPT ); Thu, 9 Jan 2014 06:08:48 -0500 Received: from cpsmtpb-ews04.kpnxchange.com ([213.75.39.7]:55268 "EHLO cpsmtpb-ews04.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528AbaAILIk (ORCPT ); Thu, 9 Jan 2014 06:08:40 -0500 X-Greylist: delayed 909 seconds by postgrey-1.27 at vger.kernel.org; Thu, 09 Jan 2014 06:08:40 EST Received: from cpsps-ews23.kpnxchange.com ([10.94.84.189]) by cpsmtpb-ews04.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Thu, 9 Jan 2014 11:53:28 +0100 Received: from CPSMTPM-TLF102.kpnxchange.com ([195.121.3.5]) by cpsps-ews23.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Thu, 9 Jan 2014 11:53:28 +0100 Received: from [192.168.1.111] ([82.169.24.127]) by CPSMTPM-TLF102.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Thu, 9 Jan 2014 11:53:28 +0100 Message-ID: <1389264807.11777.6.camel@x41> Subject: [PATCH] RDMA/cxgb4: silence GCC warning From: Paul Bolle To: Steve Wise , Roland Dreier , Sean Hefty , Hal Rosenstock Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 09 Jan 2014 11:53:27 +0100 X-Mailer: Evolution 3.10.3 (3.10.3-1.fc20) Mime-Version: 1.0 X-OriginalArrivalTime: 09 Jan 2014 10:53:28.0447 (UTC) FILETIME=[074EF8F0:01CF0D29] X-RcptDomain: vger.kernel.org Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Building mem.o for 32 bits x86 triggers a GCC warning: drivers/infiniband/hw/cxgb4/mem.c: In function '_c4iw_write_mem_dma_aligned': drivers/infiniband/hw/cxgb4/mem.c:79:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Silence that warning by casting "&wr_wait" to unsigned long before casting it to __be64. That's what _c4iw_write_mem_inline() already does. Signed-off-by: Paul Bolle Acked-by: Steve Wise --- 0) Compile tested only (on 32 bit x86): I do not have this hardware. 1) This warning was introduced in v3.10-rc1, through commit 42b6a949903d ("RDMA/cxgb4: Use DSGLs for fastreg and adapter memory writes for T5."). drivers/infiniband/hw/cxgb4/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c index 84e4500..41b1195 100644 --- a/drivers/infiniband/hw/cxgb4/mem.c +++ b/drivers/infiniband/hw/cxgb4/mem.c @@ -76,7 +76,7 @@ static int _c4iw_write_mem_dma_aligned(struct c4iw_rdev *rdev, u32 addr, INIT_ULPTX_WR(req, wr_len, 0, 0); req->wr.wr_hi = cpu_to_be32(FW_WR_OP(FW_ULPTX_WR) | (wait ? FW_WR_COMPL(1) : 0)); - req->wr.wr_lo = wait ? (__force __be64)&wr_wait : 0; + req->wr.wr_lo = wait ? (__force __be64)(unsigned long) &wr_wait : 0L; req->wr.wr_mid = cpu_to_be32(FW_WR_LEN16(DIV_ROUND_UP(wr_len, 16))); req->cmd = cpu_to_be32(ULPTX_CMD(ULP_TX_MEM_WRITE)); req->cmd |= cpu_to_be32(V_T5_ULP_MEMIO_ORDER(1));