From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75546C4332F for ; Thu, 15 Dec 2022 22:21:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229678AbiLOWVD convert rfc822-to-8bit (ORCPT ); Thu, 15 Dec 2022 17:21:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiLOWVC (ORCPT ); Thu, 15 Dec 2022 17:21:02 -0500 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8926140D2 for ; Thu, 15 Dec 2022 14:21:00 -0800 (PST) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-82-GnYbIbJHMruV7_PN1JoaEQ-1; Thu, 15 Dec 2022 22:20:57 +0000 X-MC-Unique: GnYbIbJHMruV7_PN1JoaEQ-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 15 Dec 2022 22:20:55 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.044; Thu, 15 Dec 2022 22:20:55 +0000 From: David Laight To: 'Arnd Bergmann' , Bernard Metzler , Jason Gunthorpe , Leon Romanovsky , "Linus Walleij" CC: Arnd Bergmann , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] RDMA/siw: fix pointer cast warning Thread-Topic: [PATCH] RDMA/siw: fix pointer cast warning Thread-Index: AQHZEKfEZmHYt+KmU0GxS8VCrAg8Pq5vhR6A Date: Thu, 15 Dec 2022 22:20:55 +0000 Message-ID: <1bba42a31e0a487bbbf67955b674583e@AcuMS.aculab.com> References: <20221215170347.2612403-1-arnd@kernel.org> In-Reply-To: <20221215170347.2612403-1-arnd@kernel.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Arnd Bergmann > Sent: 15 December 2022 17:04 > > From: Arnd Bergmann > > The previous build fix left a remaining issue in configurations > with 64-bit dma_addr_t on 32-bit architectures: > > drivers/infiniband/sw/siw/siw_qp_tx.c: In function 'siw_get_pblpage': > drivers/infiniband/sw/siw/siw_qp_tx.c:32:37: error: cast to pointer from integer of different size [- > Werror=int-to-pointer-cast] > 32 | return virt_to_page((void *)paddr); > | ^ > > Use the same double cast here that the driver uses elsewhere > to convert between dma_addr_t and void*. > > It took me a while to figure out why this driver does it > like this, as there is no hardware access and it just stores > kernel pointers in place of device addresses when communicating > with the rdma core and with user space. I hope that doesn't mean it is relying on user space only giving it back valid values? David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)