mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: Khadija <kamrankhadijadj@gmail.com>,
	outreachy@lists.linux.dev, linux-staging@lists.linux.dev,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: axis-fifo: alignment should match opening parenthesis in axis-fifo.c
Date: Tue, 7 Mar 2023 11:02:55 +0300	[thread overview]
Message-ID: <78d1ea82-ef18-42b2-8a8e-27ee3c7ad55f@kili.mountain> (raw)
In-Reply-To: <ab0fd80-22c-d982-2f4-6fa5f43f858@inria.fr>

On Tue, Mar 07, 2023 at 08:49:55AM +0100, Julia Lawall wrote:
> 
> 
> On Tue, 7 Mar 2023, Khadija wrote:
> 
> > Hey Julia! Thank you for the feedback. I will make the following changes and
> > resend the patch:
> > 1. Correct the patch description that is right under the subject line (make
> > it precise and imperative) and make sure that it does not have more than 70
> > characters per line.
> > 2. Adjust all the arguments of wait_event_interruptible_timeout so that they
> > are lined up. All of them should begin right under ( .
> 
> The problem here is that the ( is really far to the right.  My opinion is
> that the position of the second argument (ie the first one that is on a
> line of its own) is ok in this case.  So you can leave that one where it
> is and line up the other one.
> 

I kind of like lining things up like this.  I think if you can't align
things with the parens, then it's nice to at least use two tabs.  It's
not kernel style or anyone's style explicitly, but I kind of like it.

It doesn't make checkpatch happy.

I guess I probably wouldn't bother sending this patch.  To controversial.
I'd just move on to something else.  It's not like there is a shortage
of stuff to do.  One idea in this file is that you could use
sysfs_emit() in sysfs_read() and get rid of char tmp[32]; buffer.

regards,
dan carpenter

diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index dfd2b357f484..0bf180cf44a6 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -383,10 +383,10 @@ 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);
+				ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
+				(read_timeout >= 0) ?
+					msecs_to_jiffies(read_timeout) :
+					MAX_SCHEDULE_TIMEOUT);
 
 		if (ret <= 0) {
 			if (ret == 0) {

  reply	other threads:[~2023-03-07  8:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 20:52 Khadija Kamran
2023-03-06 21:08 ` Julia Lawall
     [not found]   ` <CACcTnM5GR0ZM5WBaL+BDEK_0QJGr6h2t4tnsnjerHta_nq6Tmg@mail.gmail.com>
2023-03-07  7:49     ` Julia Lawall
2023-03-07  8:02       ` Dan Carpenter [this message]
2023-03-07  8:07         ` Julia Lawall
2023-03-07  8:14           ` Dan Carpenter
     [not found]       ` <CACcTnM4OHFiGrEez6dMzd4jO4YuQZzqpUK86UBMzhd+nFDWezA@mail.gmail.com>
2023-03-07  8:13         ` Julia Lawall
2023-03-10 16:01           ` Khadija Kamran
2023-03-11  8:56             ` Julia Lawall
2023-03-11  9:21               ` Khadija Kamran
2023-03-07  7:13 ` Dan Carpenter
     [not found]   ` <CACcTnM5kVTG3JaLK9mjaOO7qcXoTrb4xsg2af5Ac1ScqFfbjTg@mail.gmail.com>
2023-03-07  8:18     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=78d1ea82-ef18-42b2-8a8e-27ee3c7ad55f@kili.mountain \
    --to=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@inria.fr \
    --cc=kamrankhadijadj@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®