From patchwork Sat Feb 8 19:02:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Engelmayer X-Patchwork-Id: 3613801 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 863849F38E for ; Sun, 9 Feb 2014 17:03:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 037E020138 for ; Sun, 9 Feb 2014 17:03:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8105B2018A for ; Sun, 9 Feb 2014 17:03:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 76A44FA298; Sun, 9 Feb 2014 09:03:24 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 692C4FA3FC for ; Sat, 8 Feb 2014 11:02:26 -0800 (PST) Received: from spike ([81.217.122.98]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MNO33-1WAG9f0itN-006sp9 for ; Sat, 08 Feb 2014 20:02:22 +0100 Date: Sat, 8 Feb 2014 20:02:21 +0100 From: Christian Engelmayer To: Dave Airlie Subject: [PATCH] drm: qxl: Remove unused device pointer Message-ID: <20140208200221.17f35d7d@spike> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.20; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Provags-ID: V03:K0:l9LySHdCCofRwrAF3Oc57Ifh1dOUj8R1DvsF9qwW+3L/kGPQGhv /V4gfYNc4na/HixVNQhXdif+b0WZhO76oYwh0vJfUpiJwe5bkRF+wpd1fLj3f4ZgjGDvGlC KH+kRmEZr4XBwkjbrpcwIQwlW1h00O50GwHdH7wUMXypYYeACdeh5PjcDCFi75aiKEAebbT AEw6NuP7ulDz2G0MzzbUw== X-Mailman-Approved-At: Sun, 09 Feb 2014 09:03:19 -0800 Cc: Alon Levy , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove occurrences of unused struct qxl_device pointer in functions qxl_ttm_fault() and qxl_init_mem_type(). Detected by Coverity: CID 1019128, CID 1019129. Signed-off-by: Christian Engelmayer --- Applies against v3.14-rc1 as well as branch drm-next in tree people.freedesktop.org/~airlied/linux --- drivers/gpu/drm/qxl/qxl_ttm.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index c7e7e65..fb6726d 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -109,13 +109,11 @@ static const struct vm_operations_struct *ttm_vm_ops; static int qxl_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) { struct ttm_buffer_object *bo; - struct qxl_device *qdev; int r; bo = (struct ttm_buffer_object *)vma->vm_private_data; if (bo == NULL) return VM_FAULT_NOPAGE; - qdev = qxl_get_qdev(bo->bdev); r = ttm_vm_ops->fault(vma, vmf); return r; } @@ -162,10 +160,6 @@ static int qxl_invalidate_caches(struct ttm_bo_device *bdev, uint32_t flags) static int qxl_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, struct ttm_mem_type_manager *man) { - struct qxl_device *qdev; - - qdev = qxl_get_qdev(bdev); - switch (type) { case TTM_PL_SYSTEM: /* System memory */