staging: axis-fifo: Fixes parenthesis alignment
PATCH v2 1/1 staging: axis-fifo: Fixes parenthesis alignment
This patch fixes the checks reported by checkpatch for alignment should match open parenthesis
--- drivers/staging/axis-fifo/axis-fifo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/axis-fifo/axis-fifo.c +5 -5
@@ -376,8 +376,8 @@ 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); +ioread32 (fifo->base_addr +XLLF_RDFO_OFFSET ), + read_timeout);if (ret <=0 ) {if (ret ==0 ) {
@@ -517,9 +517,9 @@ 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); +ioread32 (fifo->base_addr + +XLLF_TDFV_OFFSET ) >= words_to_write, + write_timeout);if (ret <=0 ) {if (ret ==0 ) {
Signature · 1 line
2.43.0
Quoted 24 lines · Pedro Guimarães
This patch fixes the checks reported by checkpatch for alignment should match open parenthesis
Signed-off-by Pedro Guimarães <[email protected]>--- drivers/staging/axis-fifo/axis-fifo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/staging/axis-fifo/axis-fifo.c +2
-2@@ -376,8 +376,8 @@ 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); +ioread32 (fifo->base_addr +XLLF_RDFO_OFFSET ), + read_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 522
Quoted 9 lines
drivers/staging/axis-fifo/axis-fifo.c +3
-3@@ -517,9 +517,9 @@ 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); +ioread32 (fifo->base_addr + +XLLF_TDFV_OFFSET ) >= words_to_write, + write_timeout);
Actually, I suggested to ignore the checkpatch warning, and only put the
Quoted 1 line
= thing on the line before.
In general, splitting the arguments of binary operators such as + and >= makes the code hard to read.
Also, I received this message twice (or at least two messages that looked very similar). Try not to do this, because then the recipient has to spend time checking whether they are the same or what are the differences between them.
thanks,
julia