Skip to contentSkip to conversation

staging: comedi: Fix checkpatch warning

PATCH Superseded Camille Begue 3 participants 3 messages Apr 4, 2014 Staging

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: comedi: Fix checkpatch warning

This patch is part of eudyptula challenge

---
 drivers/staging/comedi/comedi_fops.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/staging/comedi/comedi_fops.c +5 -2
index ea6dc36..0f05e87 100644
@@ -1435,13 +1435,16 @@ static int __comedi_get_user_cmd(struct comedi_device *dev,
 	s = &dev->subdevices[cmd->subdev];
 
 	if (s->type == COMEDI_SUBD_UNUSED) {
-		dev_dbg(dev->class_dev, "%d not valid subdevice\n", cmd->subdev);
+		dev_dbg(dev->class_dev,
+			"%d not valid subdevice\n",
+			cmd->subdev);
 		return -EIO;
 	}
 
 	if (!s->do_cmd || !s->do_cmdtest || !s->async) {
 		dev_dbg(dev->class_dev,
-			"subdevice %d does not support commands\n", cmd->subdev);
+			"subdevice %d does not support commands\n",
+			cmd->subdev);
 		return -EIO;
 	}
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 1 line · Camille Begue

This patch is part of eudyptula challenge

Hello Camille.

Please do not write commit log messages like this. Say what's wrong with the code, not why you did it.

Write something like:

Wrap lines > 80 columns.

drivers/staging/comedi/comedi_fops.c

Quoted 1 line
drivers/staging/comedi/comedi_fops.c +0 -0

[]

drivers/staging/comedi/comedi_fops.c static int __comedi_get_user_cmd(struct comedi_device *dev, · line 1440

Quoted 8 lines
drivers/staging/comedi/comedi_fops.c +3 -1
@@ -1435,13 +1435,16 @@ static int __comedi_get_user_cmd(struct comedi_device *dev,
 	s = &dev->subdevices[cmd->subdev];
 
 	if (s->type == COMEDI_SUBD_UNUSED) {
-		dev_dbg(dev->class_dev, "%d not valid subdevice\n", cmd->subdev);
+		dev_dbg(dev->class_dev,
+			"%d not valid subdevice\n",
+			cmd->subdev);

If you really want to fix > 80 column lines, it'd be better to keep the dev_dbg and format on the same line

1 2 3 4 5 6 7 8
12345678901234567890123456789012345678901234567890123456789012345678901234567890

		dev_dbg(dev->class_dev, "%d not valid subdevice\n",
			cmd->subdev);

drivers/staging/comedi/comedi_fops.c static int __comedi_get_user_cmd(struct comedi_device *dev, · line 1450

Quoted 11 lines
drivers/staging/comedi/comedi_fops.c +2 -1
 		return -EIO;
 	}
 
 	if (!s->do_cmd || !s->do_cmdtest || !s->async) {
 		dev_dbg(dev->class_dev,
-			"subdevice %d does not support commands\n", cmd->subdev);
+			"subdevice %d does not support commands\n",
+			cmd->subdev);
 		return -EIO;
 	}
 

here too

#2 lore raw
In reply to Camille Begue
Quoted 2 lines · Camille Begue

This patch is part of eudyptula challenge

The changelog should mention something about lines over 80 characte long.

Quoted 10 lines
---
 drivers/staging/comedi/comedi_fops.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/staging/comedi/comedi_fops.c +0 -0
index ea6dc36..0f05e87 100644

drivers/staging/comedi/comedi_fops.c static int __comedi_get_user_cmd(struct comedi_device *dev, · line 1440

Quoted 7 lines
drivers/staging/comedi/comedi_fops.c +3 -1
@@ -1435,13 +1435,16 @@ static int __comedi_get_user_cmd(struct comedi_device *dev,
 	s = &dev->subdevices[cmd->subdev];
 
 	if (s->type == COMEDI_SUBD_UNUSED) {
-		dev_dbg(dev->class_dev, "%d not valid subdevice\n", cmd->subdev);
+		dev_dbg(dev->class_dev,
+			"%d not valid subdevice\n",
+			cmd->subdev);

Do this instead:

		dev_dbg(dev->class_dev, "%d not valid subdevice\n",
			cmd->subdev);

drivers/staging/comedi/comedi_fops.c static int __comedi_get_user_cmd(struct comedi_device *dev, · line 1443

Quoted 3 lines
drivers/staging/comedi/comedi_fops.c +0 -0
 		return -EIO;
 	}
 

regards,
dan carpenter