From patchwork Tue May 26 13:01:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1298037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49WZ1C4z7Dz9sSt; Tue, 26 May 2020 23:04:31 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jdZFp-0006gX-7M; Tue, 26 May 2020 13:04:25 +0000 Received: from mail-pg1-f194.google.com ([209.85.215.194]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jdZEc-0005ka-O2 for kernel-team@lists.ubuntu.com; Tue, 26 May 2020 13:03:10 +0000 Received: by mail-pg1-f194.google.com with SMTP id 185so1831286pgb.10 for ; Tue, 26 May 2020 06:03:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ydrgVy5iYQVogbYShf1rFHptiigLMFAKICTi1BudPWU=; b=YjPtlw6k8Wov1JN6TeHklGW0TTa79uiw2/7rkPmz7zcGsmUR20ncPktU/GGUL/PGoi 44Gqs5sSc0bfjh287a0wD1DluzU6lB1uAHnqkdCLPUpk9BUgj9sIwZeDlmgpWfAlirHp vdJuCEhJfnnxT9Quqe3WrzswJBXOZ1MfbY/yeaD5QITLfqV6Hk5tBtoBTvtWO2KeZQoh CLSsP8cWAlHFrEVBQ1b+XRxxdlZzcLd8AY/iRvj0Et3k8Nuv4iYnKGvTEfJ03+dSDSVr YDVJlrtST8hXwz93a/yM7RhairpkZynsd+eGLz/UR4BFNnyB74cpIhsgj6f9JautwhBZ DyhA== X-Gm-Message-State: AOAM530yfGviveVCOw07vau6oPq2KMwhaRg/Rf4Upw2rjfCxAD971LR/ nECrWT42nK5O3QdHw5okzSyCYSPB1Dw= X-Google-Smtp-Source: ABdhPJxDuz9ZXGRoLE6u/25IdeviLnf6vGGgNrKCZuBs42/Lg0e5fnhYu+sqBQyh3yxZARfMLIyUug== X-Received: by 2002:a63:f14a:: with SMTP id o10mr1019574pgk.216.1590498186513; Tue, 26 May 2020 06:03:06 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id o201sm16714110pfd.115.2020.05.26.06.03.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 06:03:05 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 23/60][SRU][OEM-5.6] UBUNTU: SAUCE: iommu/amd: Remove dma_mask check from check_device() Date: Tue, 26 May 2020 21:01:27 +0800 Message-Id: <20200526130204.238445-24-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200526130204.238445-1-vicamo.yang@canonical.com> References: <20200526130204.238445-1-vicamo.yang@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Joerg Roedel BugLink: https://bugs.launchpad.net/bugs/1876707 The check was only needed for the DMA-API implementation in the AMD IOMMU driver, which no longer exists. Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20200429133712.31431-6-joro@8bytes.org Signed-off-by: Joerg Roedel (cherry picked from commit c0da9b9f5afdb56ae2aaccf79f36a358ac8454c8 iommu/next) Signed-off-by: You-Sheng Yang --- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 76d349cc11ed..905f4570b279 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -348,7 +348,7 @@ static bool check_device(struct device *dev) { int devid; - if (!dev || !dev->dma_mask) + if (!dev) return false; devid = get_device_id(dev);