[PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-30 Thread Anmol Sarma
Changed all user visible multi-line strings to single line.
Removed 'binder:' prefix on stings.

Signed-off-by: Anmol Sarma 
---
 drivers/staging/android/binder.c |  376 --
 1 file changed, 153 insertions(+), 223 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 9fbc06e..4a36e9a 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -15,6 +15,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include 
 #include 
 #include 
@@ -434,12 +436,12 @@ static void binder_set_nice(long nice)
}
min_nice = 20 - current->signal->rlim[RLIMIT_NICE].rlim_cur;
binder_debug(BINDER_DEBUG_PRIORITY_CAP,
-"binder: %d: nice value %ld not allowed use "
-"%ld instead\n", current->pid, nice, min_nice);
+"%d: nice value %ld not allowed use %ld instead\n",
+ current->pid, nice, min_nice);
set_user_nice(current, min_nice);
if (min_nice < 20)
return;
-   binder_user_error("binder: %d RLIMIT_NICE not set\n", current->pid);
+   binder_user_error("%d RLIMIT_NICE not set\n", current->pid);
 }
 
 static size_t binder_buffer_size(struct binder_proc *proc,
@@ -466,8 +468,8 @@ static void binder_insert_free_buffer(struct binder_proc 
*proc,
new_buffer_size = binder_buffer_size(proc, new_buffer);
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: add free buffer, size %zd, "
-"at %p\n", proc->pid, new_buffer_size, new_buffer);
+"%d: add free buffer, size %zd, at %p\n",
+ proc->pid, new_buffer_size, new_buffer);
 
while (*p) {
parent = *p;
@@ -545,7 +547,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
struct mm_struct *mm;
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: %s pages %p-%p\n", proc->pid,
+"%d: %s pages %p-%p\n", proc->pid,
 allocate ? "allocate" : "free", start, end);
 
if (end <= start)
@@ -562,7 +564,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
down_write(&mm->mmap_sem);
vma = proc->vma;
if (vma && mm != proc->vma_vm_mm) {
-   pr_err("binder: %d: vma mm and task mm mismatch\n",
+   pr_err("%d: vma mm and task mm mismatch\n",
proc->pid);
vma = NULL;
}
@@ -572,8 +574,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
goto free_range;
 
if (vma == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed to "
-  "map pages in userspace, no vma\n", proc->pid);
+   pr_err("%d: binder_alloc_buf failed to map pages in userspace, 
no vma\n",
+   proc->pid);
goto err_no_vma;
}
 
@@ -585,8 +587,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
BUG_ON(*page);
*page = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
if (*page == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "for page at %p\n", proc->pid, page_addr);
+   pr_err("%d: binder_alloc_buf failed for page at %p\n",
+   proc->pid, page_addr);
goto err_alloc_page_failed;
}
tmp_area.addr = page_addr;
@@ -594,8 +596,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
page_array_ptr = page;
ret = map_vm_area(&tmp_area, PAGE_KERNEL, &page_array_ptr);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %p in kernel\n",
+   pr_err("%d: binder_alloc_buf failed to map page at %p 
in kernel\n",
   proc->pid, page_addr);
goto err_map_kernel_failed;
}
@@ -603,8 +604,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
(uintptr_t)page_addr + proc->user_buffer_offset;
ret = vm_insert_page(vma, user_page_addr, page[0]);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %lx in userspace\n",
+   pr_err("%d: binder_alloc_buf failed to map page at %lx 
in userspace\n",
   proc->pid, user_page_addr);
goto err_vm_insert_page_failed;

Re: [PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-29 Thread Greg KH
On Fri, Oct 26, 2012 at 01:54:19PM +0530, Anmol Sarma wrote:
>   if (vma == NULL) {
> - pr_err("binder: %d: binder_alloc_buf failed to "
> -"map pages in userspace, no vma\n", proc->pid);
> + pr_err("%d: binder_alloc_buf failed to map pages in userspace, 
> no vma\n",
> +  proc->pid);
>   goto err_no_vma;
>   }
>  
> @@ -585,8 +587,8 @@ static int binder_update_page_range(struct binder_proc 
> *proc, int allocate,
>   BUG_ON(*page);
>   *page = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
>   if (*page == NULL) {
> - pr_err("binder: %d: binder_alloc_buf failed "
> -"for page at %p\n", proc->pid, page_addr);
> + pr_err("%d: binder_alloc_buf failed for page at %p\n",
> +  proc->pid, page_addr);
>   goto err_alloc_page_failed;
>   }
>   tmp_area.addr = page_addr;

What's with the very wierd indentation here for the second line?  Please
indent it properly, one space isn't ok.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-26 Thread Anmol Sarma
Changed all user visible multi-line strings to single line.
Removed 'binder:' prefix on stings.

Signed-off-by: Anmol Sarma 
---
 drivers/staging/android/binder.c |  370 --
 1 file changed, 150 insertions(+), 220 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 9fbc06e..ba5a4af 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -15,6 +15,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include 
 #include 
 #include 
@@ -434,12 +436,12 @@ static void binder_set_nice(long nice)
}
min_nice = 20 - current->signal->rlim[RLIMIT_NICE].rlim_cur;
binder_debug(BINDER_DEBUG_PRIORITY_CAP,
-"binder: %d: nice value %ld not allowed use "
-"%ld instead\n", current->pid, nice, min_nice);
+"%d: nice value %ld not allowed use %ld instead\n",
+ current->pid, nice, min_nice);
set_user_nice(current, min_nice);
if (min_nice < 20)
return;
-   binder_user_error("binder: %d RLIMIT_NICE not set\n", current->pid);
+   binder_user_error("%d RLIMIT_NICE not set\n", current->pid);
 }
 
 static size_t binder_buffer_size(struct binder_proc *proc,
@@ -466,8 +468,8 @@ static void binder_insert_free_buffer(struct binder_proc 
*proc,
new_buffer_size = binder_buffer_size(proc, new_buffer);
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: add free buffer, size %zd, "
-"at %p\n", proc->pid, new_buffer_size, new_buffer);
+"%d: add free buffer, size %zd, at %p\n",
+ proc->pid, new_buffer_size, new_buffer);
 
while (*p) {
parent = *p;
@@ -545,7 +547,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
struct mm_struct *mm;
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: %s pages %p-%p\n", proc->pid,
+"%d: %s pages %p-%p\n", proc->pid,
 allocate ? "allocate" : "free", start, end);
 
if (end <= start)
@@ -562,7 +564,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
down_write(&mm->mmap_sem);
vma = proc->vma;
if (vma && mm != proc->vma_vm_mm) {
-   pr_err("binder: %d: vma mm and task mm mismatch\n",
+   pr_err("%d: vma mm and task mm mismatch\n",
proc->pid);
vma = NULL;
}
@@ -572,8 +574,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
goto free_range;
 
if (vma == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed to "
-  "map pages in userspace, no vma\n", proc->pid);
+   pr_err("%d: binder_alloc_buf failed to map pages in userspace, 
no vma\n",
+proc->pid);
goto err_no_vma;
}
 
@@ -585,8 +587,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
BUG_ON(*page);
*page = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
if (*page == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "for page at %p\n", proc->pid, page_addr);
+   pr_err("%d: binder_alloc_buf failed for page at %p\n",
+proc->pid, page_addr);
goto err_alloc_page_failed;
}
tmp_area.addr = page_addr;
@@ -594,8 +596,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
page_array_ptr = page;
ret = map_vm_area(&tmp_area, PAGE_KERNEL, &page_array_ptr);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %p in kernel\n",
+   pr_err("%d: binder_alloc_buf failed to map page at %p 
in kernel\n",
   proc->pid, page_addr);
goto err_map_kernel_failed;
}
@@ -603,8 +604,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
(uintptr_t)page_addr + proc->user_buffer_offset;
ret = vm_insert_page(vma, user_page_addr, page[0]);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %lx in userspace\n",
+   pr_err("%d: binder_alloc_buf failed to map page at %lx 
in userspace\n",
   proc->pid, user_page_addr);
goto err_vm_insert_page_failed;
}
@@ -

[PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-26 Thread Anmol Sarma
Changed all user visible multi-line strings to single line.
Removed 'binder:' prefix on stings.

Signed-off-by: Anmol Sarma 
---
 drivers/staging/android/binder.c |  483 +-
 1 file changed, 165 insertions(+), 318 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 9fbc06e..32f9175 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -15,6 +15,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include 
 #include 
 #include 
@@ -35,9 +37,8 @@
 #include 
 
 #include "binder.h"
-#include "binder_trace.h"
 
-static DEFINE_MUTEX(binder_main_lock);
+static DEFINE_MUTEX(binder_lock);
 static DEFINE_MUTEX(binder_deferred_lock);
 static DEFINE_MUTEX(binder_mmap_lock);
 
@@ -412,19 +413,6 @@ static long task_close_fd(struct binder_proc *proc, 
unsigned int fd)
return retval;
 }
 
-static inline void binder_lock(const char *tag)
-{
-   trace_binder_lock(tag);
-   mutex_lock(&binder_main_lock);
-   trace_binder_locked(tag);
-}
-
-static inline void binder_unlock(const char *tag)
-{
-   trace_binder_unlock(tag);
-   mutex_unlock(&binder_main_lock);
-}
-
 static void binder_set_nice(long nice)
 {
long min_nice;
@@ -434,12 +422,12 @@ static void binder_set_nice(long nice)
}
min_nice = 20 - current->signal->rlim[RLIMIT_NICE].rlim_cur;
binder_debug(BINDER_DEBUG_PRIORITY_CAP,
-"binder: %d: nice value %ld not allowed use "
-"%ld instead\n", current->pid, nice, min_nice);
+"%d: nice value %ld not allowed use %ld instead\n",
+ current->pid, nice, min_nice);
set_user_nice(current, min_nice);
if (min_nice < 20)
return;
-   binder_user_error("binder: %d RLIMIT_NICE not set\n", current->pid);
+   binder_user_error("%d RLIMIT_NICE not set\n", current->pid);
 }
 
 static size_t binder_buffer_size(struct binder_proc *proc,
@@ -466,8 +454,8 @@ static void binder_insert_free_buffer(struct binder_proc 
*proc,
new_buffer_size = binder_buffer_size(proc, new_buffer);
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: add free buffer, size %zd, "
-"at %p\n", proc->pid, new_buffer_size, new_buffer);
+"%d: add free buffer, size %zd, at %p\n",
+ proc->pid, new_buffer_size, new_buffer);
 
while (*p) {
parent = *p;
@@ -545,14 +533,12 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
struct mm_struct *mm;
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: %s pages %p-%p\n", proc->pid,
+"%d: %s pages %p-%p\n", proc->pid,
 allocate ? "allocate" : "free", start, end);
 
if (end <= start)
return 0;
 
-   trace_binder_update_page_range(proc, allocate, start, end);
-
if (vma)
mm = NULL;
else
@@ -562,7 +548,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
down_write(&mm->mmap_sem);
vma = proc->vma;
if (vma && mm != proc->vma_vm_mm) {
-   pr_err("binder: %d: vma mm and task mm mismatch\n",
+   pr_err("%d: vma mm and task mm mismatch\n",
proc->pid);
vma = NULL;
}
@@ -572,8 +558,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
goto free_range;
 
if (vma == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed to "
-  "map pages in userspace, no vma\n", proc->pid);
+   pr_err("%d: binder_alloc_buf failed to map pages in userspace, 
no vma\n",
+proc->pid);
goto err_no_vma;
}
 
@@ -583,10 +569,10 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
page = &proc->pages[(page_addr - proc->buffer) / PAGE_SIZE];
 
BUG_ON(*page);
-   *page = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
+   *page = alloc_page(GFP_KERNEL | __GFP_ZERO);
if (*page == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "for page at %p\n", proc->pid, page_addr);
+   pr_err("%d: binder_alloc_buf failed for page at %p\n",
+proc->pid, page_addr);
goto err_alloc_page_failed;
}
tmp_area.addr = page_addr;
@@ -594,8 +580,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
page_array_ptr = page;
ret = map_vm_area(&tmp_area, PAGE_KERNEL, &page_array

Re: [PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-25 Thread Greg KH
On Thu, Oct 25, 2012 at 01:36:47PM +0530, Anmol Sarma wrote:
> Changed all user visible multi-line strings to single line.
> Removed 'binder:' prefix on stings.
> 
> Signed-off-by: Anmol Sarma 
> ---
>  drivers/staging/android/binder.c |  358 
> +++---
>  1 file changed, 143 insertions(+), 215 deletions(-)

Better, thanks.  But it doesn't apply against my tree, can you please
redo it against the linux-next release and resend it?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-25 Thread Anmol Sarma
Changed all user visible multi-line strings to single line.
Removed 'binder:' prefix on stings.

Signed-off-by: Anmol Sarma 
---
 drivers/staging/android/binder.c |  358 +++---
 1 file changed, 143 insertions(+), 215 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 7b0ba92..32f9175 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -15,6 +15,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include 
 #include 
 #include 
@@ -420,12 +422,12 @@ static void binder_set_nice(long nice)
}
min_nice = 20 - current->signal->rlim[RLIMIT_NICE].rlim_cur;
binder_debug(BINDER_DEBUG_PRIORITY_CAP,
-"binder: %d: nice value %ld not allowed use "
-"%ld instead\n", current->pid, nice, min_nice);
+"%d: nice value %ld not allowed use %ld instead\n",
+ current->pid, nice, min_nice);
set_user_nice(current, min_nice);
if (min_nice < 20)
return;
-   binder_user_error("binder: %d RLIMIT_NICE not set\n", current->pid);
+   binder_user_error("%d RLIMIT_NICE not set\n", current->pid);
 }
 
 static size_t binder_buffer_size(struct binder_proc *proc,
@@ -452,8 +454,8 @@ static void binder_insert_free_buffer(struct binder_proc 
*proc,
new_buffer_size = binder_buffer_size(proc, new_buffer);
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: add free buffer, size %zd, "
-"at %p\n", proc->pid, new_buffer_size, new_buffer);
+"%d: add free buffer, size %zd, at %p\n",
+ proc->pid, new_buffer_size, new_buffer);
 
while (*p) {
parent = *p;
@@ -531,7 +533,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
struct mm_struct *mm;
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: %s pages %p-%p\n", proc->pid,
+"%d: %s pages %p-%p\n", proc->pid,
 allocate ? "allocate" : "free", start, end);
 
if (end <= start)
@@ -546,7 +548,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
down_write(&mm->mmap_sem);
vma = proc->vma;
if (vma && mm != proc->vma_vm_mm) {
-   pr_err("binder: %d: vma mm and task mm mismatch\n",
+   pr_err("%d: vma mm and task mm mismatch\n",
proc->pid);
vma = NULL;
}
@@ -556,8 +558,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
goto free_range;
 
if (vma == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed to "
-  "map pages in userspace, no vma\n", proc->pid);
+   pr_err("%d: binder_alloc_buf failed to map pages in userspace, 
no vma\n",
+proc->pid);
goto err_no_vma;
}
 
@@ -569,8 +571,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
BUG_ON(*page);
*page = alloc_page(GFP_KERNEL | __GFP_ZERO);
if (*page == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "for page at %p\n", proc->pid, page_addr);
+   pr_err("%d: binder_alloc_buf failed for page at %p\n",
+proc->pid, page_addr);
goto err_alloc_page_failed;
}
tmp_area.addr = page_addr;
@@ -578,8 +580,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
page_array_ptr = page;
ret = map_vm_area(&tmp_area, PAGE_KERNEL, &page_array_ptr);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %p in kernel\n",
+   pr_err("%d: binder_alloc_buf failed to map page at %p 
in kernel\n",
   proc->pid, page_addr);
goto err_map_kernel_failed;
}
@@ -587,8 +588,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
(uintptr_t)page_addr + proc->user_buffer_offset;
ret = vm_insert_page(vma, user_page_addr, page[0]);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %lx in userspace\n",
+   pr_err("%d: binder_alloc_buf failed to map page at %lx 
in userspace\n",
   proc->pid, user_page_addr);
goto err_vm_insert_page_failed;
}
@@ -636,7 +636,7 @@ 

Re: [PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-24 Thread Greg KH
On Wed, Oct 24, 2012 at 01:28:44PM +0530, Anmol Sarma wrote:
> >From abe5f2d4a7424c446f5e41cf57b4783eb9a04ab9 Mon Sep 17 00:00:00 2001
> From: Anmol Sarma 
> Date: Wed, 24 Oct 2012 12:57:35 +0530
> Subject: [PATCH] Staging: android: binder: Strings cleanup
> 
> Changed all user visible multi-line strings to single line.
> Removed 'binder:' prefix on stings.
> 
> Signed-off-by: Anmol Sarma 

Why did you get the subject wrong?

And why include the whole commit here, that forces me to edit the email.
Just use git-send-email to send the patch itself.

Try again?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-24 Thread Anmol Sarma
>From abe5f2d4a7424c446f5e41cf57b4783eb9a04ab9 Mon Sep 17 00:00:00 2001
From: Anmol Sarma 
Date: Wed, 24 Oct 2012 12:57:35 +0530
Subject: [PATCH] Staging: android: binder: Strings cleanup

Changed all user visible multi-line strings to single line.
Removed 'binder:' prefix on stings.

Signed-off-by: Anmol Sarma 
---
 drivers/staging/android/binder.c |  358 +++---
 1 file changed, 143 insertions(+), 215 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 7b0ba92..32f9175 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -15,6 +15,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include 
 #include 
 #include 
@@ -420,12 +422,12 @@ static void binder_set_nice(long nice)
}
min_nice = 20 - current->signal->rlim[RLIMIT_NICE].rlim_cur;
binder_debug(BINDER_DEBUG_PRIORITY_CAP,
-"binder: %d: nice value %ld not allowed use "
-"%ld instead\n", current->pid, nice, min_nice);
+"%d: nice value %ld not allowed use %ld instead\n",
+ current->pid, nice, min_nice);
set_user_nice(current, min_nice);
if (min_nice < 20)
return;
-   binder_user_error("binder: %d RLIMIT_NICE not set\n", current->pid);
+   binder_user_error("%d RLIMIT_NICE not set\n", current->pid);
 }
 
 static size_t binder_buffer_size(struct binder_proc *proc,
@@ -452,8 +454,8 @@ static void binder_insert_free_buffer(struct binder_proc 
*proc,
new_buffer_size = binder_buffer_size(proc, new_buffer);
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: add free buffer, size %zd, "
-"at %p\n", proc->pid, new_buffer_size, new_buffer);
+"%d: add free buffer, size %zd, at %p\n",
+ proc->pid, new_buffer_size, new_buffer);
 
while (*p) {
parent = *p;
@@ -531,7 +533,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
struct mm_struct *mm;
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: %s pages %p-%p\n", proc->pid,
+"%d: %s pages %p-%p\n", proc->pid,
 allocate ? "allocate" : "free", start, end);
 
if (end <= start)
@@ -546,7 +548,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
down_write(&mm->mmap_sem);
vma = proc->vma;
if (vma && mm != proc->vma_vm_mm) {
-   pr_err("binder: %d: vma mm and task mm mismatch\n",
+   pr_err("%d: vma mm and task mm mismatch\n",
proc->pid);
vma = NULL;
}
@@ -556,8 +558,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
goto free_range;
 
if (vma == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed to "
-  "map pages in userspace, no vma\n", proc->pid);
+   pr_err("%d: binder_alloc_buf failed to map pages in userspace, 
no vma\n",
+proc->pid);
goto err_no_vma;
}
 
@@ -569,8 +571,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
BUG_ON(*page);
*page = alloc_page(GFP_KERNEL | __GFP_ZERO);
if (*page == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "for page at %p\n", proc->pid, page_addr);
+   pr_err("%d: binder_alloc_buf failed for page at %p\n",
+proc->pid, page_addr);
goto err_alloc_page_failed;
}
tmp_area.addr = page_addr;
@@ -578,8 +580,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
page_array_ptr = page;
ret = map_vm_area(&tmp_area, PAGE_KERNEL, &page_array_ptr);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %p in kernel\n",
+   pr_err("%d: binder_alloc_buf failed to map page at %p 
in kernel\n",
   proc->pid, page_addr);
goto err_map_kernel_failed;
}
@@ -587,8 +588,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
(uintptr_t)page_addr + proc->user_buffer_offset;
ret = vm_insert_page(vma, user_page_addr, page[0]);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %lx in userspace\n",
+   pr_err("%d: binder_alloc_buf failed t

Re: [PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-23 Thread Greg KH
On Tue, Oct 23, 2012 at 03:13:38PM +0530, Anmol Sarma wrote:
> >From 949ecac6fcd58ffa6d02f6761058dbcfb1c2ba42 Mon Sep 17 00:00:00 2001
> From: Anmol Sarma 
> Date: Tue, 23 Oct 2012 13:47:14 +0530
> Subject: [PATCH] Staging: android: binder: Strings cleanup
> 
> Changed all user visible multi-line stings to single line.

No you didn't:

> @@ -420,12 +422,12 @@ static void binder_set_nice(long nice)
>   }
>   min_nice = 20 - current->signal->rlim[RLIMIT_NICE].rlim_cur;
>   binder_debug(BINDER_DEBUG_PRIORITY_CAP,
> -  "binder: %d: nice value %ld not allowed use "
> +  "%d: nice value %ld not allowed use "
>"%ld instead\n", current->pid, nice, min_nice);

That's a multi-line string :(

And you sent 2 copies of this patch, why?

Care to try again?

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-23 Thread Anmol Sarma
>From 949ecac6fcd58ffa6d02f6761058dbcfb1c2ba42 Mon Sep 17 00:00:00 2001
From: Anmol Sarma 
Date: Tue, 23 Oct 2012 13:47:14 +0530
Subject: [PATCH] Staging: android: binder: Strings cleanup

Changed all user visible multi-line stings to single line.
Removed 'binder:' prefix on strings.

Signed-off-by: Anmol Sarma 
---
 drivers/staging/android/binder.c |  311 --
 1 file changed, 127 insertions(+), 184 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 7b0ba92..628494a431 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -15,6 +15,8 @@
  *
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include 
 #include 
 #include 
@@ -420,12 +422,12 @@ static void binder_set_nice(long nice)
}
min_nice = 20 - current->signal->rlim[RLIMIT_NICE].rlim_cur;
binder_debug(BINDER_DEBUG_PRIORITY_CAP,
-"binder: %d: nice value %ld not allowed use "
+"%d: nice value %ld not allowed use "
 "%ld instead\n", current->pid, nice, min_nice);
