WARNING: Improper SPDX comment style for 'scripts/hornet/gen_sig.c', please use '//' instead #55: FILE: scripts/hornet/gen_sig.c:1: +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #55: FILE: scripts/hornet/gen_sig.c:1: +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause CHECK: Prefer using the BIT macro #105: FILE: scripts/hornet/gen_sig.c:51: +#define BUF_SIZE (1 << 15) // 32 KiB WARNING: do not add new typedefs #112: FILE: scripts/hornet/gen_sig.c:58: +typedef struct { WARNING: do not add new typedefs #128: FILE: scripts/hornet/gen_sig.c:74: +typedef struct { ERROR: trailing statements should be on next line #140: FILE: scripts/hornet/gen_sig.c:86: + exit(EXIT_FAILURE); } while (0) WARNING: unnecessary whitespace before a quoted newline #159: FILE: scripts/hornet/gen_sig.c:105: + " -out newsig.p7b \n" WARNING: line length of 89 exceeds 80 columns #238: FILE: scripts/hornet/gen_sig.c:184: +static int sha256(const char *path, unsigned char out[SHA256_LEN], unsigned int *out_len) WARNING: line length of 84 exceeds 80 columns #307: FILE: scripts/hornet/gen_sig.c:253: +static void add_hash(MAP_SET *set, unsigned char *buffer, int buffer_len, int index) CHECK: spaces preferred around that '+' (ctx:VxV) #343: FILE: scripts/hornet/gen_sig.c:289: + if (!strcmp(argv[i], "-cert") && i+1 < argc) ^ CHECK: braces {} should be used on all arms of this statement #343: FILE: scripts/hornet/gen_sig.c:289: + if (!strcmp(argv[i], "-cert") && i+1 < argc) [...] + else if (!strcmp(argv[i], "-data") && i+1 < argc) [...] + else if (!strcmp(argv[i], "-key") && i+1 < argc) [...] + else if (!strcmp(argv[i], "-pass") && i+1 < argc) [...] + else if (!strcmp(argv[i], "-out") && i+1 < argc) [...] + else if (!strcmp(argv[i], "--add-skip-check")) { [...] + } else if (!strcmp(argv[i], "--add-hash") && i+1 < argc) { [...] + } else { [...] CHECK: spaces preferred around that '+' (ctx:VxV) #345: FILE: scripts/hornet/gen_sig.c:291: + else if (!strcmp(argv[i], "-data") && i+1 < argc) ^ CHECK: spaces preferred around that '+' (ctx:VxV) #347: FILE: scripts/hornet/gen_sig.c:293: + else if (!strcmp(argv[i], "-key") && i+1 < argc) ^ CHECK: spaces preferred around that '+' (ctx:VxV) #349: FILE: scripts/hornet/gen_sig.c:295: + else if (!strcmp(argv[i], "-pass") && i+1 < argc) ^ CHECK: spaces preferred around that '+' (ctx:VxV) #351: FILE: scripts/hornet/gen_sig.c:297: + else if (!strcmp(argv[i], "-out") && i+1 < argc) ^ CHECK: spaces preferred around that '+' (ctx:VxV) #356: FILE: scripts/hornet/gen_sig.c:302: + } else if (!strcmp(argv[i], "--add-hash") && i+1 < argc) { ^ WARNING: line length of 99 exceeds 80 columns #391: FILE: scripts/hornet/gen_sig.c:337: + CMS_NOCERTS | CMS_PARTIAL | CMS_BINARY | CMS_DETACHED); CHECK: Alignment should match open parenthesis #391: FILE: scripts/hornet/gen_sig.c:337: + cms_out = CMS_sign(NULL, NULL, NULL, NULL, + CMS_NOCERTS | CMS_PARTIAL | CMS_BINARY | CMS_DETACHED); WARNING: line length of 87 exceeds 80 columns #398: FILE: scripts/hornet/gen_sig.c:344: + flags = CMS_NOCERTS | CMS_PARTIAL | CMS_BINARY | CMS_NOSMIMECAP | CMS_DETACHED; WARNING: line length of 82 exceeds 80 columns #423: FILE: scripts/hornet/gen_sig.c:369: + der_len = ASN1_item_i2d((ASN1_VALUE *)set, &der, ASN1_ITEM_rptr(MAP_SET)); WARNING: line length of 140 exceeds 80 columns #478: FILE: scripts/hornet/write-sig.sh:26: + sed '/const char opts_sig/,/;/c\\tstatic const char opts_sig[] __attribute__((__aligned__(8))) = "\\\n'"$(printf '%s\n' "$SIG")"'\";' $1 total: 1 errors, 11 warnings, 9 checks, 431 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit 17c2ab52c3bb ("hornet: Introduce gen_sig") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE FILE_PATH_CHANGES GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.