Skip to content

staging: iio: accel: Fix checkpatch warnings, unify style, improve readability

Svetlana Orlik outreachy 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6staging: iio: accel: adis16204: Fix 'line over 80 characters' warningdrivers/staging/iio/accel/adis16204.h+118 -410 replies
2/6staging: iio: accel: adis16203: Fix 'line over 80 characters' warningdrivers/staging/iio/accel/adis16203.h+99 -330 replies
3/6staging: iio: accel: adis16201: Fix 'line over 80 characters' warningdrivers/staging/iio/accel/adis16201.h+117 -390 replies
4/6staging: iio: accel: adis16209: Improve readabilitydrivers/staging/iio/accel/adis16209.h+39 -00 replies
5/6staging: iio: accel: adis16220: Improve readabilitydrivers/staging/iio/accel/adis16220.h+48 -00 replies
6/6staging: iio: accel: adis16240: Improve readabilitydrivers/staging/iio/accel/adis16240.h+50 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] staging: iio: accel: Fix checkpatch warnings, unify style, improve readability

Some of the .h files got many 'line over 80 characters' checkpatch warnings because of this commenting style:

#define ADIS16201_DIAG_STAT_ALARM2 BIT(9) /* Alarm 2 status: 1 = alarm active, 0 = alarm inactive */
#define ADIS16201_DIAG_STAT_ALARM1 BIT(8) /* Alarm 1 status: 1 = alarm active, 0 = alarm inactive */

Some other .h files have obviously been already corrected by moving comment into line before #define, but interlacing of comment and #defile lines with no space between them made hard to read code like this:

/* Output, temperature */
#define ADIS16209_TEMP_OUT 0x0A
/* Output, x-axis inclination */
#define ADIS16209_XINCL_OUT 0x0C
/* Output, y-axis inclination */
#define ADIS16209_YINCL_OUT 0x0E
/* Output, +/-180 vertical rotational position */
#define ADIS16209_ROT_OUT 0x10
/* Calibration, x-axis acceleration offset null */
#define ADIS16209_XACCL_NULL 0x12

This patches move comments to line before #define where it is not done yet (and where it is appropriate).
It helps to get rid of 'line over 80 characters' warnings and to unify code style.

Also, blank line is added after each #define-comment group and each section title comment to improve readability of code.

Svetlana Orlik (6):
staging: iio: accel: adis16204: Fix 'line over 80 characters' warning
staging: iio: accel: adis16203: Fix 'line over 80 characters' warning
staging: iio: accel: adis16201: Fix 'line over 80 characters' warning
staging: iio: accel: adis16209: Improve readability
staging: iio: accel: adis16220: Improve readability
staging: iio: accel: adis16240: Improve readability

 drivers/staging/iio/accel/adis16201.h | 156 ++++++++++++++++++++++++---------
 drivers/staging/iio/accel/adis16203.h | 132 +++++++++++++++++++++-------
 drivers/staging/iio/accel/adis16204.h | 159 +++++++++++++++++++++++++---------
 drivers/staging/iio/accel/adis16209.h |  39 +++++++++
 drivers/staging/iio/accel/adis16220.h |  48 ++++++++++
 drivers/staging/iio/accel/adis16240.h |  50 +++++++++++
 6 files changed, 471 insertions(+), 113 deletions(-)
Signature · 1 line
2.5.0