ULINK driver: Update some comments, fix some coding mistakes
authorMartin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
Sun, 26 Jun 2011 23:00:15 +0000 (01:00 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 31 Aug 2011 14:25:41 +0000 (16:25 +0200)
Signed-off-by: Martin Schmölzer <martin.schmoelzer@student.tuwien.ac.at>
src/jtag/drivers/ulink.c

index 0e04fd661d106f007c3902ff0691ebb1b2ac9e15..f8103942c4e5854f5551a5acb91c602c48866c69 100644 (file)
@@ -136,7 +136,7 @@ struct ulink_cmd {
   /** Pointer to corresponding OpenOCD command for post-processing */
   struct jtag_command *cmd_origin;
 
-  struct ulink_cmd *next;    ///< Pointer to next command (linked list)
+  struct ulink_cmd *next;     ///< Pointer to next command (linked list)
 };
 
 typedef struct ulink_cmd ulink_cmd_t;
@@ -919,6 +919,7 @@ int ulink_append_scan_cmd(struct ulink *device, enum scan_type scan_type,
   default:
     LOG_ERROR("BUG: ulink_append_scan_cmd() encountered an unknown scan type");
     ret = ERROR_FAIL;
+    break;
   }
 
   if (ret != ERROR_OK) {
@@ -1091,7 +1092,7 @@ int ulink_append_set_signals_cmd(struct ulink *device, uint8_t low,
   cmd->payload_out[0] = low;
   cmd->payload_out[1] = high;
 
-  return ulink_append_queue(device, cmd);;
+  return ulink_append_queue(device, cmd);
 }
 
 /**
@@ -1265,7 +1266,7 @@ int ulink_queue_scan(struct ulink *device, struct jtag_command *cmd)
   /* Determine scan type (IN/OUT/IO) */
   type = jtag_scan_type(cmd->cmd.scan);
 
-  /* Determine number of scan commands */
+  /* Determine number of scan commands with maximum payload */
   scans_max_payload = scan_size_bytes / 58;
 
   /* Determine size of last shift command */
@@ -1322,7 +1323,7 @@ int ulink_queue_scan(struct ulink *device, struct jtag_command *cmd)
     tms_sequence_resume = tap_get_tms_path(TAP_DRPAUSE, TAP_DRSHIFT);
   }
 
-  /* Generate scan commands with full payload */
+  /* Generate scan commands */
   bytecount = scan_size_bytes;
   while (bytecount > 0) {
     if (bytecount == scan_size_bytes) {
@@ -1618,6 +1619,7 @@ int ulink_post_process_queue(struct ulink *device)
         ret = ERROR_FAIL;
         LOG_ERROR("BUG: ulink_post_process_queue() encountered unknown JTAG "
             "command type");
+        break;
       }
 
       if (ret != ERROR_OK) {
@@ -1673,6 +1675,7 @@ static int ulink_execute_queue(void)
     default:
       ret = ERROR_FAIL;
       LOG_ERROR("BUG: encountered unknown JTAG command type");
+      break;
     }
 
     cmd = cmd->next;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)