Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp713488pxv; Thu, 15 Jul 2021 14:12:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF9qqnIoUNeMhbhEMfjnPSpORcbfldYBU/yJRUlg8XICl6q91R+GNQ1CQFRsq8mUiwWNPU X-Received: by 2002:a17:906:c34b:: with SMTP id ci11mr7796972ejb.223.1626383555608; Thu, 15 Jul 2021 14:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383555; cv=none; d=google.com; s=arc-20160816; b=fGrDzSShAZyc9NRl/F0RMY9Kq7Gu5PN4t2r6/g8MTelGF6zscrddLmturvj5FXGkA7 bptVRPWQ7Kk2Rf8N4C8wBhDNvT56L0r627P+Sz4YfL2E7lfJT6lAZ8ZcPgzOHE0uH845 4CnXcSgTvnhtw8MvYITw+Cj6NREC8sbluUR8DYs/+uVelkDnQyv+GWmi1Nh+S6t6CB70 j9m1lqFVQdL7U3Gv7fn3F7N+d7z08aby+xdy3kMzcl3oDYGFB9OlBamRCe2HbD+hIGzV yN2F2w8pi9W8OFsMyTh/cVPdksrDHmCysYkeef3LSCCc7m3dF/15Qf4FI9a+ZD2E5tKM WWHg== 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=J2Ls46cCRwbrBoH7qeLBmwx/I00nZcSBVOtKpXMClSQ=; b=q6b4Qty3S+hvSsRQ8bz5I4TdoVIQ7bZ9jgxS0/WKQF8E2CXBuC8HfgKbOyLmHd/XI0 lAJo+yPsZ+a56foPnVgeZxdZBxPCApjpyBDeHI6eubwVTYEgoizvqfoAfeozzx3RZMUI domVj5Msb41fx60d/qu63nNeSxWWH8XlktZdFg80S8RuJyv6Dhc+JAvsdxEE4sew02wy +W019k963HdEFY1gdQ0gUVw2XYn8ecLdE00m3bwWAotN50JKh9oAOGg+tBn9vYPPbWzs Bt+FoynAR7sbKCaoShJw4QCbNIlozzhyqEz5aO2Qxyr1aAMOLIG4cvWCywKsPtt6CTjf 6R7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="b/hY5G21"; 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 d19si8617449ejy.244.2021.07.15.14.12.12; Thu, 15 Jul 2021 14:12:35 -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="b/hY5G21"; 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 S238637AbhGOTXp (ORCPT + 99 others); Thu, 15 Jul 2021 15:23:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:46430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242439AbhGOTGx (ORCPT ); Thu, 15 Jul 2021 15:06:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFF7C613CF; Thu, 15 Jul 2021 19:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375792; bh=LcNL+hWRmsP7dl5Pm/XW7pnFZsSnmwQz0WjmeYEgdL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b/hY5G21JmxTWZZVCaBGTJniOOzoUOkM5jIrSF/ZbwK7BYR4n7qjgIwn61klI6Ldz EGR1UNWY6Ih23e+qp9n+TVGkugTK2GUaAxz8zhZuugOgQAGFm3rq9npAuCmkveKEdr oNPYs2dpZ1nA9hg0qKdmDhKmT183hUrnz2hkNTE8= 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.12 237/242] drm/ast: Remove reference to struct drm_device.pdev Date: Thu, 15 Jul 2021 20:39:59 +0200 Message-Id: <20210715182634.577299401@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@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 @@ -411,7 +411,6 @@ struct ast_private *ast_device_create(co return ast; dev = &ast->base; - dev->pdev = pdev; pci_set_drvdata(pdev, dev); ast->regs = pcim_iomap(pdev, 1, 0); @@ -453,8 +452,8 @@ struct ast_private *ast_device_create(co /* 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"); }