From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934932AbeB1VPV (ORCPT ); Wed, 28 Feb 2018 16:15:21 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:45037 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933901AbeB1VPT (ORCPT ); Wed, 28 Feb 2018 16:15:19 -0500 X-Google-Smtp-Source: AG47ELt+vWb1HkShzQzV1VExaqHF6o7HMWpbIleE++/+w88RSA+w2CtspSwAAB8D6aZH45iaVb/uyA== Date: Wed, 28 Feb 2018 14:15:14 -0700 From: Jason Gunthorpe To: Arnd Bergmann Cc: Selvin Xavier , Devesh Sharma , Somnath Kotur , Sriharsha Basavapatna , Doug Ledford , Bart Van Assche , Eddie Wai , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] infiniband: qplib_fp: fix pointer cast Message-ID: <20180228211514.GC13394@ziepe.ca> References: <20180220205638.1959033-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180220205638.1959033-1-arnd@arndb.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 20, 2018 at 09:56:26PM +0100, Arnd Bergmann wrote: > Building for a 32-bit target results in a couple of warnings from casting between > a 32-bit pointer and a 64-bit integer: > > drivers/infiniband/hw/bnxt_re/qplib_fp.c: In function 'bnxt_qplib_service_nq': > drivers/infiniband/hw/bnxt_re/qplib_fp.c:333:23: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > bnxt_qplib_arm_srq((struct bnxt_qplib_srq *)q_handle, > ^ > drivers/infiniband/hw/bnxt_re/qplib_fp.c:336:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] > (struct bnxt_qplib_srq *)q_handle, > ^ > In file included from include/linux/byteorder/little_endian.h:5, > from arch/arm/include/uapi/asm/byteorder.h:22, > from include/asm-generic/bitops/le.h:6, > from arch/arm/include/asm/bitops.h:342, > from include/linux/bitops.h:38, > from include/linux/kernel.h:11, > from include/linux/interrupt.h:6, > from drivers/infiniband/hw/bnxt_re/qplib_fp.c:39: > drivers/infiniband/hw/bnxt_re/qplib_fp.c: In function 'bnxt_qplib_create_srq': > include/uapi/linux/byteorder/little_endian.h:31:43: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] > #define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) > ^ > include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' > #define cpu_to_le64 __cpu_to_le64 > ^~~~~~~~~~~~~ > drivers/infiniband/hw/bnxt_re/qplib_fp.c:569:19: note: in expansion of macro 'cpu_to_le64' > req.srq_handle = cpu_to_le64(srq); > > Using a uintptr_t as an intermediate works on all architectures. > > Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") > Signed-off-by: Arnd Bergmann > drivers/infiniband/hw/bnxt_re/qplib_fp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) I applied the series to for-next, thanks Jason