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

Commit 252a2560 authored by Baoyou Xie's avatar Baoyou Xie Committed by Greg Kroah-Hartman
Browse files

staging: android: ion: mark symbols static where possible



We get 4 warnings when building kernel with W=1:
drivers/staging/android/ion/ion_carveout_heap.c:36:17: warning: no previous prototype for 'ion_carveout_allocate' [-Wmissing-prototypes]
drivers/staging/android/ion/ion_carveout_heap.c:50:6: warning: no previous prototype for 'ion_carveout_free' [-Wmissing-prototypes]
drivers/staging/android/ion/ion_of.c:28:5: warning: no previous prototype for 'ion_parse_dt_heap_common' [-Wmissing-prototypes]
drivers/staging/android/ion/ion_of.c:54:5: warning: no previous prototype for 'ion_setup_heap_common' [-Wmissing-prototypes]

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.

Signed-off-by: default avatarBaoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent da2c0871
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ struct ion_carveout_heap {
	ion_phys_addr_t base;
};

ion_phys_addr_t ion_carveout_allocate(struct ion_heap *heap,
static ion_phys_addr_t ion_carveout_allocate(struct ion_heap *heap,
					     unsigned long size,
					     unsigned long align)
{
@@ -47,7 +47,7 @@ ion_phys_addr_t ion_carveout_allocate(struct ion_heap *heap,
	return offset;
}

void ion_carveout_free(struct ion_heap *heap, ion_phys_addr_t addr,
static void ion_carveout_free(struct ion_heap *heap, ion_phys_addr_t addr,
			      unsigned long size)
{
	struct ion_carveout_heap *carveout_heap =
+6 −6
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
#include "ion_priv.h"
#include "ion_of.h"

int ion_parse_dt_heap_common(struct device_node *heap_node,
static int ion_parse_dt_heap_common(struct device_node *heap_node,
				    struct ion_platform_heap *heap,
				    struct ion_of_heap *compatible)
{
@@ -51,7 +51,7 @@ int ion_parse_dt_heap_common(struct device_node *heap_node,
	return 0;
}

int ion_setup_heap_common(struct platform_device *parent,
static int ion_setup_heap_common(struct platform_device *parent,
				 struct device_node *heap_node,
				 struct ion_platform_heap *heap)
{