From patchwork Tue May 26 12:59:17 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: 1297976 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 49WYwP1kbgz9sTX; Tue, 26 May 2020 23:00:21 +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 1jdZBp-0003hh-3A; Tue, 26 May 2020 13:00:17 +0000 Received: from mail-pg1-f195.google.com ([209.85.215.195]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jdZBm-0003fN-7X for kernel-team@lists.ubuntu.com; Tue, 26 May 2020 13:00:14 +0000 Received: by mail-pg1-f195.google.com with SMTP id s10so10056757pgm.0 for ; Tue, 26 May 2020 06:00:14 -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=itTCzsa9nBGxbjMRHfpFyNwP7uiIfgN/cHxfHdsBqdA=; b=jmYQO9LtJu9nI0YGLLWCY2lamk0B7SK4whLk1cP2W4ANrm7eNMGmHe/YvvWvnWOSjI T04Xj42HnYn3nTVzdb3YcfWCylEGsWjBn4Gtp6Q82FawH240GWnN5KNY/Ad0OJrGwG1N ERUly/oU9DHrHtosh5NOKvCAa9EJLFsFnsorMyywDj0HN+E0ulabwIrNPMR1zUKtMwM8 waS8qMkgn4jEsZI7oe5y73u9RcbE3oQcZfSU3nHfD1mJqRfXrd4UGtpndPIjEdwzI4g+ FHCv9gucmK6TbliZ+RSJJaLzoJHISKHl1mOLCB3LylzeGbmKtY7SFkkiserTsL10WW05 bciA== X-Gm-Message-State: AOAM533pfHbdtPK7vbi3qcPxNgAmPUkFng5By61A3Ry490SJdo4i8KUe bBUushofVNlPeF9JzJJYchFVqM+7BEM= X-Google-Smtp-Source: ABdhPJxKOiBDMlFQXAitgxzHVzw1RyjG7iRVgVaBJR7lHSo8X6DDiBd7vQrQ9VXLCM3MbNHEgTi1Ug== X-Received: by 2002:a65:4607:: with SMTP id v7mr956589pgq.158.1590498012236; Tue, 26 May 2020 06:00:12 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id g18sm15689987pfq.146.2020.05.26.06.00.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 06:00:11 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 05/42][SRU][U] UBUNTU: SAUCE: iommu/amd: Remove dma_mask check from check_device() Date: Tue, 26 May 2020 20:59:17 +0800 Message-Id: <20200526125954.237403-6-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200526125954.237403-1-vicamo.yang@canonical.com> References: <20200526125954.237403-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 ff862d524f79..af9fc3156c64 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);