Staging: comedi: Fix long line lengths in comedi_fops.c
PATCH 1/1 Staging: comedi: Fix long line lengths in comedi_fops.c
This patch fixes lots of long line lengths in comedi_fops.c found by checkpatch.pl
--- drivers/staging/comedi/comedi_fops.c | 38 ++++++++++++++++++++++----------- 1 files changed, 25 insertions(+), 13 deletions(-)
drivers/staging/comedi/comedi_fops.c +25 -13
@@ -962,7 +962,8 @@ static int do_insn_ioctl(struct comedi_device *dev,if (ret <0 ) goto error;if (insn.insn &INSN_MASK_READ ) { -if (copy_to_user (insn.data, data, insn.n *sizeof (unsigned int ))) { +if (copy_to_user + (insn.data, data, insn.n *sizeof (unsigned int ))) { ret = -EFAULT ; goto error; }
@@ -1070,7 +1071,9 @@ static int do_cmd_ioctl(struct comedi_device *dev, }/* make sure each element in channel/gain list is valid */ - ret =comedi_check_chanlist (s, async->cmd.chanlist_len, async->cmd.chanlist); + ret =comedi_check_chanlist (s, + async->cmd.chanlist_len, + async->cmd.chanlist);if (ret <0 ) {DPRINTK ("bad chanlist\n" ); goto cleanup;
@@ -2119,8 +2122,8 @@ int comedi_alloc_board_minor(struct device *hardware_device)kfree (info->device);kfree (info);printk (KERN_ERR - -"comedi: error: ran out of minor numbers for board device files.\n" ); +"comedi: error: " +"ran out of minor numbers for board device files.\n" );return -EBUSY ; } info->device->minor = i;
@@ -2133,7 +2136,8 @@ int comedi_alloc_board_minor(struct device *hardware_device) retval =device_create_file (csdev, &dev_attr_max_read_buffer_kb);if (retval) {printk (KERN_ERR -"comedi: failed to create sysfs attribute file \"%s\".\n" , +"comedi: " +"failed to create sysfs attribute file \"%s\".\n" , dev_attr_max_read_buffer_kb.attr.name);comedi_free_board_minor (i);return retval;
@@ -2141,7 +2145,8 @@ int comedi_alloc_board_minor(struct device *hardware_device) retval =device_create_file (csdev, &dev_attr_read_buffer_kb);if (retval) {printk (KERN_ERR -"comedi: failed to create sysfs attribute file \"%s\".\n" , +"comedi: " +"failed to create sysfs attribute file \"%s\".\n" , dev_attr_read_buffer_kb.attr.name);comedi_free_board_minor (i);return retval;
@@ -2149,7 +2154,8 @@ int comedi_alloc_board_minor(struct device *hardware_device) retval =device_create_file (csdev, &dev_attr_max_write_buffer_kb);if (retval) {printk (KERN_ERR -"comedi: failed to create sysfs attribute file \"%s\".\n" , +"comedi: " +"failed to create sysfs attribute file \"%s\".\n" , dev_attr_max_write_buffer_kb.attr.name);comedi_free_board_minor (i);return retval;
@@ -2157,7 +2163,8 @@ int comedi_alloc_board_minor(struct device *hardware_device) retval =device_create_file (csdev, &dev_attr_write_buffer_kb);if (retval) {printk (KERN_ERR -"comedi: failed to create sysfs attribute file \"%s\".\n" , +"comedi: " +"failed to create sysfs attribute file \"%s\".\n" , dev_attr_write_buffer_kb.attr.name);comedi_free_board_minor (i);return retval;
@@ -2216,7 +2223,8 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev,if (i ==COMEDI_NUM_MINORS ) {kfree (info);printk (KERN_ERR -"comedi: error: ran out of minor numbers for board device files.\n" ); +"comedi: error: " +"ran out of minor numbers for board device files.\n" );return -EBUSY ; } s->minor = i;
@@ -2230,7 +2238,8 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev, retval =device_create_file (csdev, &dev_attr_max_read_buffer_kb);if (retval) {printk (KERN_ERR -"comedi: failed to create sysfs attribute file \"%s\".\n" , +"comedi: " +"failed to create sysfs attribute file \"%s\".\n" , dev_attr_max_read_buffer_kb.attr.name);comedi_free_subdevice_minor (s);return retval;
@@ -2238,7 +2247,8 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev, retval =device_create_file (csdev, &dev_attr_read_buffer_kb);if (retval) {printk (KERN_ERR -"comedi: failed to create sysfs attribute file \"%s\".\n" , +"comedi: " +"failed to create sysfs attribute file \"%s\".\n" , dev_attr_read_buffer_kb.attr.name);comedi_free_subdevice_minor (s);return retval;
@@ -2246,7 +2256,8 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev, retval =device_create_file (csdev, &dev_attr_max_write_buffer_kb);if (retval) {printk (KERN_ERR -"comedi: failed to create sysfs attribute file \"%s\".\n" , +"comedi: " +"failed to create sysfs attribute file \"%s\".\n" , dev_attr_max_write_buffer_kb.attr.name);comedi_free_subdevice_minor (s);return retval;
@@ -2254,7 +2265,8 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev, retval =device_create_file (csdev, &dev_attr_write_buffer_kb);if (retval) {printk (KERN_ERR -"comedi: failed to create sysfs attribute file \"%s\".\n" , +"comedi: " +"failed to create sysfs attribute file \"%s\".\n" , dev_attr_write_buffer_kb.attr.name);comedi_free_subdevice_minor (s);return retval;
Signature · 1 line
1.7.0.5
Hello Mark,
Quoted 13 lines · Mark
This patch fixes lots of long line lengths in
comedi_fops.cfound by checkpatch.plSigned-off-by Mark Rankilor <[email protected]>--- drivers/staging/comedi/comedi_fops.c | 38 ++++++++++++++++++++++----------- 1 files changed, 25 insertions(+), 13 deletions(-)drivers/staging/comedi/comedi_fops.c +0
-0
drivers/staging/comedi/comedi_fops.c static int do_insn_ioctl(struct comedi_device *dev, · line 966
Quoted 6 lines
drivers/staging/comedi/comedi_fops.c +2
-1@@ -962,7 +962,8 @@ static int do_insn_ioctl(struct comedi_device *dev,if (ret <0 ) goto error;if (insn.insn &INSN_MASK_READ ) { -if (copy_to_user (insn.data, data, insn.n *sizeof (unsigned int ))) { +if (copy_to_user + (insn.data, data, insn.n *sizeof (unsigned int ))) {
I think it'd be better to keep the opening parenthesis on the same line of the function and maybe the first argument, too.
Quoted 5 lines
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
Signature · 1 line
Charles Clément
2010/5/10 Charles Clément <[email protected]>:
Quoted 2 lines
I think it'd be better to keep the opening parenthesis on the same line of the function and maybe the first argument, too.
Charles, I agree with you here. I did it this way since there is a very similar line in the code paragraph above it, so I figured I'd stay consistent.
I'll revisit this and change both of them to be in the style you suggested.
Cheers,
Mark