linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: comedi: fix redundant parens in return in amplc_dio200_common.c
@ 2014-12-18 15:32 Aapo Vienamo
  2014-12-18 22:45 ` Jeremiah Mahler
  0 siblings, 1 reply; 5+ messages in thread
From: Aapo Vienamo @ 2014-12-18 15:32 UTC (permalink / raw)
  To: abbotti, hsweeten, gregkh; +Cc: devel, linux-kernel, aapo.vienamo

This patch fixes a coding style issue found by the checkpatch.pl tool in
amplc_dio200_common.c by removing the unnecessary parentheses around the
expression in a return statement.

Signed-off-by: Aapo Vienamo <aapo.vienamo@iki.fi>
---
 drivers/staging/comedi/drivers/amplc_dio200_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c b/drivers/staging/comedi/drivers/amplc_dio200_common.c
index 26aad70..6eadbbe 100644
--- a/drivers/staging/comedi/drivers/amplc_dio200_common.c
+++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c
@@ -340,7 +340,7 @@ static int dio200_handle_read_intr(struct comedi_device *dev,
 
 	comedi_handle_events(dev, s);
 
-	return (triggered != 0);
+	return triggered != 0;
 }
 
 static int dio200_subdev_intr_cancel(struct comedi_device *dev,
-- 
2.0.4


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

* Re: [PATCH] Staging: comedi: fix redundant parens in return in amplc_dio200_common.c
  2014-12-18 15:32 [PATCH] Staging: comedi: fix redundant parens in return in amplc_dio200_common.c Aapo Vienamo
@ 2014-12-18 22:45 ` Jeremiah Mahler
  2014-12-19 10:37   ` Aapo Vienamo
  0 siblings, 1 reply; 5+ messages in thread
From: Jeremiah Mahler @ 2014-12-18 22:45 UTC (permalink / raw)
  To: Aapo Vienamo; +Cc: abbotti, hsweeten, gregkh, devel, linux-kernel

Aapo,

On Thu, Dec 18, 2014 at 05:32:52PM +0200, Aapo Vienamo wrote:
> This patch fixes a coding style issue found by the checkpatch.pl tool in
> amplc_dio200_common.c by removing the unnecessary parentheses around the
> expression in a return statement.
> 
> Signed-off-by: Aapo Vienamo <aapo.vienamo@iki.fi>
> ---
>  drivers/staging/comedi/drivers/amplc_dio200_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c b/drivers/staging/comedi/drivers/amplc_dio200_common.c
> index 26aad70..6eadbbe 100644
> --- a/drivers/staging/comedi/drivers/amplc_dio200_common.c
> +++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c
> @@ -340,7 +340,7 @@ static int dio200_handle_read_intr(struct comedi_device *dev,
>  
>  	comedi_handle_events(dev, s);
>  
> -	return (triggered != 0);
> +	return triggered != 0;
>  }
>  
[...]

When I run checkpatch.pl it doesn't find any errors and the parenthesis
haven't been removed.  How are you running checkpatch.pl?  Are you using
any extra options?

-- 
- Jeremiah Mahler

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

* Re: [PATCH] Staging: comedi: fix redundant parens in return in amplc_dio200_common.c
  2014-12-18 22:45 ` Jeremiah Mahler
@ 2014-12-19 10:37   ` Aapo Vienamo
  2014-12-19 14:13     ` Jeremiah Mahler
  0 siblings, 1 reply; 5+ messages in thread
From: Aapo Vienamo @ 2014-12-19 10:37 UTC (permalink / raw)
  To: Jeremiah Mahler, abbotti, hsweeten, gregkh, devel, linux-kernel

On Thu, Dec 18, 2014 at 02:45:01PM -0800, Jeremiah Mahler wrote:
> Aapo,
> 
> On Thu, Dec 18, 2014 at 05:32:52PM +0200, Aapo Vienamo wrote:
> > This patch fixes a coding style issue found by the checkpatch.pl tool in
> > amplc_dio200_common.c by removing the unnecessary parentheses around the
> > expression in a return statement.
> > 
> > Signed-off-by: Aapo Vienamo <aapo.vienamo@iki.fi>
> > ---
> >  drivers/staging/comedi/drivers/amplc_dio200_common.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c b/drivers/staging/comedi/drivers/amplc_dio200_common.c
> > index 26aad70..6eadbbe 100644
> > --- a/drivers/staging/comedi/drivers/amplc_dio200_common.c
> > +++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c
> > @@ -340,7 +340,7 @@ static int dio200_handle_read_intr(struct comedi_device *dev,
> >  
> >  	comedi_handle_events(dev, s);
> >  
> > -	return (triggered != 0);
> > +	return triggered != 0;
> >  }
> >  
> [...]
> 
> When I run checkpatch.pl it doesn't find any errors and the parenthesis
> haven't been removed.  How are you running checkpatch.pl?  Are you using
> any extra options?

It looks like that I accidentally ran the file trough an older version
of checkpatch.pl. The error for this case was quieted in commit 
5b9553a (checkpatch: make "return is not a function" test quieter).

Sorry for the noise.

- Aapo Vienamo

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

