* [PATCH v2] staging: axis-fifo: Fixes parenthesis alignment
@ 2024-03-09 16:39 Pedro Guimarães
0 siblings, 0 replies; 3+ messages in thread
From: Pedro Guimarães @ 2024-03-09 16:39 UTC (permalink / raw)
To: gregkh, outreachy
This patch fixes the checks reported by checkpatch
for alignment should match open parenthesis
Signed-off-by: Pedro Guimarães <moisespedro15@gmail.com>
---
drivers/staging/axis-fifo/axis-fifo.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index c51818c56dd2..600d81043946 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -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) {
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] staging: axis-fifo: Fixes parenthesis alignment
@ 2024-03-09 16:40 Pedro Guimarães
2024-03-09 16:45 ` Julia Lawall
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Guimarães @ 2024-03-09 16:40 UTC (permalink / raw)
To: gregkh, outreachy
This patch fixes the checks reported by checkpatch
for alignment should match open parenthesis
Signed-off-by: Pedro Guimarães <moisespedro15@gmail.com>
---
drivers/staging/axis-fifo/axis-fifo.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index c51818c56dd2..600d81043946 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -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) {
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] staging: axis-fifo: Fixes parenthesis alignment
2024-03-09 16:40 Pedro Guimarães
@ 2024-03-09 16:45 ` Julia Lawall
0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2024-03-09 16:45 UTC (permalink / raw)
To: Pedro Guimarães; +Cc: gregkh, outreachy
[-- Attachment #1: Type: text/plain, Size: 1835 bytes --]
On Sat, 9 Mar 2024, Pedro Guimarães wrote:
> This patch fixes the checks reported by checkpatch
> for alignment should match open parenthesis
>
> Signed-off-by: Pedro Guimarães <moisespedro15@gmail.com>
> ---
> drivers/staging/axis-fifo/axis-fifo.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
> index c51818c56dd2..600d81043946 100644
> --- a/drivers/staging/axis-fifo/axis-fifo.c
> +++ b/drivers/staging/axis-fifo/axis-fifo.c
> @@ -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);
Actually, I suggested to ignore the checkpatch warning, and only put the
>= 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-09 16:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-09 16:39 [PATCH v2] staging: axis-fifo: Fixes parenthesis alignment Pedro Guimarães
-- strict thread matches above, loose matches on Subject: below --
2024-03-09 16:40 Pedro Guimarães
2024-03-09 16:45 ` Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.