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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF170C33CB3 for ; Thu, 30 Jan 2020 18:51:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8DD4B20661 for ; Thu, 30 Jan 2020 18:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580410305; bh=wjHrwicYqiKxKhnPcqpsN8uJBxdY4FcFbXHeQmDRYC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=v73GnlxmM5t9sxlz2nBu6S7L7xzA6d14FwhCRnZ9hk1jekktTnDLBA9/2ehPxv8DX XFdHatPtZA0+/YVdoSUdfXtcMDwFclIFvXsLlV+KxjOsRjfhFkc5xcsF4HpP0dECBW WhIh8xSxecV1cf01tBliWQ5yW/WD+L/kpr3L9ZGQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731599AbgA3Svp (ORCPT ); Thu, 30 Jan 2020 13:51:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:53942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730865AbgA3Son (ORCPT ); Thu, 30 Jan 2020 13:44:43 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CFEC9205F4; Thu, 30 Jan 2020 18:44:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580409882; bh=wjHrwicYqiKxKhnPcqpsN8uJBxdY4FcFbXHeQmDRYC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SZkhov2qu2BuUw2pJFVMk6RHPsQjv6vnEXrsfF5kgGj9snq7HbNRhvHhBz+oqfRwa QUtb0rox9GYQtINTnP7CXF4atxEEQFE9EKECr1fh3yQTFcBUOCjYgtg/GdMIZldYcu y+ZR93C7pBMGP1c3XpKuNPknAHC3yEqq+WP1P7zk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qian Cai , Robin Murphy , Joerg Roedel , Sasha Levin Subject: [PATCH 5.4 070/110] iommu/dma: fix variable cookie set but not used Date: Thu, 30 Jan 2020 19:38:46 +0100 Message-Id: <20200130183622.809411748@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200130183613.810054545@linuxfoundation.org> References: <20200130183613.810054545@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qian Cai [ Upstream commit 55817b340a31951d23d1692db45522560b1d20f9 ] The commit c18647900ec8 ("iommu/dma: Relax locking in iommu_dma_prepare_msi()") introduced a compliation warning, drivers/iommu/dma-iommu.c: In function 'iommu_dma_prepare_msi': drivers/iommu/dma-iommu.c:1206:27: warning: variable 'cookie' set but not used [-Wunused-but-set-variable] struct iommu_dma_cookie *cookie; ^~~~~~ Fixes: c18647900ec8 ("iommu/dma: Relax locking in iommu_dma_prepare_msi()") Signed-off-by: Qian Cai Acked-by: Robin Murphy Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/dma-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 51456e7f264f9..c68a1f072c314 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -1177,7 +1177,6 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr) { struct device *dev = msi_desc_to_dev(desc); struct iommu_domain *domain = iommu_get_domain_for_dev(dev); - struct iommu_dma_cookie *cookie; struct iommu_dma_msi_page *msi_page; static DEFINE_MUTEX(msi_prepare_lock); /* see below */ @@ -1186,8 +1185,6 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr) return 0; } - cookie = domain->iova_cookie; - /* * In fact the whole prepare operation should already be serialised by * irq_domain_mutex further up the callchain, but that's pretty subtle -- 2.20.1