LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues
@ 2015-10-12 17:03 Ian Abbott
  2015-10-12 17:03 ` [PATCH 1/2] staging: comedi: comedidev.h: add comments to spin-lock and mutex Ian Abbott
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ian Abbott @ 2015-10-12 17:03 UTC (permalink / raw
  To: driverdev-devel
  Cc: Greg Kroah-Hartman, Ian Abbott, H Hartley Sweeten, linux-kernel

Fix some checkpatch issues in "comedidev.h".  There are still some
CamelCase warnings, but since those are for the use of "mA" and it
represents "milliamps", I think I'll leave them alone.

1) staging: comedi: comedidev.h: add comments to spin-lock and mutex
2) staging: comedi: comedidev.h: spaces preferred around that '*'

 drivers/staging/comedi/comedidev.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

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

* [PATCH 1/2] staging: comedi: comedidev.h: add comments to spin-lock and mutex
  2015-10-12 17:03 [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues Ian Abbott
@ 2015-10-12 17:03 ` Ian Abbott
  2015-10-12 17:03 ` [PATCH 2/2] staging: comedi: comedidev.h: spaces preferred around that '*' Ian Abbott
  2015-10-12 17:22 ` [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues Hartley Sweeten
  2 siblings, 0 replies; 5+ messages in thread
From: Ian Abbott @ 2015-10-12 17:03 UTC (permalink / raw
  To: driverdev-devel
  Cc: Greg Kroah-Hartman, Ian Abbott, H Hartley Sweeten, linux-kernel

Fix the checkpatch.pl issues:

CHECK: spinlock_t definition without comment
CHECK: struct mutes definition withoug comment

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/comedidev.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 6062493..7a62e97 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -174,7 +174,7 @@ struct comedi_subdevice {
 	void *lock;
 	void *busy;
 	unsigned runflags;
-	spinlock_t spin_lock;
+	spinlock_t spin_lock;	/* generic spin-lock for COMEDI and drivers */
 
 	unsigned int io_bits;
 
@@ -537,8 +537,8 @@ struct comedi_device {
 	const void *board_ptr;
 	bool attached:1;
 	bool ioenabled:1;
-	spinlock_t spinlock;
-	struct mutex mutex;
+	spinlock_t spinlock;	/* generic spin-lock for low-level driver */
+	struct mutex mutex;	/* generic mutex for COMEDI core */
 	struct rw_semaphore attach_lock;
 	struct kref refcount;
 
-- 
2.6.1


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

* [PATCH 2/2] staging: comedi: comedidev.h: spaces preferred around that '*'
  2015-10-12 17:03 [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues Ian Abbott
  2015-10-12 17:03 ` [PATCH 1/2] staging: comedi: comedidev.h: add comments to spin-lock and mutex Ian Abbott
@ 2015-10-12 17:03 ` Ian Abbott
  2015-10-12 17:22 ` [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues Hartley Sweeten
  2 siblings, 0 replies; 5+ messages in thread
From: Ian Abbott @ 2015-10-12 17:03 UTC (permalink / raw
  To: driverdev-devel
  Cc: Greg Kroah-Hartman, Ian Abbott, H Hartley Sweeten, linux-kernel

Fix the checkpatch.pl issues:

CHECK: spaces preferred around that '*' (ctx:VxV)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/comedidev.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 7a62e97..1158072 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -580,12 +580,12 @@ int comedi_check_chanlist(struct comedi_subdevice *s,
 
 /* range stuff */
 
-#define RANGE(a, b)		{(a)*1e6, (b)*1e6, 0}
-#define RANGE_ext(a, b)		{(a)*1e6, (b)*1e6, RF_EXTERNAL}
-#define RANGE_mA(a, b)		{(a)*1e6, (b)*1e6, UNIT_mA}
-#define RANGE_unitless(a, b)	{(a)*1e6, (b)*1e6, 0}
-#define BIP_RANGE(a)		{-(a)*1e6, (a)*1e6, 0}
-#define UNI_RANGE(a)		{0, (a)*1e6, 0}
+#define RANGE(a, b)		{(a) * 1e6, (b) * 1e6, 0}
+#define RANGE_ext(a, b)		{(a) * 1e6, (b) * 1e6, RF_EXTERNAL}
+#define RANGE_mA(a, b)		{(a) * 1e6, (b) * 1e6, UNIT_mA}
+#define RANGE_unitless(a, b)	{(a) * 1e6, (b) * 1e6, 0}
+#define BIP_RANGE(a)		{-(a) * 1e6, (a) * 1e6, 0}
+#define UNI_RANGE(a)		{0, (a) * 1e6, 0}
 
 extern const struct comedi_lrange range_bipolar10;
 extern const struct comedi_lrange range_bipolar5;
-- 
2.6.1


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

* RE: [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues
  2015-10-12 17:03 [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues Ian Abbott
  2015-10-12 17:03 ` [PATCH 1/2] staging: comedi: comedidev.h: add comments to spin-lock and mutex Ian Abbott
  2015-10-12 17:03 ` [PATCH 2/2] staging: comedi: comedidev.h: spaces preferred around that '*' Ian Abbott
@ 2015-10-12 17:22 ` Hartley Sweeten
  2015-10-12 17:25   ` Greg Kroah-Hartman
  2 siblings, 1 reply; 5+ messages in thread
From: Hartley Sweeten @ 2015-10-12 17:22 UTC (permalink / raw
  To: Ian Abbott, driverdev-devel@linuxdriverproject.org
  Cc: Greg Kroah-Hartman, linux-kernel@vger.kernel.org

On Monday, October 12, 2015 10:03 AM, Ian Abbott wrote:
> Fix some checkpatch issues in "comedidev.h".  There are still some
> CamelCase warnings, but since those are for the use of "mA" and it
> represents "milliamps", I think I'll leave them alone.
>
> 1) staging: comedi: comedidev.h: add comments to spin-lock and mutex
> 2) staging: comedi: comedidev.h: spaces preferred around that '*'
>
>  drivers/staging/comedi/comedidev.h | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)

Thanks!

Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Ian,

Just a comment...

The checkpaatch.pl noise about "mA" defines are a bit annoying but
I agree that those defines are clearer than "{foo}_milliamps".

But, even though they don't cause a CamelCase warning for some
Reason, the "RANGE_ext" and "RANGE_unitless" could be renamed
to "RANGE_EXT" (or RANGE_EXTERNAL for clarity) and "RANGE_UNITLESS".
There is currently only 1 driver that uses RANGE_unitless and 5 that use
RANGE_ext.

Regards,
Hartley


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

* Re: [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues
  2015-10-12 17:22 ` [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues Hartley Sweeten
@ 2015-10-12 17:25   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-12 17:25 UTC (permalink / raw
  To: Hartley Sweeten
  Cc: Ian Abbott, driverdev-devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org

On Mon, Oct 12, 2015 at 05:22:29PM +0000, Hartley Sweeten wrote:
> On Monday, October 12, 2015 10:03 AM, Ian Abbott wrote:
> > Fix some checkpatch issues in "comedidev.h".  There are still some
> > CamelCase warnings, but since those are for the use of "mA" and it
> > represents "milliamps", I think I'll leave them alone.
> >
> > 1) staging: comedi: comedidev.h: add comments to spin-lock and mutex
> > 2) staging: comedi: comedidev.h: spaces preferred around that '*'
> >
> >  drivers/staging/comedi/comedidev.h | 18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> Thanks!
> 
> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> 
> Ian,
> 
> Just a comment...
> 
> The checkpaatch.pl noise about "mA" defines are a bit annoying but
> I agree that those defines are clearer than "{foo}_milliamps".

I agree, checkpatch is just a "hint", feel free to ignore it when it
says stupid things.  Like this.

thanks,

greg k-h

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

end of thread, other threads:[~2015-10-12 17:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-12 17:03 [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues Ian Abbott
2015-10-12 17:03 ` [PATCH 1/2] staging: comedi: comedidev.h: add comments to spin-lock and mutex Ian Abbott
2015-10-12 17:03 ` [PATCH 2/2] staging: comedi: comedidev.h: spaces preferred around that '*' Ian Abbott
2015-10-12 17:22 ` [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues Hartley Sweeten
2015-10-12 17:25   ` Greg Kroah-Hartman

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 read-only IMAP folder(s) and NNTP newsgroup(s).