staging: iio: light: Add breaks to lengthy lines
Subsystems (3)
PATCH 1/1 staging: iio: light: Add breaks to lengthy lines
This fixes three instances of checkpatch warning:
WARNING: line over 80 characters
--- drivers/staging/iio/light/tsl2x7x.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/staging/iio/light/tsl2x7x.c +6 -3
@@ -1441,7 +1441,8 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void *private)static struct attribute *tsl2x7x_ALS_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,
@@ -1455,7 +1456,8 @@ static struct attribute *tsl2x7x_PRX_device_attrs[] = {static struct attribute *tsl2x7x_ALSPRX_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,
@@ -1471,7 +1473,8 @@ static struct attribute *tsl2x7x_PRX2_device_attrs[] = {static struct attribute *tsl2x7x_ALSPRX2_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,
Signature · 1 line
2.15.1
Quoted 4 lines · On Sun, 7 Jan 2018 15:08:01 +0000 George Edward Bulmer…
This fixes three instances of checkpatch warning:
WARNING: line over 80 charactersSigned-off-by George Edward Bulmer <[email protected]>
Applied, thanks,
Jonathan
Quoted 38 lines
--- drivers/staging/iio/light/tsl2x7x.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)drivers/staging/iio/light/tsl2x7x.c +6
-3@@ -1441,7 +1441,8 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void *private)static struct attribute *tsl2x7x_ALS_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,@@ -1455,7 +1456,8 @@ static struct attribute *tsl2x7x_PRX_device_attrs[] = {static struct attribute *tsl2x7x_ALSPRX_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,@@ -1471,7 +1473,8 @@ static struct attribute *tsl2x7x_PRX2_device_attrs[] = {static struct attribute *tsl2x7x_ALSPRX2_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,
Quoted 9 lines · Jonathan Cameron
Quoted 4 lines · On Sun, 7 Jan 2018 15:08:01 +0000 George Edward Bulmer…
This fixes three instances of checkpatch warning:
WARNING: line over 80 charactersSigned-off-by George Edward Bulmer <[email protected]>Applied, thanks,
I believe these are examples of long line conversions that should not be applied.
Most of the problem here is the very long identifier naming. 57 character identifiers are pretty unnecessary.
Quoted 41 lines
Jonathan
Quoted 38 lines
--- drivers/staging/iio/light/tsl2x7x.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)drivers/staging/iio/light/tsl2x7x.c +6
-3@@ -1441,7 +1441,8 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void *private)static struct attribute *tsl2x7x_ALS_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,@@ -1455,7 +1456,8 @@ static struct attribute *tsl2x7x_PRX_device_attrs[] = {static struct attribute *tsl2x7x_ALSPRX_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,@@ -1471,7 +1473,8 @@ static struct attribute *tsl2x7x_PRX2_device_attrs[] = {static struct attribute *tsl2x7x_ALSPRX2_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,
Jonathan Cameron
maintainerQuoted 7 lines · On Sun, 07 Jan 2018 08:42:27 -0800 Joe Perches <[email protected]> wrote:
Quoted 6 lines · Jonathan Cameron
Quoted 3 lines · On Sun, 7 Jan 2018 15:08:01 +0000 George Edward Bulmer…
This fixes three instances of checkpatch warning:
WARNING: line over 80 characters
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by George Edward Bulmer <[email protected]>Applied, thanks,
I believe these are examples of long line conversions that should not be applied.
On this one I disagree. The line breaks don't hurt readability so aren't a problem. The benefit is admittedly small, however we are adding churn in a fairly safe place - this stuff rarely changes.
Quoted 3 lines
Most of the problem here is the very long identifier naming. 57 character identifiers are pretty unnecessary.
The long line is because the name is encoding a very specific thing and personally I would rather not have to guess what a shorter abbreviation meant for the cost of saving a few characters in a filename.
Of course, we could deliberately use a different name for the sysfs file from the value used for the identifier in the code, but that would result in complexity just to reduce the line length.
This particular one is close to the most pathological case in the IIO ABI though :)
It is possible to change to the code constructed version of the same thing, but that's a rather more involved change and one we haven't commonly done. (using the .read_avail callbacks in IIO).
Jonathan
Quoted 46 lines
Quoted 32 lines
Jonathan
Quoted 30 lines
--- drivers/staging/iio/light/tsl2x7x.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)drivers/staging/iio/light/tsl2x7x.c +4
-2@@ -1441,7 +1441,8 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void *private)static struct attribute *tsl2x7x_ALS_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,@@ -1455,7 +1456,8 @@ static struct attribute *tsl2x7x_PRX_device_attrs[] = {static struct attribute *tsl2x7x_ALSPRX_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,@@ -1471,7 +1473,8 @@ static struct attribute *tsl2x7x_PRX2_device_attrs[] = {Quoted 10 lines
drivers/staging/iio/light/tsl2x7x.c static struct attribute *tsl2x7x_PRX2_device_attrs[] = { · line 1480
Quoted 8 lines
drivers/staging/iio/light/tsl2x7x.c +2
-1static struct attribute *tsl2x7x_ALSPRX2_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr, &dev_attr_in_illuminance0_target_input.attr, &dev_attr_in_illuminance0_calibrate.attr, &dev_attr_in_illuminance0_lux_table.attr,--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 14 lines · Jonathan Cameron
Quoted 11 lines · On Sun, 07 Jan 2018 08:42:27 -0800 Joe Perches <[email protected]> wrote:
Quoted 9 lines · Jonathan Cameron
Quoted 4 lines · On Sun, 7 Jan 2018 15:08:01 +0000 George Edward Bulmer…
This fixes three instances of checkpatch warning:
WARNING: line over 80 charactersSigned-off-by George Edward Bulmer <[email protected]>Applied, thanks,
Quoted 7 lines
Quoted 2 lines
I believe these are examples of long line conversions that should not be applied.
On this one I disagree. The line breaks don't hurt readability so aren't a problem. The benefit is admittedly small, however we are adding churn in a fairly safe place - this stuff rarely changes.
They do hurt read
ability.
Checkpatch.pl should maybe have a special case to not complain if the last variable in the line is over 40 characters long. I didn't realize that we had LONG_LINE_COMMENT. Does that mean we don't complain if comment goes over 80 characters?
regards,
dan carpenter
Quoted 23 lines · Dan Carpenter
Quoted 14 lines · Jonathan Cameron
Quoted 11 lines · On Sun, 07 Jan 2018 08:42:27 -0800 Joe Perches <[email protected]> wrote:
Quoted 9 lines · Jonathan Cameron
Quoted 4 lines · On Sun, 7 Jan 2018 15:08:01 +0000 George Edward Bulmer…
This fixes three instances of checkpatch warning:
WARNING: line over 80 charactersSigned-off-by George Edward Bulmer <[email protected]>Applied, thanks,
Quoted 7 lines
Quoted 2 lines
I believe these are examples of long line conversions that should not be applied.
On this one I disagree. The line breaks don't hurt readability so aren't a problem. The benefit is admittedly small, however we are adding churn in a fairly safe place - this stuff rarely changes.
Quoted 7 lines
They do hurt read
ability.Checkpatch.pl should maybe have a special case to not complain if the last variable in the line is over 40 characters long. I didn't realize that we had
LONG_LINE_COMMENT. Does that mean we don't complain if comment goes over 80 characters?
No. It's just an extra classifier.
It means that long lines with comments that
exceed 80 columns can be ignored by using the
command line argument
--ignore=long_line_comment
Quoted 13 lines · George Edward Bulmer
This fixes three instances of checkpatch warning:
WARNING: line over 80 charactersSigned-off-by George Edward Bulmer <[email protected]>--- drivers/staging/iio/light/tsl2x7x.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)drivers/staging/iio/light/tsl2x7x.c +0
-0
drivers/staging/iio/light/tsl2x7x.c static irqreturn_t tsl2x7x_event_handler(int irq, void *private) · line 1445
Quoted 6 lines
drivers/staging/iio/light/tsl2x7x.c +2
-1@@ -1441,7 +1441,8 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void *private)static struct attribute *tsl2x7x_ALS_device_attrs[] = { &dev_attr_in_illuminance0_calibscale_available.attr, - &iio_const_attr_in_illuminance0_integration_time_available.dev_attr.attr, + &iio_const_attr_in_illuminance0_integration_time_available + .dev_attr.attr,
Ugh. No. The original was better.
regards,
dan carpenter