nit: more LOG_* \n fixes
[openocd.git] / src / jtag / drivers / rlink.c
index a3fad358e37f56678564b052dada93dd1ed7731a..4b3e2ae8385bae94ee00e47070e0d3ce3045cf80 100644 (file)
@@ -348,7 +348,7 @@ dtc_load_from_buffer(
 
        while (length) {
                if (length < sizeof(*header)) {
-                       LOG_ERROR("Malformed DTC image\n");
+                       LOG_ERROR("Malformed DTC image");
                        exit(1);
                }
 
@@ -357,7 +357,7 @@ dtc_load_from_buffer(
                length -= sizeof(*header);
 
                if (length < (size_t)header->length + 1) {
-                       LOG_ERROR("Malformed DTC image\n");
+                       LOG_ERROR("Malformed DTC image");
                        exit(1);
                }
 
@@ -417,7 +417,7 @@ dtc_load_from_buffer(
                                break;
 
                        default:
-                               LOG_ERROR("Invalid DTC image record type: 0x%02x\n", header->type);
+                               LOG_ERROR("Invalid DTC image record type: 0x%02x", header->type);
                                exit(1);
                                break;
                }
@@ -504,7 +504,7 @@ dtc_run_download(
        int     usb_err;
        int     i;
 
-       LOG_DEBUG(": %d/%d\n", command_buffer_size, reply_buffer_size);
+       LOG_DEBUG(": %d/%d", command_buffer_size, reply_buffer_size);
 
        usb_err = usb_bulk_write(
                pHDev_param,
@@ -538,7 +538,7 @@ dtc_run_download(
                if (ep2_buffer[0] & 0x01) break;
 
                if (!--i) {
-                       LOG_ERROR("%s, %d: too many retries waiting for DTC status\n",
+                       LOG_ERROR("%s, %d: too many retries waiting for DTC status",
                                __FILE__, __LINE__
 );
                        return(-ETIMEDOUT);
@@ -556,7 +556,7 @@ dtc_run_download(
 );
 
                if (usb_err < (int)sizeof(ep2_buffer)) {
-                       LOG_ERROR("%s, %d: Read of endpoint 2 returned %d\n",
+                       LOG_ERROR("%s, %d: Read of endpoint 2 returned %d",
                                __FILE__, __LINE__, usb_err
 );
                        return(usb_err);
@@ -691,7 +691,7 @@ dtc_queue_run(void) {
                        NULL, 0
 );
                if (usb_err < 0) {
-                       LOG_ERROR("dtc_run_download: %s\n", usb_strerror());
+                       LOG_ERROR("dtc_run_download: %s", usb_strerror());
                        exit(1);
                }
        } else {
@@ -700,7 +700,7 @@ dtc_queue_run(void) {
                        reply_buffer, dtc_queue.reply_index
 );
                if (usb_err < 0) {
-                       LOG_ERROR("dtc_run_download: %s\n", usb_strerror());
+                       LOG_ERROR("dtc_run_download: %s", usb_strerror());
                        exit(1);
                } else {
                        /* process the reply, which empties the reply queue and frees its entries */
@@ -1106,7 +1106,7 @@ rlink_scan(
        uint8_t                 dtc_mask;
 
        if (scan_size < 1) {
-               LOG_ERROR("scan_size cannot be less than 1 bit\n");
+               LOG_ERROR("scan_size cannot be less than 1 bit");
                exit(1);
        }
 
@@ -1230,7 +1230,7 @@ rlink_scan(
                                chunk_bits,
                                cmd
 ) == NULL) {
-                               LOG_ERROR("enqueuing DTC reply entry: %s\n", strerror(errno));
+                               LOG_ERROR("enqueuing DTC reply entry: %s", strerror(errno));
                                exit(1);
                        }
 
@@ -1295,7 +1295,7 @@ rlink_scan(
                        extra_bits,
                        cmd
 ) == NULL) {
-                       LOG_ERROR("enqueuing DTC reply entry: %s\n", strerror(errno));
+                       LOG_ERROR("enqueuing DTC reply entry: %s", strerror(errno));
                        exit(1);
                }
 
@@ -1353,7 +1353,7 @@ rlink_scan(
                                1,
                                cmd
 ) == NULL) {
-                               LOG_ERROR("enqueuing DTC reply entry: %s\n", strerror(errno));
+                               LOG_ERROR("enqueuing DTC reply entry: %s", strerror(errno));
                                exit(1);
                        }
 
@@ -1503,7 +1503,7 @@ int rlink_speed(int speed)
        for (i = rlink_speed_table_size; i--;) {
                if (rlink_speed_table[i].prescaler == speed) {
                        if (dtc_load_from_buffer(pHDev, rlink_speed_table[i].dtc, rlink_speed_table[i].dtc_size) != 0) {
-                               LOG_ERROR("An error occurred while trying to load DTC code for speed \"%d\".\n", speed);
+                               LOG_ERROR("An error occurred while trying to load DTC code for speed \"%d\".", speed);
                                exit(1);
                        }
 
@@ -1583,16 +1583,16 @@ int rlink_init(void)
        struct usb_device *dev = usb_device(pHDev);
        if (dev->descriptor.bNumConfigurations > 1)
        {
-               LOG_ERROR("Whoops! NumConfigurations is not 1, don't know what to do...\n");
+               LOG_ERROR("Whoops! NumConfigurations is not 1, don't know what to do...");
                return ERROR_FAIL;
        }
        if (dev->config->bNumInterfaces > 1)
        {
-               LOG_ERROR("Whoops! NumInterfaces is not 1, don't know what to do...\n");
+               LOG_ERROR("Whoops! NumInterfaces is not 1, don't know what to do...");
                return ERROR_FAIL;
        }
 
-       LOG_DEBUG("Opened device, pHDev = %p\n", pHDev);
+       LOG_DEBUG("Opened device, pHDev = %p", pHDev);
 
        /* usb_set_configuration required under win32 */
        usb_set_configuration(pHDev, dev->config[0].bConfigurationValue);
@@ -1612,7 +1612,7 @@ int rlink_init(void)
                }
                else
                {
-                       LOG_DEBUG("interface claimed!\n");
+                       LOG_DEBUG("interface claimed!");
                        break;
                }
        } while (--retries);
@@ -1624,7 +1624,7 @@ int rlink_init(void)
        }
        if (usb_set_altinterface(pHDev,0) != 0)
        {
-               LOG_ERROR("Failed to set interface.\n");
+               LOG_ERROR("Failed to set interface.");
                return ERROR_FAIL;
        }
 
@@ -1658,10 +1658,10 @@ int rlink_init(void)
                LOG_ERROR("USB read error: %s", usb_strerror());
                return(ERROR_FAIL);
        }
-       LOG_DEBUG(INTERFACE_NAME" firmware version: %d.%d.%d\n", reply_buffer[0], reply_buffer[1], reply_buffer[2]);
+       LOG_DEBUG(INTERFACE_NAME" firmware version: %d.%d.%d", reply_buffer[0], reply_buffer[1], reply_buffer[2]);
 
        if ((reply_buffer[0] != 0) || (reply_buffer[1] != 0) || (reply_buffer[2] != 3)) {
-               LOG_WARNING("The rlink device is not of the version that the developers have played with.  It may or may not work.\n");
+               LOG_WARNING("The rlink device is not of the version that the developers have played with.  It may or may not work.");
        }
 
        /* Probe port E for adapter presence */
@@ -1692,7 +1692,7 @@ int rlink_init(void)
 );
 
        if ((reply_buffer[0] & ST7_PE_ADAPTER_SENSE_IN) != 0) {
-               LOG_WARNING("target detection problem\n");
+               LOG_WARNING("target detection problem");
        }
 
        ep1_generic_commandl(
@@ -1718,7 +1718,7 @@ int rlink_init(void)
 
 
        if ((reply_buffer[0] & ST7_PE_ADAPTER_SENSE_IN) == 0) {
-               LOG_WARNING("target not plugged in\n");
+               LOG_WARNING("target not plugged in");
        }
 
        /* float ports A and B */

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)