All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] staging: iio: ad9850.c: fix checkpatch.pl error
@ 2014-06-28  1:46 Guillaume Morin
  2014-06-28  2:09 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 7+ messages in thread
From: Guillaume Morin @ 2014-06-28  1:46 UTC (permalink / raw)
  To: Jonathan Cameron, Greg Kroah-Hartman, Sachin Kamat
  Cc: Guillaume Morin, linux-iio, linux-kernel

v2: add missing Signed-off-by 

Signed-off-by: Guillaume Morin <guillaume@morinfr.org>

diff --git a/drivers/staging/iio/frequency/ad9850.c b/drivers/staging/iio/frequency/ad9850.c
index af877ff..6183670 100644
--- a/drivers/staging/iio/frequency/ad9850.c
+++ b/drivers/staging/iio/frequency/ad9850.c
@@ -21,7 +21,7 @@
 
 #define DRV_NAME "ad9850"
 
-#define value_mask (u16)0xf000
+#define value_mask ((u16)0xf000)
 #define addr_shift 12
 
 /* Register format: 4 bits addr + 12 bits value */
-- 
1.7.10.4


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

* Re: [PATCH v2 1/1] staging: iio: ad9850.c: fix checkpatch.pl error
  2014-06-28  1:46 [PATCH v2 1/1] staging: iio: ad9850.c: fix checkpatch.pl error Guillaume Morin
@ 2014-06-28  2:09 ` Greg Kroah-Hartman
  2014-06-28  2:30   ` Guillaume Morin
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-28  2:09 UTC (permalink / raw)
  To: Guillaume Morin; +Cc: Jonathan Cameron, Sachin Kamat, linux-iio, linux-kernel

On Sat, Jun 28, 2014 at 03:46:56AM +0200, Guillaume Morin wrote:
> v2: add missing Signed-off-by 

That doesn't go here.

And what checkpatch error did you fix?  And are you sure it needs to be
fixed?

greg k-h

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

* Re: [PATCH v2 1/1] staging: iio: ad9850.c: fix checkpatch.pl error
  2014-06-28  2:09 ` Greg Kroah-Hartman
@ 2014-06-28  2:30   ` Guillaume Morin
  2014-06-28  2:37     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 7+ messages in thread
From: Guillaume Morin @ 2014-06-28  2:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Guillaume Morin, Jonathan Cameron, Sachin Kamat, linux-iio, linux-kernel

On 27 Jun 19:09, Greg Kroah-Hartman wrote:
> > v2: add missing Signed-off-by 
> 
> That doesn't go here.

I guess I am struggling to get git send-email do what I want

> And what checkpatch error did you fix?  And are you sure it needs to be
> fixed?

That's what I changed:

$ scripts/checkpatch.pl -f drivers/staging/iio/frequency/ad9850.c
ERROR: Macros with complex values should be enclosed in parenthesis
#24: FILE: drivers/staging/iio/frequency/ad9850.c:24:
+#define value_mask (u16)0xf000

I assumed that if it was reported as an error, it needed to be fixed...

-- 
Guillaume Morin <guillaume@morinfr.org>

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

* Re: [PATCH v2 1/1] staging: iio: ad9850.c: fix checkpatch.pl error
  2014-06-28  2:30   ` Guillaume Morin
@ 2014-06-28  2:37     ` Greg Kroah-Hartman
  2014-06-28  3:10       ` Guillaume Morin
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-28  2:37 UTC (permalink / raw)
  To: Guillaume Morin, Jonathan Cameron, Sachin Kamat, linux-iio, linux-kernel

On Sat, Jun 28, 2014 at 04:30:09AM +0200, Guillaume Morin wrote:
> On 27 Jun 19:09, Greg Kroah-Hartman wrote:
> > > v2: add missing Signed-off-by 
> > 
> > That doesn't go here.
> 
> I guess I am struggling to get git send-email do what I want

Put that below the --- line.

> > And what checkpatch error did you fix?  And are you sure it needs to be
> > fixed?
> 
> That's what I changed:
> 
> $ scripts/checkpatch.pl -f drivers/staging/iio/frequency/ad9850.c
> ERROR: Macros with complex values should be enclosed in parenthesis

Then why didn't you say that :)

> I assumed that if it was reported as an error, it needed to be fixed...

Use your judgement, checkpatch is a tool, it isn't always correct.

greg k-h

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

* Re: [PATCH v2 1/1] staging: iio: ad9850.c: fix checkpatch.pl error
  2014-06-28  2:37     ` Greg Kroah-Hartman
