Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp635289pxv; Thu, 15 Jul 2021 12:05:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxesu0h4ITf+Uz2syLkzFSLRmTR0vmHx2g2uRLNnkJXeymm/vtq7vYDGCrWpjh1qZL2T/we X-Received: by 2002:a92:b748:: with SMTP id c8mr3697580ilm.302.1626375922453; Thu, 15 Jul 2021 12:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375922; cv=none; d=google.com; s=arc-20160816; b=R8RPAjZtYtSCTFvCqrF1i7j+lyUsjFcujeObymENfqsvwTexPMW2fv4fOAe9cpi+5y x8zD8Ox9LTum8+xnCDSdx9uIsae5rQsRTA3iEyz1P5Iy4etTjMMvPdISleffZ//XxVsm rjXBhumeQ0SwJRNFAi1ndDK38POT/fzd5nQFIhJOKADE3Vorujdttp/VQAmO+oztTr4i 38BpeXp4BN8YyLJmjzXE6/0FvoXSppRin55cJz346xQ2UY7muqVVxPvKV0Yv1/RMd3vo DJBZoGCkfc7ruWlisNOQs0XcZlma2laNrMDdUXOaS8qjxjHuJXL59LRdAEIeC3h9nRM6 BJlA== 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=P+VZyGOFM4yApTaogCpY3EZIKTHnTJsKBHnCLmUMuSk=; b=KCWa74zLcroDdjiRyA1G4IU4oxmTAXzALrfBEpWZhMDZ2gM2quWaVysbaOUoUHB4C0 lZH3FkjHOyKRWXgS0hqALs0Gtvu8ggg9m//7WjaZVol2TsCloTQ0mFN+TNJ2ZewhcFMd CtqZyxFtbroXUyBpZ7H6BowOfj/wqts4//2g5HvcfH3dcVKxjIwKhn4ku73Oo1AH86Gg H2GGMxO6Fad9nVsHbpcbrlCslzps7Qz2sdEYRbeIachBidC+6/U/D5lwEpJHPnMns1Vf sV4Q0A4mNXJwCA08tlGXPg/JFK01d8HIbcWZjnd0YHlxIHjRieKKYX/VbzB2ujL9oh1O ejwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pIy7fBOq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si7111577ile.132.2021.07.15.12.05.09; Thu, 15 Jul 2021 12:05:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pIy7fBOq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S242499AbhGOTGi (ORCPT + 99 others); Thu, 15 Jul 2021 15:06:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:60434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231941AbhGOS4f (ORCPT ); Thu, 15 Jul 2021 14:56:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C37AC613DC; Thu, 15 Jul 2021 18:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375221; bh=RX/kybNc6MpB7HDcu4qTNxYd9qt7Kde2cdPTH4tT+V0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pIy7fBOqqJF17fQVGa0ApxY3Y+RhZOjAhT1b/wkoYZUEwhRGRwz1VpZEEJbS8J82r gdPDnuu7POHjlxe2MSIe51a8yK/wWe+zYZ+Nkhoyp9GmebV7os+yL4/fninUnHuvsG gDwlU6IqgogA6GRXZCAucvbhvHx6dcmqiq3i3oQI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Zimmermann , "Michael J. Ruhl" , KuoHsiang Chou , kernel test robot , Dave Airlie , dri-devel@lists.freedesktop.org Subject: [PATCH 5.10 211/215] drm/ast: Remove reference to struct drm_device.pdev Date: Thu, 15 Jul 2021 20:39:43 +0200 Message-Id: <20210715182636.447666914@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Zimmermann commit 0ecb51824e838372e01330752503ddf9c0430ef7 upstream. Using struct drm_device.pdev is deprecated. Upcast with to_pci_dev() from struct drm_device.dev to get the PCI device structure. v9: * fix remaining pdev references Signed-off-by: Thomas Zimmermann Reviewed-by: Michael J. Ruhl Fixes: ba4e0339a6a3 ("drm/ast: Fixed CVE for DP501") Cc: KuoHsiang Chou Cc: kernel test robot Cc: Thomas Zimmermann Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20210429105101.25667-2-tzimmermann@suse.de Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/ast/ast_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c @@ -406,7 +406,6 @@ struct ast_private *ast_device_create(st return ast; dev = &ast->base; - dev->pdev = pdev; pci_set_drvdata(pdev, dev); ast->regs = pcim_iomap(pdev, 1, 0); @@ -448,8 +447,8 @@ struct ast_private *ast_device_create(st /* map reserved buffer */ ast->dp501_fw_buf = NULL; - if (dev->vram_mm->vram_size < pci_resource_len(dev->pdev, 0)) { - ast->dp501_fw_buf = pci_iomap_range(dev->pdev, 0, dev->vram_mm->vram_size, 0); + if (dev->vram_mm->vram_size < pci_resource_len(pdev, 0)) { + ast->dp501_fw_buf = pci_iomap_range(pdev, 0, dev->vram_mm->vram_size, 0); if (!ast->dp501_fw_buf) drm_info(dev, "failed to map reserved buffer!\n"); }