Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1503853rwb; Sun, 18 Sep 2022 08:30:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4h0EZdDiW+9n8qWEki3+PioU/BcWuMnxRngZ5AbcFAmLTu3qWVO2CPKfKwY8U6v1yOPuIT X-Received: by 2002:a50:d696:0:b0:453:eecf:d686 with SMTP id r22-20020a50d696000000b00453eecfd686mr2091652edi.349.1663515054756; Sun, 18 Sep 2022 08:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663515054; cv=none; d=google.com; s=arc-20160816; b=mcw/EAHzViNcd+W0HLIJ3dsOHXdTIIpeTLBaUvb9dC8P+9EMhp5+/uy/JH4v65m4jj n77LoeRrWULLqPRubTBAsrWrNv48+UK/gHa3AsKdpHGUXsNBDdWFN9RRi+xCWCfZ/Q3R i4OqKCeZe/YD5VUc5S4e+ik/Th7wSbEJ/wlXhWxQr9k6hHqYwdJVeiVadNqvwFOJtJPo Fvp93peFxCkihFZpr8NPYlHnQGmCZ5e/62YaHkZDZs4jU6WYDOYnuR06MVvFjQKEyThG 3gQu1I82SvceI7XHYDKn/gWy0mTIpNDq0kfC7NTgyB7NdxIySr5LY1hSj79gNr63v4So drWg== 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=YdfdEKjpvf/n0/5C+OJTZ4gPftWh1t3E7BZU/XgU5qI=; b=inAvFhK13kfASBuRIe9WSBn2beXqCo+2+cE/s+U29XytvxeQ8+NfD6lfmU+KFgguxn lvLpLquTRHpF/gpder2KNi/zqCOfoSiNcBr6/T0QBzVGfCbqy9sUKs3MOLoGZyuqIQiu 2KtTyawl88o1yL/m+1ER9WI3wD+62KNVjUZKiIGd/9kPV+/ntp07hBjOkb0ObVIEMlJ+ M+XY9qyrNWIWfdqr3GMwzcTljlHcZulBRaaS6Ev4BrJaJjmRQ8fEX/uiqe5EpqaY3BqW zu+5WiQ1M1UNa7OQs9Ef8RymF2UJpQfBpiAp1IfUyC6llI/C2ERPpmSAz2FItj5uSoJ+ nzAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DV3lmQEb; 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 l3-20020a1709060e0300b00772fe97b31esi18384610eji.901.2022.09.18.08.30.29; Sun, 18 Sep 2022 08:30:54 -0700 (PDT) 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=DV3lmQEb; 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 S229657AbiIROdu (ORCPT + 99 others); Sun, 18 Sep 2022 10:33:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbiIROdr (ORCPT ); Sun, 18 Sep 2022 10:33:47 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7586E1FCC3 for ; Sun, 18 Sep 2022 07:33:46 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id u9so59168376ejy.5 for ; Sun, 18 Sep 2022 07:33:46 -0700 (PDT) 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; bh=YdfdEKjpvf/n0/5C+OJTZ4gPftWh1t3E7BZU/XgU5qI=; b=DV3lmQEbtVxYC64nZl6YwDfxGmol8kxKwEV4JgyPGVslvMM0vZd6NcJyxRI8K++ou8 bKB0cGNqRf4qoWUfDdAXp/gJE7lJdLDC2teU4INKNGUCvsnwoDRgzG/Yc1yPG3iSl/p8 KIAQKym2j/Vb/LJNcbYLy6idXOzS7EosM4w/0nmiqdIQNdLz7MNquw1THfOYA0ohjAwy dXMYlSPbE8tMzvEqpYqel6fQ88iQJWoFYzi6fBbwgSARrJcws40WKoI89aS2wxBq+2ih micPwtjabhoYXouGfiBU4RlyIFERpDNBbtJHaB0SqJbjPdozY2Lp0Bwu+bNTZdbfGfOM 1ZPg== 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; bh=YdfdEKjpvf/n0/5C+OJTZ4gPftWh1t3E7BZU/XgU5qI=; b=4YY6aYqdgPcDP1AoU9jNv2G/QGESp227EV8Y0V55FbZlh7xGmV1uRlen59WqV4l0ZR vaZbmnWb9l4lUtCS9+XdWfyUZu9NuNf93faodZgnWjhZcJstDHSP+/vbgTMMfERK/7Pq hLZQWecwTiQHdcTi8vrxBgWVp/Mul0EkQ4hvf7DIpM0mQtChBd8TDJdyK0TWgOnO5a/S e4/IdzcKfL4iTQE6QupUKJUCfmmTPVoHL8yRV2sk0laP0EAStezwSDCuTFfCw5WtF2IR 9RmNqEgfJ7c1Hl7eyLoj+DmcDXn/ju0yJRcyi6xrTEQ6sxpyO72tOS/bABFS1gUjXEPX zVMQ== X-Gm-Message-State: ACrzQf1ZheWsB5u3GAEAcutTi8FnqjHxz/NiDrgeRJNiLGuBkfernI/G CKZ4pbOh9y/+B07owvm/0ebCxoy5M5B/SOQzhZ+d9ojPWZXMHg== X-Received: by 2002:a17:907:e9e:b0:77f:9688:2714 with SMTP id ho30-20020a1709070e9e00b0077f96882714mr10055429ejc.208.1663511624980; Sun, 18 Sep 2022 07:33:44 -0700 (PDT) MIME-Version: 1.0 References: <202209170232.grVMomkJ-lkp@intel.com> In-Reply-To: <202209170232.grVMomkJ-lkp@intel.com> From: Linus Walleij Date: Sun, 18 Sep 2022 16:33:33 +0200 Message-ID: Subject: Re: [linux-stable-rc:linux-5.4.y 5364/5387] drivers/infiniband/sw/siw/siw_qp_tx.c:32:37: warning: cast to pointer from integer of different size To: kernel test robot Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Leon Romanovsky , Sasha Levin 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=ham 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 Fri, Sep 16, 2022 at 8:19 PM kernel test robot wrote: > commit: e7f78835d551bb2deb5aa3346d84c8f03ade313d [5364/5387] RDMA/siw: Pass a pointer to virt_to_page() > config: riscv-randconfig-r013-20220916 (https://download.01.org/0day-ci/archive/20220917/202209170232.grVMomkJ-lkp@intel.com/config) > compiler: riscv32-linux-gcc (GCC) 12.1.0 So if RISCV32 ... > 31 if (paddr) > > 32 return virt_to_page((void *)paddr); Think that passing a (void *) to virt_to_page() is a problem: > warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > 32 | return virt_to_page((void *)paddr); I would think this is a problem with RISCV32. What has this arch done? This is a few lines up: > dma_addr_t paddr = siw_pbl_get_buffer(pbl, offset, NULL, idx); dma_addr_t is a different size than (void *)? Given that the patch raising this problem looked like this: - return virt_to_page(paddr); + return virt_to_page((void *)paddr); I doubt that it has created a bug that wasn't there before. Passing a dma_addr_t to virt_to_page() might be wrong, but that is what the driver has been doing all the time. siw_pbl_get_buffer() claims to "Gets physical address backed by PBL element." Why is that even passed to virt_to_page() if it's no virtual address but a dma_addr_t to begin with? I certainly don't understand SIW, but this bug, if it is a bug (or a type and documentation bug) is clearly not new. Yours, Linus Walleij