@ 2014-06-28  3:10       ` Guillaume Morin
  2014-06-28  6:35         ` Michael Welling
  2014-06-28  7:00         ` Michael Welling
  0 siblings, 2 replies; 7+ messages in thread
From: Guillaume Morin @ 2014-06-28  3:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Guillaume Morin, Jonathan Cameron, Sachin Kamat, linux-iio, linux-kernel

On 27 Jun 22:37, Greg Kroah-Hartman wrote:
> Put that below the --- line.

Will do.

> > > And what checkpatch error did you fix?  And are you sure it needs to be
> > > fixed?
> > 
> > That's what I changed:
> > 
> > $ scripts/checkpatch.pl -f drivers/staging/iio/frequency/ad9850.c
> > ERROR: Macros with complex values should be enclosed in parenthesis
> 
> Then why didn't you say that :)

Well it was not totally clear to me if that was obvious or not.  Anyway,
I'll mention it in the future.

> 
> > I assumed that if it was reported as an error, it needed to be fixed...
> 
> Use your judgement, checkpatch is a tool, it isn't always correct.

Right, I guess it's borderline.  Should I resend the patch or just drop
it?

Guillaume.

-- 
Guillaume Morin <guillaume@morinfr.org>

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

* Re: [PATCH v2 1/1] staging: iio: ad9850.c: fix checkpatch.pl error
  2014-06-28  3:10       ` Guillaume Morin
@ 2014-06-28  6:35         ` Michael Welling
  2014-06-28  7:00         ` Michael Welling
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Welling @ 2014-06-28  6:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Guillaume Morin, Jonathan Cameron,
	Sachin Kamat, linux-iio, linux-kernel

On Sat, Jun 28, 2014 at 05:10:46AM +0200, Guillaume Morin wrote:
> On 27 Jun 22:37, Greg Kroah-Hartman wrote:
> > Put that below the --- line.
> 
> Will do.
> 
> > > > And what checkpatch error did you fix?  And are you sure it needs to be
> > > > fixed?
> > > 
> > > That's what I changed:
> > > 
> > > $ scripts/checkpatch.pl -f drivers/staging/iio/frequency/ad9850.c
> > > ERROR: Macros with complex values should be enclosed in parenthesis
> > 
> > Then why didn't you say that :)
> 
> Well it was not totally clear to me if that was obvious or not.  Anyway,
> I'll mention it in the future.
> 
> > 
> > > I assumed that if it was reported as an error, it needed to be fixed...
> > 
> > Use your judgement, checkpatch is a tool, it isn't always correct.
> 
> Right, I guess it's borderline.  Should I resend the patch or just drop
> it?

These days we have GENMASK.
 
http://lxr.free-electrons.com/source/include/linux/bitops.h#L21
 
Maybe the macro can be used directly instead of the value_mask.

> 
> Guillaume.
> 
> -- 
> Guillaume Morin <guillaume@morinfr.org>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 1/1] staging: iio: ad9850.c: fix checkpatch.pl error
  2014-06-28  3:10       ` Guillaume Morin
  2014-06-28  6:35         ` Michael Welling
@ 2014-06-28  7:00         ` Michael Welling
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Welling @ 2014-06-28  7:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Guillaume Morin, Jonathan Cameron,
	Sachin Kamat, linux-iio, linux-kernel

Looking at the driver the define you are fixing isn't even used.
So it could be removed.

While you are at it you may want to remove the peice of completey
redundant code.

.
.
        if (ret)
                goto error_ret;
error_ret:
.
.

Wow.

On Sat, Jun 28, 2014 at 05:10:46AM +0200, Guillaume Morin wrote:
> On 27 Jun 22:37, Greg Kroah-Hartman wrote:
> > Put that below the --- line.
> 
> Will do.
> 
> > > > And what checkpatch error did you fix?  And are you sure it needs to be
> > > > fixed?
> > > 
> > > That's what I changed:
> > > 
> > > $ scripts/checkpatch.pl -f drivers/staging/iio/frequency/ad9850.c
> > > ERROR: Macros with complex values should be enclosed in parenthesis
> > 
> > Then why didn't you say that :)
> 
> Well it was not totally clear to me if that was obvious or not.  Anyway,
> I'll mention it in the future.
> 
> > 
> > > I assumed that if it was reported as an error, it needed to be fixed...
> > 
> > Use your judgement, checkpatch is a tool, it isn't always correct.
> 
> Right, I guess it's borderline.  Should I resend the patch or just drop
> it?
> 
> Guillaume.
> 
> -- 
> Guillaume Morin <guillaume@morinfr.org>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-06-28  7:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-28  1:46 [PATCH v2 1/1] staging: iio: ad9850.c: fix checkpatch.pl error Guillaume Morin
2014-06-28  2:09 ` Greg Kroah-Hartman
2014-06-28  2:30   ` Guillaume Morin
2014-06-28  2:37     ` Greg Kroah-Hartman
2014-06-28  3:10       ` Guillaume Morin
2014-06-28  6:35         ` Michael Welling
2014-06-28  7:00         ` Michael Welling

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.