From patchwork Tue May 26 13:01:09 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: 1298019 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 49WYzv3TRLz9sT0; Tue, 26 May 2020 23:03:23 +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 1jdZEi-0005q6-RJ; Tue, 26 May 2020 13:03:16 +0000 Received: from mail-pl1-f194.google.com ([209.85.214.194]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jdZDp-0005Fs-Uu for kernel-team@lists.ubuntu.com; Tue, 26 May 2020 13:02:22 +0000 Received: by mail-pl1-f194.google.com with SMTP id m7so8667839plt.5 for ; Tue, 26 May 2020 06:02:21 -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=YYOGazP/Q+nS24fgSkY5GG/lmOrfEEEOCFhqI8Y9SMI=; b=R6nNanpqwEZwR17L/3IssDlaOeOoTgQKuGfhAxBGc9zIHWbLYBeV8VHRW62Q6anI1A c5kuuExk6gjrUl6wp0i5nIDzh84v3faVL9GaGhe3B8r6K6A7OeNqh+8woAQI5KPX/c0S 0E8CkvfCoYRtm2cTdfXyLn1a0rYD+tNg/ihvfypXGwwGhJCzWwX16Mvh/oG6uQXmA7b6 YjJVNenc2kguOHlZO1v0h5vPPHJHdfksn8LQrS898TExG3Sf7H3n+6VbnkVzGqezfNwn Z9H+U+VluEcwyPKsJ57jhrWHq3e89yd1Pn3VrWBSZ/D8/akYfjVA7jiD4K8mYAsDF4ue 21Uw== X-Gm-Message-State: AOAM530K4nIchdoZVXEITyEoSFlWi54HAFdBnViuI3kYCjDkoq7Q5jxU j4otoxYewpnElqeeZPmbYlD8j6917ls= X-Google-Smtp-Source: ABdhPJxdVTg4n498k0bZaKF7B7NXkGWie2kAEPeQSiKePsgKvnnKbHsFFJz0ut90Zr4m5IDch6s87g== X-Received: by 2002:a17:90a:d70a:: with SMTP id y10mr26085492pju.53.1590498139351; Tue, 26 May 2020 06:02:19 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id z18sm15565096pfj.148.2020.05.26.06.02.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 06:02:18 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 05/60][SRU][OEM-5.6] iommu/tegra-gart: Remove direct access of dev->iommu_fwspec Date: Tue, 26 May 2020 21:01:09 +0800 Message-Id: <20200526130204.238445-6-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 Use the accessor functions instead of directly dereferencing dev->iommu_fwspec. Signed-off-by: Joerg Roedel Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20200326150841.10083-5-joro@8bytes.org (cherry picked from commit 8c3d69237eb2cae01a015fefed4b770284e4ebd4) Signed-off-by: You-Sheng Yang --- drivers/iommu/tegra-gart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c index 3fb7ba72507d..db6559e8336f 100644 --- a/drivers/iommu/tegra-gart.c +++ b/drivers/iommu/tegra-gart.c @@ -247,7 +247,7 @@ static int gart_iommu_add_device(struct device *dev) { struct iommu_group *group; - if (!dev->iommu_fwspec) + if (!dev_iommu_fwspec_get(dev)) return -ENODEV; group = iommu_group_get_for_dev(dev);