All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] staging: iio: accel: Fix checkpatch warnings, unify style, improve readability
@ 2016-03-22 15:05 Svetlana Orlik
  2016-03-22 15:07 ` [PATCH 1/6] staging: iio: accel: adis16204: Fix 'line over 80 characters' warning Svetlana Orlik
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Svetlana Orlik @ 2016-03-22 15:05 UTC (permalink / raw)
  To: outreachy-kernel

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(-)

-- 
2.5.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-22 15:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-22 15:05 [PATCH 0/6] staging: iio: accel: Fix checkpatch warnings, unify style, improve readability Svetlana Orlik
2016-03-22 15:07 ` [PATCH 1/6] staging: iio: accel: adis16204: Fix 'line over 80 characters' warning Svetlana Orlik
2016-03-22 15:08 ` [PATCH 2/6] staging: iio: accel: adis16203: " Svetlana Orlik
2016-03-22 15:08 ` [PATCH 3/6] staging: iio: accel: adis16201: " Svetlana Orlik
2016-03-22 15:09 ` [PATCH 4/6] staging: iio: accel: adis16209: Improve readability Svetlana Orlik
2016-03-22 15:09 ` [PATCH 5/6] staging: iio: accel: adis16220: " Svetlana Orlik
2016-03-22 15:10 ` [PATCH 6/6] staging: iio: accel: adis16240: " Svetlana Orlik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.