From: <ge...@op...> - 2025-07-26 17:40:13
|
This is an automated email from Gerrit. "Antonio Borneo <bor...@gm...>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9056 -- gerrit commit e23ccfa70bffa89baa2e2eabced24b2c60d6dbde Author: Antonio Borneo <bor...@gm...> Date: Sat Jul 26 18:39:07 2025 +0200 jtag: drivers: ulink: special align switch and case statements The coding style requires the 'case' to be at the same indentation level of its 'switch' statement. Checkpatch is not able to detect numbers in exponential format, like 6E-5, and complains about missing space around the operator minus. To complete the alignment of switch and case statements in this file, use a separate commit with the special checkpatch ignore tag in the commit message. Align the code accordingly. No changes are reported by git log -p -w --ignore-blank-lines --patience Checkpatch-ignore: SPACING Change-Id: Ibe70c4a4d3f0bb44c03007103910b778944bb90e Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/jtag/drivers/ulink.c b/src/jtag/drivers/ulink.c index 93b8629261..1f14b1a047 100644 --- a/src/jtag/drivers/ulink.c +++ b/src/jtag/drivers/ulink.c @@ -1285,24 +1285,24 @@ static int ulink_calculate_delay(enum ulink_delay_type type, long f, int *delay) t = 1.0 / (float)(f); switch (type) { - case DELAY_CLOCK_TCK: - x = (t - (float)(6E-6)) / (float)(4E-6); - break; - case DELAY_CLOCK_TMS: - x = (t - (float)(8.5E-6)) / (float)(4E-6); - break; - case DELAY_SCAN_IN: - x = (t - (float)(8.8308E-6)) / (float)(4E-6); - break; - case DELAY_SCAN_OUT: - x = (t - (float)(1.0527E-5)) / (float)(4E-6); - break; - case DELAY_SCAN_IO: - x = (t - (float)(1.3132E-5)) / (float)(4E-6); - break; - default: - return ERROR_FAIL; - break; + case DELAY_CLOCK_TCK: + x = (t - (float)(6E-6)) / (float)(4E-6); + break; + case DELAY_CLOCK_TMS: + x = (t - (float)(8.5E-6)) / (float)(4E-6); + break; + case DELAY_SCAN_IN: + x = (t - (float)(8.8308E-6)) / (float)(4E-6); + break; + case DELAY_SCAN_OUT: + x = (t - (float)(1.0527E-5)) / (float)(4E-6); + break; + case DELAY_SCAN_IO: + x = (t - (float)(1.3132E-5)) / (float)(4E-6); + break; + default: + return ERROR_FAIL; + break; } /* Check if the delay value is negative. This happens when a frequency is @@ -1345,38 +1345,38 @@ static long ulink_calculate_frequency(enum ulink_delay_type type, int delay) return 0; switch (type) { - case DELAY_CLOCK_TCK: - if (delay < 0) - t = (float)(2.666E-6); - else - t = (float)(4E-6) * (float)(delay) + (float)(6E-6); - break; - case DELAY_CLOCK_TMS: - if (delay < 0) - t = (float)(5.666E-6); - else - t = (float)(4E-6) * (float)(delay) + (float)(8.5E-6); - break; - case DELAY_SCAN_IN: - if (delay < 0) - t = (float)(5.5E-6); - else - t = (float)(4E-6) * (float)(delay) + (float)(8.8308E-6); - break; - case DELAY_SCAN_OUT: - if (delay < 0) - t = (float)(7.0E-6); - else - t = (float)(4E-6) * (float)(delay) + (float)(1.0527E-5); - break; - case DELAY_SCAN_IO: - if (delay < 0) - t = (float)(9.926E-6); - else - t = (float)(4E-6) * (float)(delay) + (float)(1.3132E-5); - break; - default: - return 0; + case DELAY_CLOCK_TCK: + if (delay < 0) + t = (float)(2.666E-6); + else + t = (float)(4E-6) * (float)(delay) + (float)(6E-6); + break; + case DELAY_CLOCK_TMS: + if (delay < 0) + t = (float)(5.666E-6); + else + t = (float)(4E-6) * (float)(delay) + (float)(8.5E-6); + break; + case DELAY_SCAN_IN: + if (delay < 0) + t = (float)(5.5E-6); + else + t = (float)(4E-6) * (float)(delay) + (float)(8.8308E-6); + break; + case DELAY_SCAN_OUT: + if (delay < 0) + t = (float)(7.0E-6); + else + t = (float)(4E-6) * (float)(delay) + (float)(1.0527E-5); + break; + case DELAY_SCAN_IO: + if (delay < 0) + t = (float)(9.926E-6); + else + t = (float)(4E-6) * (float)(delay) + (float)(1.3132E-5); + break; + default: + return 0; } f_float = 1.0 / t; -- |