Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90c0c069 authored by Mitchel Humpherys's avatar Mitchel Humpherys
Browse files

ion: fix remaining instances of sg_dma_len



Recently, [ec6c8a8f: "ion: convert sg_dma_len(sg) to sg->length"]
moved Ion away from using sg_dma_len. However, a few instances were left
over from MSM-specific code. Fix these instances so that we're using
sg->length everywhere.

Change-Id: I76b07f5589ba3867e1584b129a0ccd9f3ef00ad7
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent b7fe1b21
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -983,7 +983,7 @@ struct sg_table *ion_create_chunked_sg_table(phys_addr_t buffer_base,
	for_each_sg(table->sgl, sg, table->nents, i) {
		dma_addr_t addr = buffer_base + i * chunk_size;
		sg_dma_address(sg) = addr;
		sg_dma_len(sg) = chunk_size;
		sg->length = chunk_size;
	}

	return table;
+2 −2
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ int ion_heap_buffer_zero(struct ion_buffer *buffer)
	struct pages_mem pages_mem;

	for_each_sg(table->sgl, sg, table->nents, i) {
		unsigned long len = sg_dma_len(sg);
		unsigned long len = sg->length;
		int nrpages = len >> PAGE_SHIFT;
		page_tbl_size += sizeof(struct page *) * nrpages;
	}
@@ -234,7 +234,7 @@ int ion_heap_buffer_zero(struct ion_buffer *buffer)

	for_each_sg(table->sgl, sg, table->nents, i) {
		struct page *page = sg_page(sg);
		unsigned long len = sg_dma_len(sg);
		unsigned long len = sg->length;

		for (j = 0; j < len / PAGE_SIZE; j++)
			pages_mem.pages[npages++] = page + j;
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ static int secure_buffer_change_table(struct sg_table *table,

	for_each_sg(table->sgl, sg, table->nents, i) {
		int nchunks;
		int size = sg_dma_len(sg);
		int size = sg->length;
		int chunk_list_len;
		phys_addr_t chunk_list_phys;