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
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 '('
Name anonymous function and negotiation-callback parameters and match
declaration names to their definitions. This includes the misleading
length name of the CDB LBA argument. Types and calling conventions
remain unchanged. Use pool_type for the two private sysfs parameter names
so their declarations fit; structure fields and diagnostics keep their
existing names.
Drop redundant extern on function prototypes, retain it on objects, and
align continued arguments with the resulting opening parentheses.
Cppcheck reports funcArgNamesDifferent, funcArgNamesDifferentUnnamed.
One example:
Function 'sqa_enable_tgt' argument 1 names different: declaration
'tgt' definition 'scst_tgt'.
Checkpatch reports FUNCTION_ARGUMENTS:
function definition argument 'const struct iscsi_key *' should also
have an identifier name
Checkpatch reports AVOID_EXTERNS:
extern prototypes should be avoided in .h files
Checkpatch reports PARENTHESIS_ALIGNMENT:
Alignment should match open parenthesis
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