Skip to contentSkip to conversation

Staging: comedi: comedidev.h: fix checkpatch code style issue

PATCH In review Dzonatans Melgalvis 3 participants 3 messages Aug 5, 2014 – Aug 6, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: comedi: comedidev.h: fix checkpatch code style issue

Fixing checkpatch warning - blank line missing after declaration.

---
 drivers/staging/comedi/comedidev.h | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/staging/comedi/comedidev.h +6 -0
index 58e58a3..c9b7978 100644
@@ -57,6 +57,7 @@ struct comedi_subdevice {
 	const unsigned int *maxdata_list;	/* list is channel specific */
 
 	const struct comedi_lrange *range_table;
+
 	const struct comedi_lrange *const *range_table_list;
 
 	unsigned int *chanlist;	/* driver-owned chanlist (not used) */
@@ -207,8 +208,10 @@ struct comedi_async {
 	struct comedi_cmd cmd;
 	wait_queue_head_t wait_head;
 	unsigned int cb_mask;
+
 	int (*inttrig)(struct comedi_device *dev, struct comedi_subdevice *s,
 		       unsigned int x);
+
 };
 
 struct comedi_driver {
@@ -216,13 +219,16 @@ struct comedi_driver {
 
 	const char *driver_name;
 	struct module *module;
+
 	int (*attach)(struct comedi_device *, struct comedi_devconfig *);
 	void (*detach)(struct comedi_device *);
 	int (*auto_attach)(struct comedi_device *, unsigned long);
 
 	/* number of elements in board_name and board_id arrays */
 	unsigned int num_names;
+
 	const char *const *board_name;
+
 	/* offset in bytes from one board name pointer to the next */
 	int offset;
 };
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 12 lines · Dzonatans Melgalvis

Fixing checkpatch warning - blank line missing after declaration.

---
 drivers/staging/comedi/comedidev.h | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/staging/comedi/comedidev.h +0 -0
index 58e58a3..c9b7978 100644

drivers/staging/comedi/comedidev.h struct comedi_subdevice { · line 61

Quoted 5 lines
drivers/staging/comedi/comedidev.h +1 -0
@@ -57,6 +57,7 @@ struct comedi_subdevice {
 	const unsigned int *maxdata_list;	/* list is channel specific */
 
 	const struct comedi_lrange *range_table;
+
 	const struct comedi_lrange *const *range_table_list;

Really? Why add that one? Shouldn't you just remove the previous line?

drivers/staging/comedi/comedidev.h struct comedi_async { · line 215

Quoted 11 lines
drivers/staging/comedi/comedidev.h +2 -0
 	unsigned int *chanlist;	/* driver-owned chanlist (not used) */
@@ -207,8 +208,10 @@ struct comedi_async {
 	struct comedi_cmd cmd;
 	wait_queue_head_t wait_head;
 	unsigned int cb_mask;
+
 	int (*inttrig)(struct comedi_device *dev, struct comedi_subdevice *s,
 		       unsigned int x);
+
 };

Why is that last line needed?

Please use your judgement with checkpatch fixes, this patch isn't ok as-is, sorry.

greg k-h

#2 lore raw
In reply to Dzonatans Melgalvis
Quoted 1 line · Dzonatans Melgalvis

Fixing checkpatch warning - blank line missing after declaration.

These are false positives from a previous version of checkpatch. Please use the version in -next instead. No errors are reported with that version.

Quoted 45 lines
---
 drivers/staging/comedi/comedidev.h | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/staging/comedi/comedidev.h +6 -0
index 58e58a3..c9b7978 100644
@@ -57,6 +57,7 @@ struct comedi_subdevice {
 	const unsigned int *maxdata_list;	/* list is channel specific */
 
 	const struct comedi_lrange *range_table;
+
 	const struct comedi_lrange *const *range_table_list;
 
 	unsigned int *chanlist;	/* driver-owned chanlist (not used) */
@@ -207,8 +208,10 @@ struct comedi_async {
 	struct comedi_cmd cmd;
 	wait_queue_head_t wait_head;
 	unsigned int cb_mask;
+
 	int (*inttrig)(struct comedi_device *dev, struct comedi_subdevice *s,
 		       unsigned int x);
+
 };
 
 struct comedi_driver {
@@ -216,13 +219,16 @@ struct comedi_driver {
 
 	const char *driver_name;
 	struct module *module;
+
 	int (*attach)(struct comedi_device *, struct comedi_devconfig *);
 	void (*detach)(struct comedi_device *);
 	int (*auto_attach)(struct comedi_device *, unsigned long);
 
 	/* number of elements in board_name and board_id arrays */
 	unsigned int num_names;
+
 	const char *const *board_name;
+
 	/* offset in bytes from one board name pointer to the next */
 	int offset;
 };