Attention is currently required from: Hoernchen. Jenkins Builder has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437?usp=email )
Change subject: add fw update crcstub ...................................................................... Patch Set 2: (77 comments) File crc_code.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/15f90874_759170a9?usp=email : PS2, Line 15: static uint32_t open brace '{' following function definitions go on the next line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/1aee2197_6d3c3e1a?usp=email : PS2, Line 17: uint32_t crc = 0xFFFFFFFF; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/37544bda_d177ad31?usp=email : PS2, Line 18: for (uint32_t i = 0; i < length; i++) { please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/f99076b1_d7c5a84a?usp=email : PS2, Line 18: for (uint32_t i = 0; i < length; i++) { suspect code indent for conditional statements (2, 4) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4e361820_f3884bbf?usp=email : PS2, Line 19: crc ^= data[i]; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/b0796bf9_63a90432?usp=email : PS2, Line 20: for (uint8_t j = 0; j < 8; j++) { please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c8c42d30_87054509?usp=email : PS2, Line 20: for (uint8_t j = 0; j < 8; j++) { suspect code indent for conditional statements (4, 6) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/98e338c0_2d82e5e2?usp=email : PS2, Line 20: for (uint8_t j = 0; j < 8; j++) { braces {} are not necessary for single statement blocks Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/2950362d_0c9b59ab?usp=email : PS2, Line 22: } please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c480cb1b_4c03ae73?usp=email : PS2, Line 23: } please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/949aaf98_fefe17b2?usp=email : PS2, Line 24: return ~crc; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/2781e21b_4e987524?usp=email : PS2, Line 28: __attribute__((used, section(".crc_code"), OPTNONE)) void Reset_Handler(void) { open brace '{' following function definitions go on the next line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/33a76edb_4ad3d1ce?usp=email : PS2, Line 29: extern uint32_t __CRC_Checksum; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/640a7939_d71b285d?usp=email : PS2, Line 30: extern uint32_t __CRC_Start; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/b67b240b_c822530a?usp=email : PS2, Line 31: extern uint32_t __CRC_End; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/28f1652c_027227c0?usp=email : PS2, Line 32: extern int main(void); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/1f1efaec_c197923b?usp=email : PS2, Line 39: USB->DEVICE.CTRLA.reg = 0x1; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/01f3505d_3bcbfdd1?usp=email : PS2, Line 41: uint32_t length = (uint32_t)&__CRC_End - (uint32_t)&__CRC_Start; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/43ff9bed_aed1e279?usp=email : PS2, Line 42: uint32_t calculated_crc = calculate_crc((uint8_t *)&__CRC_Start, length); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/09d993cd_fbfcd1ce?usp=email : PS2, Line 43: uint32_t expected_crc = *(uint32_t *)&__CRC_Checksum; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/6d4d6128_a0f93786?usp=email : PS2, Line 45: if (calculated_crc != expected_crc) { please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/8798a5eb_0d39adfd?usp=email : PS2, Line 45: if (calculated_crc != expected_crc) { suspect code indent for conditional statements (2, 4) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d08eedd8_07c42ee5?usp=email : PS2, Line 46: static volatile uint32_t *dfu_magic = (uint32_t *)HSRAM_ADDR; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/e44a047e_08799268?usp=email : PS2, Line 47: *dfu_magic = 0x44465521; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/8f50502b_796bab3b?usp=email : PS2, Line 50: __DSB(); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/48440387_b0a550d6?usp=email : PS2, Line 51: SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/0a0c66e9_a9e9ecf8?usp=email : PS2, Line 53: __DSB(); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/99e8b7d3_07bc07c8?usp=email : PS2, Line 54: } please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/51fcd2d7_dd7f7a93?usp=email : PS2, Line 58: _Reset_Handler(); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/61621b19_a5d677b1?usp=email : PS2, Line 61: while (1) please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/f8341e38_f4a170a1?usp=email : PS2, Line 61: while (1) suspect code indent for conditional statements (2, 4) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/41a2a2d7_f8c7490c?usp=email : PS2, Line 62: ; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/65a7c2d3_a2ff3b80?usp=email : PS2, Line 73: int main(int argc, char *argv[]) { open brace '{' following function definitions go on the next line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/aa21fe02_a07ca3c4?usp=email : PS2, Line 74: if (argc != 4) { please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/9aad9f89_ba74a2b6?usp=email : PS2, Line 74: if (argc != 4) { suspect code indent for conditional statements (2, 4) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4bdec083_6cd559d5?usp=email : PS2, Line 75: fprintf(stderr, "Usage: %s <binary_file> <start_offset_hex> <length_hex>\n", argv[0]); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/857b0761_f530fbb6?usp=email : PS2, Line 76: return 1; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/00ce415e_b775e93d?usp=email : PS2, Line 77: } please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/8a5e859b_c4c10e11?usp=email : PS2, Line 79: const char *filename = argv[1]; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/638e2aa7_6e440d02?usp=email : PS2, Line 82: uint32_t start_offset = strtoul(argv[2], NULL, 10); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/05d750f2_937b553e?usp=email : PS2, Line 83: uint32_t length = strtoul(argv[3], NULL, 10); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/57cb1b94_1e3cad28?usp=email : PS2, Line 85: FILE *f = fopen(filename, "rb"); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/7495e10b_df6a8859?usp=email : PS2, Line 86: if (!f) { please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/85dd1800_03334d19?usp=email : PS2, Line 86: if (!f) { suspect code indent for conditional statements (2, 4) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d20cf73e_ff11ed8d?usp=email : PS2, Line 87: perror("fopen"); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/71471b9e_910875c1?usp=email : PS2, Line 88: return 1; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/2ea771c0_58c6dafe?usp=email : PS2, Line 89: } please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/85312c46_a42d0da1?usp=email : PS2, Line 92: if (fseek(f, (long)start_offset, SEEK_SET) != 0) { please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/1b512bd7_0addadbc?usp=email : PS2, Line 92: if (fseek(f, (long)start_offset, SEEK_SET) != 0) { suspect code indent for conditional statements (2, 4) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/93662ad6_1334fb6d?usp=email : PS2, Line 93: perror("fseek"); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/a4491659_9b4566d2?usp=email : PS2, Line 94: fclose(f); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/74a6977b_8cfeeb76?usp=email : PS2, Line 95: return 1; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/17f4e3ed_d91787b8?usp=email : PS2, Line 96: } please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/0bc87f6b_60202821?usp=email : PS2, Line 98: uint8_t *buf = (uint8_t *)malloc(length); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/b71cb30d_6750a6d9?usp=email : PS2, Line 99: if (!buf) { please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/ef32f1e1_d8c83f78?usp=email : PS2, Line 99: if (!buf) { suspect code indent for conditional statements (2, 4) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/adcf7292_73a548b1?usp=email : PS2, Line 100: fprintf(stderr, "Memory allocation error\n"); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/53f93042_902c2b6e?usp=email : PS2, Line 101: fclose(f); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/1849fe4a_f13b234e?usp=email : PS2, Line 102: return 1; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/9858cfe6_648b412d?usp=email : PS2, Line 103: } please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/5be97164_a638dde5?usp=email : PS2, Line 105: size_t read_bytes = fread(buf, 1, length, f); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/5b5f1c6c_a48e9738?usp=email : PS2, Line 106: fclose(f); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/7183d0d7_9f3b8368?usp=email : PS2, Line 108: if (read_bytes != length) { please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/a63b495a_221cc1fa?usp=email : PS2, Line 108: if (read_bytes != length) { suspect code indent for conditional statements (2, 4) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/75150913_9ee913b5?usp=email : PS2, Line 109: fprintf(stderr, "Error reading file or not enough data\n"); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/987439a4_71dbd37a?usp=email : PS2, Line 110: free(buf); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/1d481fef_8e9e8b46?usp=email : PS2, Line 111: return 1; please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/9d08c2ef_a1d0b644?usp=email : PS2, Line 112: } please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d241e30c_071b2b67?usp=email : PS2, Line 114: uint32_t crc = calculate_crc(buf, length); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d4821dc4_bdad6317?usp=email : PS2, Line 115: free(buf); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/b432828e_c4b45188?usp=email : PS2, Line 117: printf("%08X\n", crc); please, no spaces at the start of a line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/9fb36046_2d0717c9?usp=email : PS2, Line 118: return 0; please, no spaces at the start of a line File gcc/Makefile: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/76b6db23_abc939f0?usp=email : PS2, Line 2: SHELL := /bin/bash trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/7b787867_ea4685e8?usp=email : PS2, Line 52: SRC_dfu = usb_dfu_main.c crc_code.c crc_params.c trailing whitespace Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d412d400_b4d14b97?usp=email : PS2, Line 81: all: $(SUB_DIRS) hosttools dfu-merge trailing whitespace File gcc/gcc/startup_same54.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c4e15b2c_5b6f5132?usp=email : PS2, Line 671: __attribute__((naked,noreturn,weak)) void Reset_Handler(void) space required after that ',' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21263): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/5dea1877_8c87020c?usp=email : PS2, Line 671: __attribute__((naked,noreturn,weak)) void Reset_Handler(void) space required after that ',' (ctx:VxV) -- To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-asf4-dfu Gerrit-Branch: master Gerrit-Change-Id: I39eae7aaafd5531db6ce48837c9499432caadbed Gerrit-Change-Number: 39437 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: Hoernchen <[email protected]> Gerrit-Comment-Date: Wed, 29 Jan 2025 18:36:07 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
