All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: axis-fifo: Remove parentheses in axis-fifo.c
@ 2018-10-04 10:13 Ioannis Valasakis
  2018-10-04 11:56 ` [Outreachy kernel] " Himanshu Jha
  0 siblings, 1 reply; 4+ messages in thread
From: Ioannis Valasakis @ 2018-10-04 10:13 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh

staging: axis-fifo: remove parentheses in axis-fifo.c

Remove parentheses from the end of line and conform to
the coding style guidelines. Reported by checkpatch.

Add an extra space to the function arguments to fix
indentation.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
---
 drivers/staging/axis-fifo/axis-fifo.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 63c8efd1b8db..76907ac26300 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -364,11 +364,11 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
 		 * if nothing is currently available
 		 */
 		spin_lock_irq(&fifo->read_queue_lock);
-		ret = wait_event_interruptible_lock_irq_timeout(
-			fifo->read_queue,
-			ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
-			fifo->read_queue_lock,
-			(read_timeout >= 0) ? msecs_to_jiffies(read_timeout) :
+		ret = wait_event_interruptible_lock_irq_timeout
+			(fifo->read_queue,
+			 ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
+			 fifo->read_queue_lock,
+			 (read_timeout >= 0) ? msecs_to_jiffies(read_timeout) :
 				MAX_SCHEDULE_TIMEOUT);
 		spin_unlock_irq(&fifo->read_queue_lock);
 
@@ -482,12 +482,12 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
 		 * currently enough room in the fifo
 		 */
 		spin_lock_irq(&fifo->write_queue_lock);
-		ret = wait_event_interruptible_lock_irq_timeout(
-			fifo->write_queue,
-			ioread32(fifo->base_addr + XLLF_TDFV_OFFSET)
+		ret = wait_event_interruptible_lock_irq_timeout
+			(fifo->write_queue,
+			 ioread32(fifo->base_addr + XLLF_TDFV_OFFSET)
 				>= words_to_write,
-			fifo->write_queue_lock,
-			(write_timeout >= 0) ? msecs_to_jiffies(write_timeout) :
+			 fifo->write_queue_lock,
+			 (write_timeout >= 0) ? msecs_to_jiffies(write_timeout) :
 				MAX_SCHEDULE_TIMEOUT);
 		spin_unlock_irq(&fifo->write_queue_lock);
 
-- 
2.19.0




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: axis-fifo: Remove parentheses in axis-fifo.c
  2018-10-04 10:13 [PATCH] staging: axis-fifo: Remove parentheses in axis-fifo.c Ioannis Valasakis
@ 2018-10-04 11:56 ` Himanshu Jha
  2018-10-04 12:35   ` Ioannis Valasakis
  0 siblings, 1 reply; 4+ messages in thread
From: Himanshu Jha @ 2018-10-04 11:56 UTC (permalink / raw)
  To: Ioannis Valasakis; +Cc: outreachy-kernel, gregkh

On Thu, Oct 04, 2018 at 11:13:21AM +0100, Ioannis Valasakis wrote:
> staging: axis-fifo: remove parentheses in axis-fifo.c

This line is not required. Subject already states it.

> Remove parentheses from the end of line and conform to
> the coding style guidelines. Reported by checkpatch.
> 
> Add an extra space to the function arguments to fix
> indentation.
> 
> Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
> ---

New version with changelog should be written here, just
right below the `---`

v2: fixed ... ..

Also, subject should be:

[PATCH v2] staging: axis-fifo: Remove parentheses in axis-fifo.c

I see patches being sent through Mutt and you can easily send
using `git send-email` instead.

Often times configuring Mutt to the right config is difficult
for newbies.

>  drivers/staging/axis-fifo/axis-fifo.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
> index 63c8efd1b8db..76907ac26300 100644
> --- a/drivers/staging/axis-fifo/axis-fifo.c
> +++ b/drivers/staging/axis-fifo/axis-fifo.c
> @@ -364,11 +364,11 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
>  		 * if nothing is currently available
>  		 */
>  		spin_lock_irq(&fifo->read_queue_lock);
> -		ret = wait_event_interruptible_lock_irq_timeout(
> -			fifo->read_queue,
> -			ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
> -			fifo->read_queue_lock,
> -			(read_timeout >= 0) ? msecs_to_jiffies(read_timeout) :
> +		ret = wait_event_interruptible_lock_irq_timeout
> +			(fifo->read_queue,
> +			 ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
> +			 fifo->read_queue_lock,
> +			 (read_timeout >= 0) ? msecs_to_jiffies(read_timeout) :

I don't really like this change.
But anyway, wait for the maintainer to reply.


-- 
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: axis-fifo: Remove parentheses in axis-fifo.c
  2018-10-04 11:56 ` [Outreachy kernel] " Himanshu Jha
@ 2018-10-04 12:35   ` Ioannis Valasakis
  2018-10-04 14:26     ` Himanshu Jha
  0 siblings, 1 reply; 4+ messages in thread
From: Ioannis Valasakis @ 2018-10-04 12:35 UTC (permalink / raw)
  To: Himanshu Jha; +Cc: outreachy-kernel, gregkh

