Attention is currently required from: Hoernchen.
68 comments:
File crc_code.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, Line 19:     crc ^= data[i];
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, 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):
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 24:   return ~crc;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, Line 47:     *dfu_magic = 0x44465521;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 50:     __DSB();
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, Line 53:     __DSB();
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 58:   _Reset_Handler();
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 61:   while (1)
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 61:   while (1)
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 74:   if (argc != 4) {
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 74:   if (argc != 4) {
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, Line 76:     return 1;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, Line 86:   if (!f) {
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 86:   if (!f) {
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 87:     perror("fopen");
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 88:     return 1;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, 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):
Patch Set #4, Line 93:     perror("fseek");
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 94:     fclose(f);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 95:     return 1;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, Line 99:   if (!buf) {
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 99:   if (!buf) {
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, Line 101:     fclose(f);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 102:     return 1;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, Line 106:   fclose(f);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, Line 108:   if (read_bytes != length) {
suspect code indent for conditional statements (2, 4)
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, Line 110:     free(buf);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, Line 111:     return 1;
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, Line 115:   free(buf);
please, no spaces at the start of a line
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-21271):
Patch Set #4, 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):
Patch Set #4, Line 118:   return 0;
please, no spaces at the start of a line
To view, visit change 39437. To unsubscribe, or for help writing mail filters, visit settings.