staging: iio: accel: Fix checkpatch warnings, unify style, improve readability
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | staging: iio: accel: adis16204: Fix 'line over 80 characters' warningdrivers/ | +118 | 0 replies | |
| 2/6 | staging: iio: accel: adis16203: Fix 'line over 80 characters' warningdrivers/ | +99 | 0 replies | |
| 3/6 | staging: iio: accel: adis16201: Fix 'line over 80 characters' warningdrivers/ | +117 | 0 replies | |
| 4/6 | staging: iio: accel: adis16209: Improve readabilitydrivers/ | +39 | 0 replies | |
| 5/6 | staging: iio: accel: adis16220: Improve readabilitydrivers/ | +48 | 0 replies | |
| 6/6 | staging: iio: accel: adis16240: Improve readabilitydrivers/ | +50 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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