Skip to contentSkip to conversation

Staging: android: Mark local functions in binder.c as static

PATCH Superseded Bojan Prtvar 2 participants 2 messages Sep 1, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: android: Mark local functions in binder.c as static

This fixes the following sparse warnings
drivers/staging/android/binder.c:1703:5: warning: symbol 'binder_thread_write' was not declared. Should it be static? drivers/staging/android/binder.c:2058:6: warning: symbol 'binder_stat_br' was not declared. Should it be static?

---
 drivers/staging/android/binder.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/staging/android/binder.c +4 -2
index 98ac020..82b5861 100644
@@ -1700,7 +1700,8 @@ err_no_context_mgr_node:
 		thread->return_error = return_error;
 }
 
-int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread,
+static int binder_thread_write(struct binder_proc *proc,
+			struct binder_thread *thread,
 			void __user *buffer, size_t size, size_t *consumed)
 {
 	uint32_t cmd;
@@ -2055,7 +2056,8 @@ int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread,
 	return 0;
 }
 
-void binder_stat_br(struct binder_proc *proc, struct binder_thread *thread,
+static void binder_stat_br(struct binder_proc *proc,
+			struct binder_thread *thread,
 		    uint32_t cmd)
 {
 	trace_binder_return(cmd);
Signature · 1 line
1.7.1
#1 lore raw

drivers/staging/android/binder.c int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread, · line 2061

Quoted 4 lines · Bojan Prtvar
drivers/staging/android/binder.c +2 -1
-void binder_stat_br(struct binder_proc *proc, struct binder_thread *thread,
+static void binder_stat_br(struct binder_proc *proc,
+			struct binder_thread *thread,
 		    uint32_t cmd)

The indenting needs to be updated to match as well. Add 3 spaces before "struct binder_thread" and move the "uint32_t cmd)" up a line. Like this:

static void binder_stat_br(struct binder_proc *proc,
struct binder_thread *thread, uint32_t cmd)
{

regards,
dan carpenter