Skip to contentSkip to conversation

staging: ion: solve warning symbol was not declared

PATCH In review Oscar Gomez Fuente 2 participants 2 messages Apr 22, 2019 – Apr 24, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: ion: solve warning symbol was not declared

These changes solve warning symbol was not declared in the functions:
ion_carveout_heap_create and ion_chunk_heap_create

---
 drivers/staging/android/ion/ion_carveout_heap.c | 2 +-
 drivers/staging/android/ion/ion_chunk_heap.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion_carveout_heap.c +1 -1
index bb9d614..3f359ae 100644
@@ -103,7 +103,7 @@ static struct ion_heap_ops carveout_heap_ops = {
 	.unmap_kernel = ion_heap_unmap_kernel,
 };
 
-struct ion_heap *ion_carveout_heap_create(phys_addr_t base, size_t size)
+static inline struct ion_heap *ion_carveout_heap_create(phys_addr_t base, size_t size)
 {
 	struct ion_carveout_heap *carveout_heap;
 	int ret;
drivers/staging/android/ion/ion_chunk_heap.c +1 -1
index 3cdde9c..7e44344 100644
@@ -107,7 +107,7 @@ static struct ion_heap_ops chunk_heap_ops = {
 	.unmap_kernel = ion_heap_unmap_kernel,
 };
 
-struct ion_heap *ion_chunk_heap_create(phys_addr_t base, size_t size, size_t chunk_size)
+static inline struct ion_heap *ion_chunk_heap_create(phys_addr_t base, size_t size, size_t chunk_size)
 {
 	struct ion_chunk_heap *chunk_heap;
 	int ret;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 14 lines · Oscar Gomez Fuente

These changes solve warning symbol was not declared in the functions:
ion_carveout_heap_create and ion_chunk_heap_create

---
 drivers/staging/android/ion/ion_carveout_heap.c | 2 +-
 drivers/staging/android/ion/ion_chunk_heap.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion_carveout_heap.c +0 -0
index bb9d614..3f359ae 100644

drivers/staging/android/ion/ion_carveout_heap.c static struct ion_heap_ops carveout_heap_ops = { · line 106

Quoted 5 lines
drivers/staging/android/ion/ion_carveout_heap.c +1 -1
@@ -103,7 +103,7 @@ static struct ion_heap_ops carveout_heap_ops = {
 	.unmap_kernel = ion_heap_unmap_kernel,
 };
 
-struct ion_heap *ion_carveout_heap_create(phys_addr_t base, size_t size)
+static inline struct ion_heap *ion_carveout_heap_create(phys_addr_t base, size_t size)

Why are you making it inline? Btw, normally we just leave it for the compiler to choose which functions to make inline.

regards,
dan carpenter

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel