Skip to contentSkip to conversation

ring-buffer: remove leading spaces before tabs

PATCH In review Zhen Lei 2 participants 3 messages Jun 8, 2021 – Jun 9, 2021

Subsystems (2)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 ring-buffer: remove leading spaces before tabs

1) Run the following command to find and remove the leading spaces before tabs:
find kernel/trace/ -type f | xargs sed -r -i 's/^[ ]+\t/\t/'
2) Manually check and correct if necessary

---
 kernel/trace/ring_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ring_buffer.c +1 -1
index 833ade3d0b00..a555258556c5 100644
@@ -5887,7 +5887,7 @@ static __init int test_ringbuffer(void)
 		}
 
 		kthread_bind(rb_threads[cpu], cpu);
- 		wake_up_process(rb_threads[cpu]);
+		wake_up_process(rb_threads[cpu]);
 	}
 
 	/* Now create the rb hammer! */
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 6 lines · On Tue, 8 Jun 2021 16:10:51 +0800 Zhen Lei <[email protected]> wrote:

1) Run the following command to find and remove the leading spaces before tabs:

   find kernel/trace/ -type f | xargs sed -r -i 's/^[ ]+\t/\t/'

2) Manually check and correct if necessary

Sorry, but I do not accept whitespace changes. Clean ups like this is only welcomed if they come along with actual changes to the code around them. Otherwise, this just causes extra churn and unwelcomed work for the maintainer.

-- Steve

Quoted 17 lines
---
 kernel/trace/ring_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ring_buffer.c +1 -1
index 833ade3d0b00..a555258556c5 100644
@@ -5887,7 +5887,7 @@ static __init int test_ringbuffer(void)
 		}
 
 		kthread_bind(rb_threads[cpu], cpu);
- 		wake_up_process(rb_threads[cpu]);
+		wake_up_process(rb_threads[cpu]);
 	}
 
 	/* Now create the rb hammer! */
#2 lore raw
Quoted 8 lines · Steven Rostedt
Quoted 5 lines · On Tue, 8 Jun 2021 16:10:51 +0800 Zhen Lei <[email protected]> wrote:

1) Run the following command to find and remove the leading spaces before tabs:

   find kernel/trace/ -type f | xargs sed -r -i 's/^[ ]+\t/\t/'

2) Manually check and correct if necessary

Quoted 4 lines
Quoted 1 line

Sorry, but I do not accept whitespace changes. Clean ups like this is only welcomed if they come along with actual changes to the code around

It's the wrong way of thinking. It's like having mosquitoes in the house and killing a mosquito only when you meet it. Mosquitoes will exist for a long time, and not all mosquitoes will be killed. People who have been in the house will always face being bitten unless they don't care.

Quoted 2 lines

them. Otherwise, this just causes extra churn and unwelcomed work for the maintainer.

Yes, the changes are a little less. There is no owner for the whole kernel module. So I had to take it apart. As a programmer, since I discovered it, I had an instinctive drive to fix it. Even if it won't be accepted.

Quoted 25 lines

-- Steve

Quoted 9 lines
---
 kernel/trace/ring_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ring_buffer.c +0 -0
index 833ade3d0b00..a555258556c5 100644

kernel/trace/ring_buffer.c static __init int test_ringbuffer(void) · line 5893

Quoted 8 lines
kernel/trace/ring_buffer.c +1 -1
@@ -5887,7 +5887,7 @@ static __init int test_ringbuffer(void)
 		}
 
 		kthread_bind(rb_threads[cpu], cpu);
- 		wake_up_process(rb_threads[cpu]);
+		wake_up_process(rb_threads[cpu]);
 	}
 
 	/* Now create the rb hammer! */

.