mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laura Abbott <labbott@redhat.com>
To: "Sumit Semwal" <sumit.semwal@linaro.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Riley Andrews" <riandrews@android.com>
Cc: Laura Abbott <labbott@redhat.com>,
	linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org,
	devel@driverdev.osuosl.org,
	Android Kernel Team <kernel-team@android.com>
Subject: [RESEND][PATCH 5/5] staging: android: ion: Get rid of ion_reserve
Date: Mon,  8 Aug 2016 09:52:58 -0700	[thread overview]
Message-ID: <1470675178-13052-6-git-send-email-labbott@redhat.com> (raw)
In-Reply-To: <1470675178-13052-1-git-send-email-labbott@redhat.com>


ion_reserve was supposed to be used to reserve memory in board files.
These days, board files are no more and there are other more controlled
mechanisms for reserving memory. Get rid of this function.

Signed-off-by: Laura Abbott <labbott@redhat.com>
---
 drivers/staging/android/ion/ion.c | 34 ----------------------------------
 drivers/staging/android/ion/ion.h | 11 -----------
 2 files changed, 45 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index cd73082..7138a5b 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1650,37 +1650,3 @@ void ion_device_destroy(struct ion_device *dev)
 }
 EXPORT_SYMBOL(ion_device_destroy);
 
-void __init ion_reserve(struct ion_platform_data *data)
-{
-	int i;
-
-	for (i = 0; i < data->nr; i++) {
-		if (data->heaps[i].size == 0)
-			continue;
-
-		if (data->heaps[i].base == 0) {
-			phys_addr_t paddr;
-
-			paddr = memblock_alloc_base(data->heaps[i].size,
-						    data->heaps[i].align,
-						    MEMBLOCK_ALLOC_ANYWHERE);
-			if (!paddr) {
-				pr_err("%s: error allocating memblock for heap %d\n",
-					__func__, i);
-				continue;
-			}
-			data->heaps[i].base = paddr;
-		} else {
-			int ret = memblock_reserve(data->heaps[i].base,
-					       data->heaps[i].size);
-			if (ret)
-				pr_err("memblock reserve of %zx@%lx failed\n",
-				       data->heaps[i].size,
-				       data->heaps[i].base);
-		}
-		pr_info("%s: %s reserved base %lx size %zu\n", __func__,
-			data->heaps[i].name,
-			data->heaps[i].base,
-			data->heaps[i].size);
-	}
-}
diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h
index 97eb7a7..93dafb4 100644
--- a/drivers/staging/android/ion/ion.h
+++ b/drivers/staging/android/ion/ion.h
@@ -73,17 +73,6 @@ struct ion_platform_data {
 };
 
 /**
- * ion_reserve() - reserve memory for ion heaps if applicable
- * @data:	platform data specifying starting physical address and
- *		size
- *
- * Calls memblock reserve to set aside memory for heaps that are
- * located at specific memory addresses or of specific sizes not
- * managed by the kernel
- */
-void ion_reserve(struct ion_platform_data *data);
-
-/**
  * ion_client_create() -  allocate a client and returns it
  * @dev:		the global ion device
  * @name:		used for debugging
-- 
2.5.5

  parent reply	other threads:[~2016-08-08 16:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 16:52 [RESEND][PATCH 0/5] Ion cleanup Laura Abbott
2016-08-08 16:52 ` [RESEND][PATCH 1/5] staging: android: ion: Get rid of ion_sg_table Laura Abbott
2016-08-08 16:52 ` [RESEND][PATCH 2/5] staging: android: ion: Drop ion_phys interface Laura Abbott
2016-08-08 16:52 ` [RESEND][PATCH 3/5] staging: android: ion: Get rid of map_dma/unmap_dma Laura Abbott
2016-08-08 16:52 ` [RESEND][PATCH 4/5] staging: android: ion: Drop ion_carveout_allocate definitions Laura Abbott
2016-08-08 16:52 ` Laura Abbott [this message]
2016-08-14  8:47 ` [Linaro-mm-sig] [RESEND][PATCH 0/5] Ion cleanup Benjamin Gaignard
2016-08-15 15:08   ` Sumit Semwal
2016-08-15 14:37 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470675178-13052-6-git-send-email-labbott@redhat.com \
    --to=labbott@redhat.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riandrews@android.com \
    --cc=sumit.semwal@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome