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 1:
(82 comments)
File crc_code.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/0d7a59c9_71bed151... : PS1, Line 15: static uint32_t open brace '{' following function definitions go on the next line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/98db7872_ec0ee971... : PS1, Line 17: uint32_t crc = 0xFFFFFFFF; please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/322ee23d_e08ce6fd... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/2beede5e_94ca49d5... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/8feddccf_1e0c8d3d... : PS1, Line 19: crc ^= data[i]; please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/7562e1bd_f42d7f5d... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/093433aa_6d4c0280... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c4a9779f_94e1f041... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/1ce4972f_5a927412... : PS1, Line 22: } please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/2ea0e8eb_d8bb91e2... : PS1, Line 23: } please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c14137ec_62f8055a... : PS1, Line 24: return ~crc; please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/8e7d89b5_082a03f5... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c620301f_51970962... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/ce9613bd_3eb6659a... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/983be7cb_dc575835... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/afd6cc2f_c6374cbb... : PS1, Line 32: extern int main(void); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/883fffa9_6425167b... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/10dfe21d_db274d06... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d03cdb20_5ff4597b... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/f16c53ea_e9b28815... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/b192caf8_2226ade7... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/10e84163_c7cb727b... : PS1, Line 45: if (calculated_crc != expected_crc) { suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/22300aa0_46567a25... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/9de263a0_9f08cbf8... : PS1, Line 47: *dfu_magic = 0x44465521; please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/a9fdfa4c_48e028b9... : PS1, Line 50: __DSB(); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/abacff17_447b3b5d... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/5b92642b_5745c74e... : PS1, Line 53: __DSB(); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/11c07246_a54395b8... : PS1, Line 54: } please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/9ed8981b_cff27f3f... : PS1, Line 58: _Reset_Handler(); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/f537a8be_5fb4e6ce... : PS1, Line 61: while (1) please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/89d67972_1a3d5cc6... : PS1, Line 61: while (1) suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/873d179b_6637d699... : PS1, Line 62: ; please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c5629ec9_6079e1a0... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/13deb765_15e17d72... : PS1, Line 74: if (argc != 4) { please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/6d649ebf_73eaf1de... : PS1, Line 74: if (argc != 4) { suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c66c120c_6b9d1884... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/798536bf_6f5a9d3a... : PS1, Line 76: return 1; please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/bcf65973_0abb4aa4... : PS1, Line 77: } please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4811eb84_28853c0a... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/25d0e87c_9a626dd7... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/ea6becca_bb12e4a2... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/89dd8722_e0949ac3... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/e237bbe7_5114d2d2... : PS1, Line 86: if (!f) { please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/6745bcbc_d6ea7de3... : PS1, Line 86: if (!f) { suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/0d628629_01850b5d... : PS1, Line 87: perror("fopen"); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/38dbb4d6_316e8adf... : PS1, Line 88: return 1; please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/7f2362ee_5c61d760... : PS1, Line 89: } please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/9370e12c_3d9a8240... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4a748eee_e6e52026... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/cfcdb09e_4be807f2... : PS1, Line 93: perror("fseek"); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/0a293239_0cec1bd5... : PS1, Line 94: fclose(f); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d73999e4_4e60ddb1... : PS1, Line 95: return 1; please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/5948b14c_53893b4d... : PS1, Line 96: } please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/dc055464_4fef4f19... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4f0a4f5b_3a68a1b9... : PS1, Line 99: if (!buf) { please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/7e91416d_3fa3a97a... : PS1, Line 99: if (!buf) { suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4bda3868_0875a161... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/db1160e2_e7ef6403... : PS1, Line 101: fclose(f); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/73e7def0_3c7561d0... : PS1, Line 102: return 1; please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/84ef37fe_d62c1426... : PS1, Line 103: } please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d5682c8f_8c3e08c8... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/1aa6a051_6a34913f... : PS1, Line 106: fclose(f); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/ccb0f9db_1098d5ba... : PS1, Line 108: if (read_bytes != length) { please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/2f1871de_ef758041... : PS1, Line 108: if (read_bytes != length) { suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/a170fd94_240d2769... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/467b7204_e555e3af... : PS1, Line 110: free(buf); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/45b71d19_4e2938a4... : PS1, Line 111: return 1; please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/3a888fd5_b42253f0... : PS1, Line 112: } please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/f38e9c86_0ca572a7... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/907d0b13_0e91e7c6... : PS1, Line 115: free(buf); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/0cd9a1ea_251ae302... : PS1, Line 117: printf("%08X\n", crc); please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/2f0d8632_0c3c3a7c... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c56456aa_bf5e1a0e... : PS1, Line 2: SHELL := /bin/bash trailing whitespace
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/ad568a56_8a9aab94... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/2fb59e51_f568ba76... : PS1, Line 81: all: $(SUB_DIRS) hosttools dfu-merge trailing whitespace
File gcc/gcc/same54p20a_dfu.ld:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/9300529a_9533905b... : PS1, Line 103: } > rom = 0xff trailing whitespace
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/9fa485a3_1d183931... : PS1, Line 110: } > rom = 0xff trailing whitespace
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/63ee2215_af721954... : PS1, Line 119: } > rom = 0xff trailing whitespace
File gcc/gcc/same54p20a_flash.ld:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/653f125f_2cf4e5c5... : PS1, Line 99: } > rom = 0xff trailing whitespace
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/683aac7a_465a2909... : PS1, Line 106: } > rom = 0xff trailing whitespace
File gcc/gcc/startup_same54.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/e1b47600_b52e2d22... : PS1, 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-21255): https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/ad721c7d_16593348... : PS1, Line 671: __attribute__((naked,noreturn,weak)) void Reset_Handler(void) space required after that ',' (ctx:VxV)