* Re: [PATCH] Staging: comedi: fix redundant parens in return in amplc_dio200_common.c
  2014-12-19 10:37   ` Aapo Vienamo
@ 2014-12-19 14:13     ` Jeremiah Mahler
  2014-12-19 21:07       ` Aapo Vienamo
  0 siblings, 1 reply; 5+ messages in thread
From: Jeremiah Mahler @ 2014-12-19 14:13 UTC (permalink / raw)
  To: Aapo Vienamo; +Cc: linux-kernel

Aapo,

On Fri, Dec 19, 2014 at 12:37:16PM +0200, Aapo Vienamo wrote:
> On Thu, Dec 18, 2014 at 02:45:01PM -0800, Jeremiah Mahler wrote:
> > Aapo,
> > 
> > On Thu, Dec 18, 2014 at 05:32:52PM +0200, Aapo Vienamo wrote:
> > > This patch fixes a coding style issue found by the checkpatch.pl tool in
> > > amplc_dio200_common.c by removing the unnecessary parentheses around the
> > > expression in a return statement.
> > > 
> > > Signed-off-by: Aapo Vienamo <aapo.vienamo@iki.fi>
> > > ---
> > >  drivers/staging/comedi/drivers/amplc_dio200_common.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c b/drivers/staging/comedi/drivers/amplc_dio200_common.c
> > > index 26aad70..6eadbbe 100644
> > > --- a/drivers/staging/comedi/drivers/amplc_dio200_common.c
> > > +++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c
> > > @@ -340,7 +340,7 @@ static int dio200_handle_read_intr(struct comedi_device *dev,
> > >  
> > >  	comedi_handle_events(dev, s);
> > >  
> > > -	return (triggered != 0);
> > > +	return triggered != 0;
> > >  }
> > >  
> > [...]
> > 
> > When I run checkpatch.pl it doesn't find any errors and the parenthesis
> > haven't been removed.  How are you running checkpatch.pl?  Are you using
> > any extra options?
> 
> It looks like that I accidentally ran the file trough an older version
> of checkpatch.pl. The error for this case was quieted in commit 
> 5b9553a (checkpatch: make "return is not a function" test quieter).
> 
> Sorry for the noise.
> 
> - Aapo Vienamo

If you are looking for something easy to fix have a look in

  drivers/staging/rtl8192u/

There are lots of checkpatch errors to fix in there.

-- 
- Jeremiah Mahler

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

* Re: [PATCH] Staging: comedi: fix redundant parens in return in amplc_dio200_common.c
  2014-12-19 14:13     ` Jeremiah Mahler
@ 2014-12-19 21:07       ` Aapo Vienamo
  0 siblings, 0 replies; 5+ messages in thread
From: Aapo Vienamo @ 2014-12-19 21:07 UTC (permalink / raw)
  To: Jeremiah Mahler, linux-kernel

On Fri, Dec 19, 2014 at 06:13:10AM -0800, Jeremiah Mahler wrote:
> Aapo,
> 
> On Fri, Dec 19, 2014 at 12:37:16PM +0200, Aapo Vienamo wrote:
> > On Thu, Dec 18, 2014 at 02:45:01PM -0800, Jeremiah Mahler wrote:
> > > Aapo,
> > > 
> > > On Thu, Dec 18, 2014 at 05:32:52PM +0200, Aapo Vienamo wrote:
> > > > This patch fixes a coding style issue found by the checkpatch.pl tool in
> > > > amplc_dio200_common.c by removing the unnecessary parentheses around the
> > > > expression in a return statement.
> > > > 
> > > > Signed-off-by: Aapo Vienamo <aapo.vienamo@iki.fi>
> > > > ---
> > > >  drivers/staging/comedi/drivers/amplc_dio200_common.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c b/drivers/staging/comedi/drivers/amplc_dio200_common.c
> > > > index 26aad70..6eadbbe 100644
> > > > --- a/drivers/staging/comedi/drivers/amplc_dio200_common.c
> > > > +++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c
> > > > @@ -340,7 +340,7 @@ static int dio200_handle_read_intr(struct comedi_device *dev,
> > > >  
> > > >  	comedi_handle_events(dev, s);
> > > >  
> > > > -	return (triggered != 0);
> > > > +	return triggered != 0;
> > > >  }
> > > >  
> > > [...]
> > > 
> > > When I run checkpatch.pl it doesn't find any errors and the parenthesis
> > > haven't been removed.  How are you running checkpatch.pl?  Are you using
> > > any extra options?
> > 
> > It looks like that I accidentally ran the file trough an older version
> > of checkpatch.pl. The error for this case was quieted in commit 
> > 5b9553a (checkpatch: make "return is not a function" test quieter).
> > 
> > Sorry for the noise.
> > 
> > - Aapo Vienamo
> 
> If you are looking for something easy to fix have a look in
> 
>   drivers/staging/rtl8192u/
> 
> There are lots of checkpatch errors to fix in there.
> 
> -- 
> - Jeremiah Mahler

I'll look into those.
Thanks!

- Aapo Vienamo

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

end of thread, other threads:[~2014-12-19 21:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-18 15:32 [PATCH] Staging: comedi: fix redundant parens in return in amplc_dio200_common.c Aapo Vienamo
2014-12-18 22:45 ` Jeremiah Mahler
2014-12-19 10:37   ` Aapo Vienamo
2014-12-19 14:13     ` Jeremiah Mahler
2014-12-19 21:07       ` Aapo Vienamo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).