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 4:
(68 comments)
File crc_code.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/f3e516c4_be02384… :
PS4, Line 17: uint32_t crc = 0xFFFFFFFF;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/918e9e03_a4115f5… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/5856f687_7511e6a… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/6636f236_58a76e4… :
PS4, Line 19: crc ^= data[i];
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/a2882f3e_d8fe627… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/3bcba590_4de9bd8… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/7ce8cae0_0a9590d… :
PS4, Line 22: }
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/2f4d0fb4_cb21eba… :
PS4, Line 23: }
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/fcf74b2a_6c5a766… :
PS4, Line 24: return ~crc;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/9a141e28_c39b7fb… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/6947c4d6_359eebc… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/437181b3_c7cee8d… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/6d2bd7f5_b8de467… :
PS4, Line 32: extern int main(void);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4d2cc97b_8a27a75… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d52e3268_591c910… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/b16850ae_8d79dea… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/a934d927_6f12f17… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/588c4670_bc525cc… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/58cb0e81_c188fad… :
PS4, Line 45: if (calculated_crc != expected_crc) {
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/301b5ca3_74b8b3c… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/52d53bf1_035536d… :
PS4, Line 47: *dfu_magic = 0x44465521;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d25c871b_b98bc35… :
PS4, Line 50: __DSB();
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/6a7abe27_d181552… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/21f06f7a_45322b7… :
PS4, Line 53: __DSB();
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/803b43aa_83238d2… :
PS4, Line 54: }
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/1d2dbeb5_a4e099c… :
PS4, Line 58: _Reset_Handler();
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/17a357c3_3250994… :
PS4, Line 61: while (1)
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/466211c2_12ac7cb… :
PS4, Line 61: while (1)
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/e43d5179_d8b551d… :
PS4, Line 62: ;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/93e7bfd7_a7e9e26… :
PS4, Line 74: if (argc != 4) {
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/3c49766e_6c84865… :
PS4, Line 74: if (argc != 4) {
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/d31e2b7a_2485341… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/47d6b34f_f897d70… :
PS4, Line 76: return 1;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/2a920fe4_b3d94df… :
PS4, Line 77: }
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/ae4ae439_d9d40ed… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/35aa2ac0_4f633e2… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/e91f9d5c_15a0cbc… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/03598e40_102b770… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/7d681359_d7381f5… :
PS4, Line 86: if (!f) {
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/8cb0d3d7_3cca514… :
PS4, Line 86: if (!f) {
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/1c9bce00_5a0f900… :
PS4, Line 87: perror("fopen");
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c368621f_98e255d… :
PS4, Line 88: return 1;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/943a7fb3_ba37966… :
PS4, Line 89: }
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/fa526b3e_1a7b20d… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4eae480c_b2835e9… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4c8d80ec_383913d… :
PS4, Line 93: perror("fseek");
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/84e7a899_9d88e1f… :
PS4, Line 94: fclose(f);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/3fb6750b_6d70d07… :
PS4, Line 95: return 1;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4f4e655c_372f1fb… :
PS4, Line 96: }
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/1c6866a4_b6262e5… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/82d583cc_96ffb75… :
PS4, Line 99: if (!buf) {
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/bef9d47d_0462441… :
PS4, Line 99: if (!buf) {
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/89a359d3_b00dadb… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/90842160_097c460… :
PS4, Line 101: fclose(f);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/f6e925f4_415ee23… :
PS4, Line 102: return 1;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/65e162de_35c7c3b… :
PS4, Line 103: }
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/4ae04cb1_a694d4b… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/76beecc6_a0d490a… :
PS4, Line 106: fclose(f);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/c1a0f7e9_35d94b3… :
PS4, Line 108: if (read_bytes != length) {
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/b8afb52e_2df990a… :
PS4, Line 108: if (read_bytes != length) {
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/a51b9388_c2c013e… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/54780b29_1d7cca2… :
PS4, Line 110: free(buf);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/891f26e3_5cad7b8… :
PS4, Line 111: return 1;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/859a8d02_36d61f3… :
PS4, Line 112: }
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/ffe48f37_5354a2e… :
PS4, 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-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/243b511d_25b52e6… :
PS4, Line 115: free(buf);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/33f2d29b_6735875… :
PS4, Line 117: printf("%08X\n", crc);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39437/comment/69750672_e03c41b… :
PS4, Line 118: return 0;
please, no spaces at the start of a line
--
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: 4
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 29 Jan 2025 19:10:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No