From patchwork Wed May 17 08:15:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archit Taneja X-Patchwork-Id: 9730375 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A806160363 for ; Wed, 17 May 2017 08:15:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9850028713 for ; Wed, 17 May 2017 08:15:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CD5428718; Wed, 17 May 2017 08:15:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 46A8B28713 for ; Wed, 17 May 2017 08:15:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D4E78915F; Wed, 17 May 2017 08:15:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 496448915F for ; Wed, 17 May 2017 08:15:56 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 323B660D2E; Wed, 17 May 2017 08:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1495008956; bh=G2VUxWs1tWkiTnOAVCEewztau0Tz7rQYhiDTIg7RcCc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cTBAMHHQI3JlSYnFuTJ40XTQUUvCklpg1vjzFvkltLgL/MeZV5xFP5Vdr7KD8votU xochQqMECiGBpFfe/RXvMEaMPOhn4jDveg7rdiTckxCGD6IDQbbP2NaCGIUamXvqVW 0V48syNFPafjtAv0IQSqwaEcRc9ScUi9H6kUgxbg= Received: from localhost (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id DD96C60D2E; Wed, 17 May 2017 08:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1495008955; bh=G2VUxWs1tWkiTnOAVCEewztau0Tz7rQYhiDTIg7RcCc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kwugq3mN6caX2p9JpVIhCHjX1LtjlkHowa7jeqGR3P8wsePxNlPQToitf8FiZuj66 a+UMJTxjmmZ/kyf3f+mYmOixkdKJxWCGcgicJiZXVQvUVqV2d/oTj1NvZDRiBlq1pA Dxs4SjVdbVzq+HQ/OE4wO6+lFuez1YkaOXjRYJuo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DD96C60D2E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org From: Archit Taneja To: labbott@redhat.com, sumit.semwal@linaro.org Subject: [PATCH 1/3] staging: android: ion: Remove unused members from ion_buffer Date: Wed, 17 May 2017 13:45:46 +0530 Message-Id: <20170517081548.16413-2-architt@codeaurora.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170517081548.16413-1-architt@codeaurora.org> References: <20170517081548.16413-1-architt@codeaurora.org> Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP A few members in ion_buffer struct are unused after features like page faulting, ion_handle and ion_client were removed. Remove these members and the leftover references to them. Signed-off-by: Archit Taneja --- drivers/staging/android/ion/ion.c | 2 -- drivers/staging/android/ion/ion.h | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 03d3a4fce0e2..90ae6ce466ed 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -115,7 +115,6 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, buffer->dev = dev; buffer->size = len; - INIT_LIST_HEAD(&buffer->vmas); INIT_LIST_HEAD(&buffer->attachments); mutex_init(&buffer->lock); mutex_lock(&dev->buffer_lock); @@ -135,7 +134,6 @@ void ion_buffer_destroy(struct ion_buffer *buffer) if (WARN_ON(buffer->kmap_cnt > 0)) buffer->heap->ops->unmap_kernel(buffer->heap, buffer); buffer->heap->ops->free(buffer); - vfree(buffer->pages); kfree(buffer); } diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h index ace8416bd509..fa9ed81ab972 100644 --- a/drivers/staging/android/ion/ion.h +++ b/drivers/staging/android/ion/ion.h @@ -68,14 +68,6 @@ struct ion_platform_heap { * @kmap_cnt: number of times the buffer is mapped to the kernel * @vaddr: the kernel mapping if kmap_cnt is not zero * @sg_table: the sg table for the buffer if dmap_cnt is not zero - * @pages: flat array of pages in the buffer -- used by fault - * handler and only valid for buffers that are faulted in - * @vmas: list of vma's mapping this buffer - * @handle_count: count of handles referencing this buffer - * @task_comm: taskcomm of last client to reference this buffer in a - * handle, used for debugging - * @pid: pid of last client to reference this buffer in a - * handle, used for debugging */ struct ion_buffer { union { @@ -92,13 +84,7 @@ struct ion_buffer { int kmap_cnt; void *vaddr; struct sg_table *sg_table; - struct page **pages; - struct list_head vmas; struct list_head attachments; - /* used to track orphaned buffers */ - int handle_count; - char task_comm[TASK_COMM_LEN]; - pid_t pid; }; void ion_buffer_destroy(struct ion_buffer *buffer);