Commit Graph
9 Commits
Author SHA1 Message Date
Gleb Chesnokov db3fe3de3d scst: Identify existing source licenses with SPDX identifiers
Add SPDX identifiers matching explicit existing grants: GPL-2.0-only,
GPL-2.0-or-later, or the GPL version 2 / Linux-OpenIB choice. Preserve
all original copyright and license notices, including the MD5 type
header.

Linux-OpenIB identifies the two BSD conditions with the MIT disclaimer;
BSD-2-Clause would not describe that text. The three one-line userspace
debug inclusion files identify the GPL-2.0-only source they contain.
Leave ambiguous or absent version grants for a provenance decision. This
identifies existing licenses and does not change their terms.

Checkpatch reports SPDX_LICENSE_TAG:

  Missing or malformed SPDX-License-Identifier tag in line 1
2026-10-22 14:30:26 +03:00
Gleb Chesnokov ec2e02306f scst: Normalize userspace indentation and line wrapping
Normalize userspace indentation, operator spacing, pointer placement,
continuation alignment and long declarations, calls and expressions.
Keep changes at existing argument/operator boundaries and retain
literal contents, operand evaluation order and preprocessor branches.
Keep conditional directives at column zero; align their continued
operands independently.

Checkpatch reports SPACING, CODE_INDENT, POINTER_LOCATION. One example:

  No space is necessary after a cast

Checkpatch reports SUSPECT_CODE_INDENT:

  suspect code indent for conditional statements (24, 40)

Checkpatch reports SPACING, PARENTHESIS_ALIGNMENT, LINE_SPACING. One
example:

  spaces preferred around that '|' (ctx:VxV)

Checkpatch reports BLOCK_COMMENT_STYLE, OPEN_BRACE. One example:

  Block comments use * on subsequent lines

Checkpatch reports INDENTED_LABEL, PARENTHESIS_ALIGNMENT. One example:

  labels should not be indented

Checkpatch reports PARENTHESIS_ALIGNMENT, SWITCH_CASE_INDENT_LEVEL. One
example:

  Alignment should match open parenthesis

Checkpatch reports LONG_LINE:

  line length of 125 exceeds 100 columns

Checkpatch reports OPEN_ENDED_LINE:

  Lines should not end with a '('
2026-10-22 14:30:26 +03:00
Gleb Chesnokov 81856f13b0 scst: Simplify pointer tests and redundant condition grouping
Use direct pointer truth tests, put scalar constants on the right and
remove redundant parentheses from conditions and address expressions.
Preserve required precedence, dereferenced-pointer semantics and
short-circuit evaluation. Keep preprocessor expressions and disabled
debug alternatives intact.

Use __func__ for unchanged parameter-error diagnostics and correct the
byte-order diagnostic spelling.

Source review also identified eight negated negative-index tests in
the daemon's parameter lookup chains. Use explicit >= 0 comparisons
while retaining assignment order and short-circuit evaluation. This
readability cleanup does not remove assignment-in-condition findings.

Checkpatch reports COMPARISON_TO_NULL:

  Comparison to NULL could be written "target"

Checkpatch reports UNNECESSARY_PARENTHESES:

  Unnecessary parentheses around tlv->value

Checkpatch reports CONSTANT_COMPARISON, COMPARISON_TO_NULL. One example:

  Comparisons should place the constant on the right side of the test

Checkpatch reports CONSTANT_COMPARISON, EMBEDDED_FUNCTION_NAME,
TYPO_SPELLING. One example:

  Comparisons should place the constant on the right side of the test
2026-10-22 14:30:26 +03:00
Gleb Chesnokov 0e69b797c4 scst: Avoid shadowed names and overwritten initializers
Use distinct names for parser arguments, local descriptors, trace flags
and iSNS send/receive transaction IDs. Rename the process-wide SRPT RDMA
listener so connection-specific IDs do not shadow it.

Remove initial values replaced unconditionally before use and the
impossible fgets NULL branch. Retain configuration-dependent
initializers, listener lifetime and every connection ID passed to RDMA
operations.

Cppcheck reports shadowArgument, redundantInitialization. One example:

  Local variable 'pp' shadows outer argument

Cppcheck reports shadowVariable, unreadVariable. One example:

  Argument 'trace_flag' shadows outer variable
2026-10-22 14:30:26 +03:00
Gleb Chesnokov 7d991169e0 scst: Remove identical userspace sync and trace branches
Coccinelle misc/cond_no_effect.cocci reports:

  usr/include/debug.c:121:1-3:
  WARNING: possible condition with no effect (if == else)

Buffer tracing prints the same final line whether or not a full row has
already been printed. Remove that conditional and its unused j state.

Also remove the identical immediate/non-immediate branches in fileio
cache synchronization. Both branches already call exec_fsync, so retain
that call and the TODO for future background execution. This second
cleanup was found while reviewing the same pattern; it is not a separate
finding in the current report.

The trace output and synchronous cache-flush behavior are unchanged.
2026-10-20 18:02:29 +03:00
Vladislav Bolkhovitin f549829482 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-04-12 03:49:10 +00:00
Vladislav Bolkhovitin 68fa7e1a0d Copyright updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 03:19:52 +00:00
Vladislav Bolkhovitin fa2f54ac9e Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6787 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-01-22 04:04:43 +00:00
Vladislav Bolkhovitin ae38d284e0 Explicit ALUA user space
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6579 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-06 03:40:37 +00:00