set_user_nice(current, min_nice);
if (min_nice < 20)
return;
-   binder_user_error("binder: %d RLIMIT_NICE not set\n", current->pid);
+   binder_user_error("%d RLIMIT_NICE not set\n", current->pid);
 }
 
 static size_t binder_buffer_size(struct binder_proc *proc,
@@ -452,7 +454,7 @@ static void binder_insert_free_buffer(struct binder_proc 
*proc,
new_buffer_size = binder_buffer_size(proc, new_buffer);
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: add free buffer, size %zd, "
+"%d: add free buffer, size %zd, "
 "at %p\n", proc->pid, new_buffer_size, new_buffer);
 
while (*p) {
@@ -531,7 +533,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
struct mm_struct *mm;
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: %s pages %p-%p\n", proc->pid,
+"%d: %s pages %p-%p\n", proc->pid,
 allocate ? "allocate" : "free", start, end);
 
if (end <= start)
@@ -546,7 +548,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
down_write(&mm->mmap_sem);
vma = proc->vma;
if (vma && mm != proc->vma_vm_mm) {
-   pr_err("binder: %d: vma mm and task mm mismatch\n",
+   pr_err("%d: vma mm and task mm mismatch\n",
proc->pid);
vma = NULL;
}
@@ -556,8 +558,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
goto free_range;
 
if (vma == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed to "
-  "map pages in userspace, no vma\n", proc->pid);
+   pr_err("%d: binder_alloc_buf failed to map pages in userspace, 
no vma\n",
+proc->pid);
goto err_no_vma;
}
 
@@ -569,8 +571,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
BUG_ON(*page);
*page = alloc_page(GFP_KERNEL | __GFP_ZERO);
if (*page == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "for page at %p\n", proc->pid, page_addr);
+   pr_err("%d: binder_alloc_buf failed for page at %p\n",
+proc->pid, page_addr);
goto err_alloc_page_failed;
}
tmp_area.addr = page_addr;
@@ -578,8 +580,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
page_array_ptr = page;
ret = map_vm_area(&tmp_area, PAGE_KERNEL, &page_array_ptr);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %p in kernel\n",
+   pr_err("%d: binder_alloc_buf failed to map page at %p 
in kernel\n",
   proc->pid, page_addr);
goto err_map_kernel_failed;
}
@@ -587,8 +588,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
(uintptr_t)page_addr + proc->user_buffer_offset;
ret = vm_insert_page(vma, user_page_addr, page[0]);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %lx in userspace\n",
+   pr_err("%d: binder_alloc_buf failed to map page at %lx 
in userspace\n",
   proc->pid, user_page_addr);
goto err_vm_insert_page_failed;
 

