Re: [PATCH] staging: axis-fifo: alignment should match opening parenthesis in axis-fifo.c

Dan Carpenter
2023-03-07T07:13:16Z

On Tue, Mar 07, 2023 at 01:52:40AM +0500, Khadija Kamran wrote:
> In file drivers/staging/axis-fifo/axis-fifo.c the alignment did not match the opening parenthesis. So, a few tabs were added to match the alignment to exactly where the parenthesis started.
>

Run checkpatch on your patches. ;)

> Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
> ---
> drivers/staging/axis-fifo/axis-fifo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
> index dfd2b357f484..6e959224add0 100644
> --- a/drivers/staging/axis-fifo/axis-fifo.c
> +++ b/drivers/staging/axis-fifo/axis-fifo.c
> @@ -383,7 +383,7 @@ 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),
> + ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
> (read_timeout >= 0) ?
> msecs_to_jiffies(read_timeout) :
> MAX_SCHEDULE_TIMEOUT);

Checkpatch is just guidelines not rules. wait_event_interruptible_timeout()
is a very long name so sometimes aligning it up with the parentheses
doesn't work very well. The most important thing is not checkpatch but
how the code looks to humans.

regards,
dan carpenter