On Thu, Oct 04, 2018 at 05:26:12PM +0530, Himanshu Jha wrote:
> On Thu, Oct 04, 2018 at 11:13:21AM +0100, Ioannis Valasakis wrote:
> > staging: axis-fifo: remove parentheses in axis-fifo.c
> 
> This line is not required. Subject already states it.
> 
> > Remove parentheses from the end of line and conform to
> > the coding style guidelines. Reported by checkpatch.
> > 
> > Add an extra space to the function arguments to fix
> > indentation.
> > 
> > Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
> > ---
> 
> New version with changelog should be written here, just
> right below the `---`
> 
> v2: fixed ... ..
> 
> Also, subject should be:
> 
> [PATCH v2] staging: axis-fifo: Remove parentheses in axis-fifo.c

Thank you Himanshu, I wasn't sure how I need to note that this is 
a different patch.

> 
> I see patches being sent through Mutt and you can easily send
> using `git send-email` instead.
> 

Actually it was easier for me to configure mutt with my own mail 
domain than git send-email. If you reckon that's a best practice though 
I may consider it.

> Often times configuring Mutt to the right config is difficult
> for newbies.
> 

Would you have any recommendation on setting up the 
mutt as to be helpful for my patches?

> >  drivers/staging/axis-fifo/axis-fifo.c | 20 ++++++++++----------
> >  1 file changed, 10 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
> > index 63c8efd1b8db..76907ac26300 100644
> > --- a/drivers/staging/axis-fifo/axis-fifo.c
> > +++ b/drivers/staging/axis-fifo/axis-fifo.c
> > @@ -364,11 +364,11 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
> >  		 * if nothing is currently available
> >  		 */
> >  		spin_lock_irq(&fifo->read_queue_lock);
> > -		ret = wait_event_interruptible_lock_irq_timeout(
> > -			fifo->read_queue,
> > -			ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
> > -			fifo->read_queue_lock,
> > -			(read_timeout >= 0) ? msecs_to_jiffies(read_timeout) :
> > +		ret = wait_event_interruptible_lock_irq_timeout
> > +			(fifo->read_queue,
> > +			 ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
> > +			 fifo->read_queue_lock,
> > +			 (read_timeout >= 0) ? msecs_to_jiffies(read_timeout) :
> 
> I don't really like this change.
> But anyway, wait for the maintainer to reply.
> 
> 
> -- 
> Himanshu Jha
> Undergraduate Student
> Department of Electronics & Communication
> Guru Tegh Bahadur Institute of Technology



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: axis-fifo: Remove parentheses in axis-fifo.c
  2018-10-04 12:35   ` Ioannis Valasakis
@ 2018-10-04 14:26     ` Himanshu Jha
  0 siblings, 0 replies; 4+ messages in thread
From: Himanshu Jha @ 2018-10-04 14:26 UTC (permalink / raw)
  To: Ioannis Valasakis; +Cc: outreachy-kernel, gregkh

On Thu, Oct 04, 2018 at 01:35:56PM +0100, Ioannis Valasakis wrote:
> On Thu, Oct 04, 2018 at 05:26:12PM +0530, Himanshu Jha wrote:
> > On Thu, Oct 04, 2018 at 11:13:21AM +0100, Ioannis Valasakis wrote:
> > > staging: axis-fifo: remove parentheses in axis-fifo.c
> > 
> > This line is not required. Subject already states it.
> > 
> > > Remove parentheses from the end of line and conform to
> > > the coding style guidelines. Reported by checkpatch.
> > > 
> > > Add an extra space to the function arguments to fix
> > > indentation.
> > > 
> > > Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
> > > ---
> > 
> > New version with changelog should be written here, just
> > right below the `---`
> > 
> > v2: fixed ... ..
> > 
> > Also, subject should be:
> > 
> > [PATCH v2] staging: axis-fifo: Remove parentheses in axis-fifo.c
> 
> Thank you Himanshu, I wasn't sure how I need to note that this is 
> a different patch.
> 
> > 
> > I see patches being sent through Mutt and you can easily send
> > using `git send-email` instead.
> > 
> 
> Actually it was easier for me to configure mutt with my own mail 
> domain than git send-email. If you reckon that's a best practice though 
> I may consider it.

Well, sending patches via mutt is an old way of doing things, and
I rarely see anyone using it.

> > Often times configuring Mutt to the right config is difficult
> > for newbies.
> > 
> 
> Would you have any recommendation on setting up the 
> mutt as to be helpful for my patches?

"... helpful for patches" ?
No.

It is just an email client, don't waste your time on configuring it.

On the other hand, maintainers use numerous config to test/apply and
automate patches *within* mutt. But that is not your current goal!


-- 
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-04 14:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 10:13 [PATCH] staging: axis-fifo: Remove parentheses in axis-fifo.c Ioannis Valasakis
2018-10-04 11:56 ` [Outreachy kernel] " Himanshu Jha
2018-10-04 12:35   ` Ioannis Valasakis
2018-10-04 14:26     ` Himanshu Jha

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.