Re: [PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-22 Thread Greg KH
On Mon, Oct 08, 2012 at 04:15:14PM -0700, Joe Perches wrote:
> On Tue, 2012-10-09 at 00:31 +0530, Anmol Sarma wrote:
> > Changed all user visible multi-line stings to single line.
> 
> Another patch might be to add
> 
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> 
> before any #include and
> 
> > diff --git a/drivers/staging/android/binder.c 
> > b/drivers/staging/android/binder.c
> []
> > @@ -556,8 +556,8 @@ static int binder_update_page_range(struct binder_proc 
> > *proc, int allocate,
> > goto free_range;
> >  
> > if (vma == NULL) {
> > -   pr_err("binder: %d: binder_alloc_buf failed to "
> > -  "map pages in userspace, no vma\n", proc->pid);
> > +   pr_err("binder: %d: binder_alloc_buf failed to map pages in 
> > userspace, no vma\n",
> > +   proc->pid);
> 
> remove all the "binder: " prefixes like:
> 
>   pr_err("%d: binder_alloc_buf failed to map pages in userspace, 
> no vma\n",
>  proc->pid);

Yes, that would be the better fix.

Anmol, care to redo this patch that way?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-09 Thread Dan Carpenter
On Tue, Oct 09, 2012 at 12:31:03AM +0530, Anmol Sarma wrote:
> Changed all user visible multi-line stings to single line.
> 
> Signed-off-by: Anmol Sarma 

These sorts of things are really a judgement call.  checkpatch.pl is
being bossier than it should be.  I would ignore keep the
maintaier's original code.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-08 Thread Joe Perches
On Tue, 2012-10-09 at 00:31 +0530, Anmol Sarma wrote:
> Changed all user visible multi-line stings to single line.

Another patch might be to add

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

before any #include and

> diff --git a/drivers/staging/android/binder.c 
> b/drivers/staging/android/binder.c
[]
> @@ -556,8 +556,8 @@ static int binder_update_page_range(struct binder_proc 
> *proc, int allocate,
>   goto free_range;
>  
>   if (vma == NULL) {
> - pr_err("binder: %d: binder_alloc_buf failed to "
> -"map pages in userspace, no vma\n", proc->pid);
> + pr_err("binder: %d: binder_alloc_buf failed to map pages in 
> userspace, no vma\n",
> + proc->pid);

remove all the "binder: " prefixes like:

pr_err("%d: binder_alloc_buf failed to map pages in userspace, 
no vma\n",
   proc->pid);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: android: binder: Fixed multi-line strings

2012-10-08 Thread Anmol Sarma
Changed all user visible multi-line stings to single line.

Signed-off-by: Anmol Sarma 
---
 drivers/staging/android/binder.c |  264 ++
 1 file changed, 99 insertions(+), 165 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 7b0ba92..b9e6cd4 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -556,8 +556,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
goto free_range;
 
if (vma == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed to "
-  "map pages in userspace, no vma\n", proc->pid);
+   pr_err("binder: %d: binder_alloc_buf failed to map pages in 
userspace, no vma\n",
+   proc->pid);
goto err_no_vma;
}
 
@@ -569,8 +569,8 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
BUG_ON(*page);
*page = alloc_page(GFP_KERNEL | __GFP_ZERO);
if (*page == NULL) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "for page at %p\n", proc->pid, page_addr);
+   pr_err("binder: %d: binder_alloc_buf failed for page at 
%p\n",
+   proc->pid, page_addr);
goto err_alloc_page_failed;
}
tmp_area.addr = page_addr;
@@ -578,8 +578,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
page_array_ptr = page;
ret = map_vm_area(&tmp_area, PAGE_KERNEL, &page_array_ptr);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %p in kernel\n",
+   pr_err("binder: %d: binder_alloc_buf failed to map page 
at %p in kernel\n",
   proc->pid, page_addr);
goto err_map_kernel_failed;
}
@@ -587,8 +586,7 @@ static int binder_update_page_range(struct binder_proc 
*proc, int allocate,
(uintptr_t)page_addr + proc->user_buffer_offset;
ret = vm_insert_page(vma, user_page_addr, page[0]);
if (ret) {
-   pr_err("binder: %d: binder_alloc_buf failed "
-  "to map page at %lx in userspace\n",
+   pr_err("binder: %d: binder_alloc_buf failed to map page 
at %lx in userspace\n",
   proc->pid, user_page_addr);
goto err_vm_insert_page_failed;
}
@@ -645,16 +643,16 @@ static struct binder_buffer *binder_alloc_buf(struct 
binder_proc *proc,
ALIGN(offsets_size, sizeof(void *));
 
if (size < data_size || size < offsets_size) {
-   binder_user_error("binder: %d: got transaction with invalid "
-   "size %zd-%zd\n", proc->pid, data_size, offsets_size);
+   binder_user_error("binder: %d: got transaction with invalid 
size %zd-%zd\n",
+proc->pid, data_size, offsets_size);
return NULL;
}
 
if (is_async &&
proc->free_async_space < size + sizeof(struct binder_buffer)) {
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: binder_alloc_buf size %zd"
-"failed, no async space left\n", proc->pid, size);
+"binder: %d: binder_alloc_buf size %zdfailed, no 
async space left\n",
+ proc->pid, size);
return NULL;
}
 
@@ -674,8 +672,8 @@ static struct binder_buffer *binder_alloc_buf(struct 
binder_proc *proc,
}
}
if (best_fit == NULL) {
-   pr_err("binder: %d: binder_alloc_buf size %zd failed, "
-  "no address space\n", proc->pid, size);
+   pr_err("binder: %d: binder_alloc_buf size %zd failed, no 
address space\n",
+   proc->pid, size);
return NULL;
}
if (n == NULL) {
@@ -684,8 +682,8 @@ static struct binder_buffer *binder_alloc_buf(struct 
binder_proc *proc,
}
 
binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-"binder: %d: binder_alloc_buf size %zd got buff"
-"er %p size %zd\n", proc->pid, size, buffer, buffer_size);
+"binder: %d: binder_alloc_buf size %zd got buffer %p size 
%zd\n",
+ proc->pid, size, buffer, buffer_size);
 
has_page_addr =
(void *)(((uintptr_t)buffer->data + buffer_size) & PAGE_MASK);
@@ -713,16 +711,16 @@ static struct binder_buffer *binder_alloc_buf(struct 
binder_proc *proc,
binder_insert_free_buffer(proc, new_buffer);