Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3821807pxp; Tue, 15 Mar 2022 07:01:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoYxoVTJBpa7U09epfSyrlIfzSIvZG0eKhaIRRVVV980g6jW3FvDzwTwfBjWK48jospwOT X-Received: by 2002:a17:907:3ea6:b0:6db:4b61:b46b with SMTP id hs38-20020a1709073ea600b006db4b61b46bmr23677151ejc.402.1647352904903; Tue, 15 Mar 2022 07:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647352904; cv=none; d=google.com; s=arc-20160816; b=mQHdq+Z1MGQ99ol0AGg4iaKfSsQ5svKUnu3/NA0eRpnmUz3DbhmyxEy0ik6P732lS8 cCDVQuq44Up044y0DHWy+bQbO+xIBa9KVCmGPB9oHr9PH84wRX/N63DILUjE6hJHAwi3 PYZFQnPvFC8iZMLsXLBuvTcaATrH6sO0e4AT1D+jCvgOgTxA6HwDCdPCZD8KONfKY2+c XUax8XXbc0Wbu+YqGwuoIUXv5gASITjXjOe1FB+LB9lPV9J87H4AqTx86L9ZdM2oP/bN 9raVdA2LaeCfUJ65V7W/NzzmWQRWlfH41gSMJS+4fmDGgeqctXc8Qc9G/w3yzvNpncbY cb7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B9XApDv/3KkQ0wNGpxgmTHwr61dOOXoGrjdsZc7qRiE=; b=Nth/QdV998OhxQAufIzA6jYjZwzRnFjTAJtAHyPTJgas5rLX1GWN3HJ0qCBPusUhQ+ j9No3FG1ggGbUvDjTdpg74co5DUwKO2ZU1gFOQ7cDkdSp80OCuAwOi+WF+d23YoA5dPy 5eaK+5PEfgET+kCMnFjuajxMtMBNfCjP4iz441AE2P6tplkes1nOhTTf9n3xK8GU0wt9 haG9CYuXZl+AWVdcRMjGqVjtvNcgbe9ZSI2uPQCrwTpwtrECcl8xyVz+JvQ7id3ZDnmk fqdF68OkTuDDqA4t0OPfzaktdcjNbpGHwUbDRhNcBjpqugt5pUoEKL8dMaRUSSnEB0pQ /VkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=k651MXGQ; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020a17090658c300b006d009d84899si12982495ejs.1008.2022.03.15.07.01.18; Tue, 15 Mar 2022 07:01:44 -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=@linuxfoundation.org header.s=korg header.b=k651MXGQ; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241043AbiCNMR0 (ORCPT + 99 others); Mon, 14 Mar 2022 08:17:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241045AbiCNMIR (ORCPT ); Mon, 14 Mar 2022 08:08:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3CB32DABF; Mon, 14 Mar 2022 05:04:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 42C62B80DF0; Mon, 14 Mar 2022 12:04:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47CDFC340E9; Mon, 14 Mar 2022 12:04:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647259459; bh=VOh4WZWDHbvl0DVM0VCouT/2UyXl+kHCC7NlZIFYlBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k651MXGQdYCuKkJSGXEuk9sd6m6DWiHUMxErZ8+TzJ8oTYNieRgtt8fy3W6GF4I1E hT8YjMvqnhePlznDwy3+1/O7rR6LonHupD1ITQy7HTreQJzTYacCJwRE5O8GgbeZ9K /5NHUmKAERQSSyuHPnnEoHuM8+MCZhNcGMEJ6gLk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Dan Carpenter , Xie Yongji , "Michael S. Tsirkin" , Jason Wang , Sasha Levin Subject: [PATCH 5.15 012/110] vduse: Fix returning wrong type in vduse_domain_alloc_iova() Date: Mon, 14 Mar 2022 12:53:14 +0100 Message-Id: <20220314112743.375956292@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112743.029192918@linuxfoundation.org> References: <20220314112743.029192918@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Xie Yongji [ Upstream commit b9d102dafec6af1c07b610faf0a6d4e8aee14ae0 ] This fixes the following smatch warnings: drivers/vdpa/vdpa_user/iova_domain.c:305 vduse_domain_alloc_iova() warn: should 'iova_pfn << shift' be a 64 bit type? Fixes: 8c773d53fb7b ("vduse: Implement an MMU-based software IOTLB") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Xie Yongji Link: https://lore.kernel.org/r/20220121083940.102-1-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: Sasha Levin --- drivers/vdpa/vdpa_user/iova_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_user/iova_domain.c b/drivers/vdpa/vdpa_user/iova_domain.c index 1daae2608860..0678c2514197 100644 --- a/drivers/vdpa/vdpa_user/iova_domain.c +++ b/drivers/vdpa/vdpa_user/iova_domain.c @@ -302,7 +302,7 @@ vduse_domain_alloc_iova(struct iova_domain *iovad, iova_len = roundup_pow_of_two(iova_len); iova_pfn = alloc_iova_fast(iovad, iova_len, limit >> shift, true); - return iova_pfn << shift; + return (dma_addr_t)iova_pfn << shift; } static void vduse_domain_free_iova(struct iova_domain *iovad, -- 2.34.1