[PATCH RESEND 0/3] style improvement patches for few source files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alexander Nezhinsky <alexandern@xxxxxxxxxxxx>

This is a series of patches for a few "main" sources files.
It fixes the style errors and warnings detected by the curent version
of scripts/checkpatch.pl.

I strived to fix all errors and warnings with 2 exceptions.
First, when the format is long and eprintf statment is indented it
either violates the 80 char line limitation or the format string
must be split.

Another ignored warning is about returning errno codes from the program.
The checker stipulates returning negative values which is the kernel
convention, while in user space the convention used most often is
to return -1 from functions and set errno variable to a positive value.
This problem exists only for tgtadm, as it returns positive errno values,
either explicitely or by returning the global errno after actual errors -
throughout its entire source file.
tgtd returns 1 on any error.

Thus i used the following command:
scripts/checkpatch.pl --ignore SPLIT_STRING,USE_NEGATIVE_ERRNO
   --show-types -f <src_file>

One warning left unhandled is about const char * array "prog_name"
in tgtd.c. If done as recommended, it conflicts with log_init() definition.
This will be addressed in another patch to be sent soon, which would
treat log_init separately, incl. other aspects.

Alexander Nezhinsky (3):
  style fixes in tgtd.c
  style fixes for target.c
  style fixes for tgtadm.c

 usr/target.c |  199 ++++++++++++++++++++++++++++++++----------------------
 usr/tgtadm.c |  214 ++++++++++++++++++++++++++++++++--------------------------
 usr/tgtd.c   |   51 +++++++-------
 3 files changed, 265 insertions(+), 199 deletions(-)

-- 
1.7.9.6

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux