Skip to contentSkip to conversation

staging: android: binder: convert commented messages to pr_debug

PATCH In review SeongJae Park 2 participants 4 messages Feb 19, 2014 – Feb 20, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: android: binder: convert commented messages to pr_debug

2 debugging messages were just commented out for normal case. Let them be activated on debug mode without explicit code modification.

---
 drivers/staging/android/binder.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/staging/android/binder.c +4 -3
index eaec1da..a56f941 100644
@@ -2553,7 +2553,8 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 	unsigned int size = _IOC_SIZE(cmd);
 	void __user *ubuf = (void __user *)arg;
 
-	/*pr_info("binder_ioctl: %d:%d %x %lx\n", proc->pid, current->pid, cmd, arg);*/
+	pr_debug("binder_ioctl: %d:%d %x %lx\n",
+		 proc->pid, current->pid, cmd, arg);
 
 	trace_binder_ioctl(cmd, arg);
 
@@ -2787,8 +2788,8 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
 	proc->vma = vma;
 	proc->vma_vm_mm = vma->vm_mm;
 
-	/*pr_info("binder_mmap: %d %lx-%lx maps %p\n",
-		 proc->pid, vma->vm_start, vma->vm_end, proc->buffer);*/
+	pr_debug("binder_mmap: %d %lx-%lx maps %p\n",
+		 proc->pid, vma->vm_start, vma->vm_end, proc->buffer);
 	return 0;
 
 err_alloc_small_buf_failed:
Signature · 1 line
1.8.3.2
#1 lore raw

Add [email protected] as CC. Sorry if this duplicated mail bothered your inbox.

Quoted 36 lines · SeongJae Park

2 debugging messages were just commented out for normal case. Let them be activated on debug mode without explicit code modification.

---
 drivers/staging/android/binder.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/staging/android/binder.c +4 -4
index eaec1da..a56f941 100644
@@ -2553,7 +2553,8 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
        unsigned int size = _IOC_SIZE(cmd);
        void __user *ubuf = (void __user *)arg;
 
-       /*pr_info("binder_ioctl: %d:%d %x %lx\n", proc->pid, current->pid, cmd, arg);*/
+       pr_debug("binder_ioctl: %d:%d %x %lx\n",
+                proc->pid, current->pid, cmd, arg);
 
        trace_binder_ioctl(cmd, arg);
 
@@ -2787,8 +2788,8 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
        proc->vma = vma;
        proc->vma_vm_mm = vma->vm_mm;
 
-       /*pr_info("binder_mmap: %d %lx-%lx maps %p\n",
-                proc->pid, vma->vm_start, vma->vm_end, proc->buffer);*/
+       pr_debug("binder_mmap: %d %lx-%lx maps %p\n",
+                proc->pid, vma->vm_start, vma->vm_end, proc->buffer);
        return 0;
 
 err_alloc_small_buf_failed:
--

1.8.3.2

maintainer
#2 lore raw
In reply to SeongJae Park
Quoted 2 lines · SeongJae Park

2 debugging messages were just commented out for normal case. Let them be activated on debug mode without explicit code modification.

Are you sure this doesn't just always send the messages to the debug log all the time now? Again, I'd just leave it alone...

#3 lore raw
Quoted 6 lines · Greg KH
Quoted 2 lines · SeongJae Park

2 debugging messages were just commented out for normal case. Let them be activated on debug mode without explicit code modification.

Are you sure this doesn't just always send the messages to the debug log all the time now? Again, I'd just leave it alone...

Yes, I sure it will not unless DEBUG defined. I tested it again.

Anyway, I know this patch makes just a little, trivial enhancement and for somebody, it would not looks like enhancement at all. In these case, I think maintainer's opinion must be respected.
Also, I agree the code as-is just works and not bad.

Thank you for reviewing and your opinion, Greg.