Files
scst/usr
Gleb Chesnokov 05c1cb23f8 iscsi-scstd: Evaluate private helper operands once
Replace SCN flag, iSNS header, list and CRC macros with typed inline
helpers that evaluate their inputs once. Preserve SCN bit reversal and
htonl(), header ntohs(), list mutation order and CRC arithmetic. The
big-endian SCN helper returns its input.

Decode only the header fields each handler consumes; retain full
decoding for diagnostics and keep TLV bounds checks before reading SCN
attributes. This also removes unused decoded fields and their unused
attributes.

Native Checkpatch reports MACRO_ARG_REUSE for SCN flags, iSNS header
extraction, list initialization/removal and CRC byte updates:
  Macro argument reuse 'hdr' - possible side-effects?
  Macro argument reuse 'crc' - possible side-effects?
It also reports MACRO_ARG_UNUSED for the big-endian SCN no-op macro.

Checkpatch reports PREFER_DEFINED_ATTRIBUTE_MACRO:
  __always_unused or __maybe_unused is preferred over
  __attribute__((__unused__))
2026-10-21 22:12:25 +03:00
..