Skip to contentSkip to conversation

staging: axis-fifo: remove tabs to align arguments

PATCH Superseded Khadija Kamran 2 participants 2 messages Mar 11, 2023 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: axis-fifo: remove tabs to align arguments

In file drivers/staging/axis-fifo/axis-fifo.c, in line 386 and 529, last argument is indented as it were an argument of the second argument. Remove tabs to align the arguments.

---
Changes in v2:
- Do not change the alignment of second argument
- Align arguments so last argument do not look like an argument of the second argument.
- Fixed two instances of the same problem

 drivers/staging/axis-fifo/axis-fifo.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/axis-fifo/axis-fifo.c +7 -7
index dfd2b357f484..fbb3ff59dc7c 100644
@@ -384,9 +384,9 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
 		mutex_lock(&fifo->read_lock);
 		ret = wait_event_interruptible_timeout(fifo->read_queue,
 			ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
-				 (read_timeout >= 0) ?
-				  msecs_to_jiffies(read_timeout) :
-				  MAX_SCHEDULE_TIMEOUT);
+			(read_timeout >= 0) ?
+			msecs_to_jiffies(read_timeout) :
+			MAX_SCHEDULE_TIMEOUT);
 
 		if (ret <= 0) {
 			if (ret == 0) {
@@ -527,10 +527,10 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
 		mutex_lock(&fifo->write_lock);
 		ret = wait_event_interruptible_timeout(fifo->write_queue,
 			ioread32(fifo->base_addr + XLLF_TDFV_OFFSET)
-				 >= words_to_write,
-				 (write_timeout >= 0) ?
-				  msecs_to_jiffies(write_timeout) :
-				  MAX_SCHEDULE_TIMEOUT);
+			>= words_to_write,
+			(write_timeout >= 0) ?
+			msecs_to_jiffies(write_timeout) :
+			MAX_SCHEDULE_TIMEOUT);
 
 		if (ret <= 0) {
 			if (ret == 0) {
Signature · 1 line
2.34.1
#1 lore raw
Quoted 1 line · Khadija Kamran

In file drivers/staging/axis-fifo/axis-fifo.c, in line 386 and 529, last

last -> the last

Quoted 1 line

argument is indented as it were an argument of the second argument.

as it -> as if it

Quoted 31 lines

Remove tabs to align the arguments.

---
Changes in v2:
- Do not change the alignment of second argument
- Align arguments so last argument do not look like an argument of the second argument.
- Fixed two instances of the same problem

 drivers/staging/axis-fifo/axis-fifo.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/axis-fifo/axis-fifo.c +3 -3
index dfd2b357f484..fbb3ff59dc7c 100644
@@ -384,9 +384,9 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
 		mutex_lock(&fifo->read_lock);
 		ret = wait_event_interruptible_timeout(fifo->read_queue,
 			ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
-				 (read_timeout >= 0) ?
-				  msecs_to_jiffies(read_timeout) :
-				  MAX_SCHEDULE_TIMEOUT);
+			(read_timeout >= 0) ?
+			msecs_to_jiffies(read_timeout) :
+			MAX_SCHEDULE_TIMEOUT);
 
 		if (ret <= 0) {
 			if (ret == 0) {

drivers/staging/axis-fifo/axis-fifo.c static ssize_t axis_fifo_write(struct file *f, const char __user *buf, · line 530

Quoted 4 lines
drivers/staging/axis-fifo/axis-fifo.c +0 -1
@@ -527,10 +527,10 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
 		mutex_lock(&fifo->write_lock);
 		ret = wait_event_interruptible_timeout(fifo->write_queue,
 			ioread32(fifo->base_addr + XLLF_TDFV_OFFSET)
-				 >= words_to_write,

There is no need to change the above line. Maybe one could argue that it should be on the line before, but it is not part of the last argument of wait_event_interruptible_timeout, so it should not be changed in this patch.

julia

Quoted 15 lines
drivers/staging/axis-fifo/axis-fifo.c +4 -4
-				 (write_timeout >= 0) ?
-				  msecs_to_jiffies(write_timeout) :
-				  MAX_SCHEDULE_TIMEOUT);
+			>= words_to_write,
+			(write_timeout >= 0) ?
+			msecs_to_jiffies(write_timeout) :
+			MAX_SCHEDULE_TIMEOUT);
 
 		if (ret <= 0) {
 			if (ret == 0) {
--

2.34.1