Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2345800rwb; Fri, 16 Dec 2022 00:19:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf5/6GNjKKnzivobU/I0FzuXb0nfdJxbRS/W9bttiFDq4UEXDvSrRJEsbSkOXghw/OCSQ1QQ X-Received: by 2002:aa7:dbce:0:b0:468:3798:2a83 with SMTP id v14-20020aa7dbce000000b0046837982a83mr25009286edt.17.1671178786172; Fri, 16 Dec 2022 00:19:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671178786; cv=none; d=google.com; s=arc-20160816; b=hRELN2XGpq+q2RLzBIs3yimkaVa3eReqvT9POitw5X57aKF/lqNLZN2KQCCfcKsUCf CmWWdreZN2OBD25RIRsQr/4nMe03Y0J/e240N9x7PZ6GZ8IBS2jFF1pqGhvMTuBB9w6C ojdyXPl5JRHVKou588RecRf0p9toIdTOHBGlv6zn6QuRy5W489mNFKnGLp8Sz7URcCDE pCdTAb1R5NCLDe3oBO9N3Mwpal6xd0myp43ifsYjUYhtdgr+JtjlUaaIzJG5jSSI4Nzb lxzyj7kf+RU/jXXdkjto8Fn+IMF5HbGkPZhv7ynDfAe9TxL+1e1ouXlUsGRsy+ABlFT3 LOgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ARIVIEhVzMm1WujOb1fU30+/MTpfDpTpcOdBHHIxXDk=; b=yPPTLJDrlHG63Ixqp8l6ofe9Xz8Wc1K4s2U2VwHo+o4fDANFIWClDPNLNp6sIucax8 xO8YowBQ+2fdMUpEEzvjOOvLh3ga8nsiPUWfHW/D1lPTtoAPR/peM1ZyFztpKtRvoTf+ fDQkWLXHHnZw+HXfjOhtazBLbjoQc0KcAG+6grNy76m3EnB2ZCYIvOTjjUQa602hdlVL geGQXyPyQVwguEuNCJAxaFAbe1L+dxgEQpexOvaXWGdF1jF5jnhhK5pyZYKaBltuH1jb 9U32jxB4W8PunKv0aXeGA+pZEQ75/4cXzaVcH09GCkaiFEmVFmTb5gBiCuIyhgUUoHKT WVDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z5PSY+rr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o3-20020aa7c503000000b004764be0b8f8si159995edq.424.2022.12.16.00.19.29; Fri, 16 Dec 2022 00:19:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z5PSY+rr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229852AbiLPHqb (ORCPT + 68 others); Fri, 16 Dec 2022 02:46:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbiLPHq2 (ORCPT ); Fri, 16 Dec 2022 02:46:28 -0500 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A473F1A830 for ; Thu, 15 Dec 2022 23:46:27 -0800 (PST) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-40b40ff39f1so22524047b3.10 for ; Thu, 15 Dec 2022 23:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ARIVIEhVzMm1WujOb1fU30+/MTpfDpTpcOdBHHIxXDk=; b=Z5PSY+rr0YZJxo/46BRMCBdB4+s9PPJNaHDSr458cvabhd/8lnV55pEzoVPmA8SnhX 70edyROSqmwWqi0xkou5GKw2I12PGy6+CrstPQ00LQcsLJLV7tqSOnu6fc17gggNY2l3 DX+XP0IImJ8Iaf7zwKbZMBQ82m2WLv1jLwOxCgF5OXHt6+egWBzxB88wxhf08y18dEvd S5+4YXDkf9TKmemBuMSui5mAjqx3XulBR/HwoWjz+kQyyOQZq5ARw3Ys03j0GL+pW6fI lq9uNEZUjqE1p+OmlTyo1rKgDlXERWBfduoYdOscFhvrPzsTpPRfrpliARIg3X1kjxG4 dhqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ARIVIEhVzMm1WujOb1fU30+/MTpfDpTpcOdBHHIxXDk=; b=UtMiFnrqAcN7+biDSVutUoXrD+uph+4d1c8232u0b1MtPUGAj2+2G9icQfBip5rTzf +Oo01HaxiAwZlw1aq87XTsND9ZawEyXQDME3rqLJKIxROTI8xjlX9Wzt/nLZDsv/hL8y RTZV0H6QWfWC3Pz7UszE+Vpfe81ZE0xh16yqIGNArDu3Jna+rbBfPwzqEXb4NbqKpnIK 8OCVuzRXxOEcNhZFbbxkTp2wmaoB0GcoUT8w/DFp7Q7xxR8j5Fy0SKZDywuLOapwqHDv fcTIbz4M/ZoMkMBbnbkQqrG8V0MAamhcjSrWPJrQNApXtQuXiMpYg1fqpHij9fpsvf3F +2XA== X-Gm-Message-State: ANoB5pn14FzzF8HvG7Ty65wxiY5LYl+Sk2owBEgtS8TCgH2ZRAPSUCuD EaYvSKP19Zo4YFmV3jQUWeMHN2BzkT1UK3PkOsvhvA== X-Received: by 2002:a81:6fd5:0:b0:402:3dcf:a262 with SMTP id k204-20020a816fd5000000b004023dcfa262mr6776445ywc.31.1671176786835; Thu, 15 Dec 2022 23:46:26 -0800 (PST) MIME-Version: 1.0 References: <20221215170347.2612403-1-arnd@kernel.org> In-Reply-To: <20221215170347.2612403-1-arnd@kernel.org> From: Linus Walleij Date: Fri, 16 Dec 2022 08:46:16 +0100 Message-ID: Subject: Re: [PATCH] RDMA/siw: fix pointer cast warning To: Arnd Bergmann Cc: Bernard Metzler , Jason Gunthorpe , Leon Romanovsky , Arnd Bergmann , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 15, 2022 at 6:03 PM Arnd Bergmann wrote: > 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. > > Fixes: 0d1b756acf60 ("RDMA/siw: Pass a pointer to virt_to_page()") > Signed-off-by: Arnd Bergmann This driver is a big confusion for me too. Reviewed-by: Linus Walleij Yours, Linus Walleij