coding style: remove useless return statement from void functions 22/5622/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Mon, 6 May 2019 10:41:22 +0000 (12:41 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 9 May 2020 13:40:07 +0000 (14:40 +0100)
For void functions, a return as last statement is useless.
Remove it.

Issue identified by checkpatch script from Linux kernel v5.1 using
the command

find src/ -type f -exec ./tools/scripts/checkpatch.pl \
-q --types RETURN_VOID -f {} \;

Change-Id: Ie0616fe98623f30d2d7b04ac9517d669774092de
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5622
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Tested-by: jenkins
src/jtag/drivers/cmsis_dap_usb.c
src/jtag/drivers/sysfsgpio.c
src/jtag/drivers/xds110.c

index 2897377549b816d0122186ec0a655fa0a0befd74..ee1cb533c050a730a880350b53b793be5287e304 100644 (file)
@@ -364,8 +364,6 @@ static void cmsis_dap_usb_close(struct cmsis_dap *dap)
                free(pending_fifo[i].transfers);
                pending_fifo[i].transfers = NULL;
        }
-
-       return;
 }
 
 static int cmsis_dap_usb_write(struct cmsis_dap *dap, int txlen)
index e4a15237b1f8d7302752e2b0f9191c3f8484ce73..a4d7ad9ec2e82e6352250dd2485450d6121f2f81 100644 (file)
@@ -98,8 +98,6 @@ static void unexport_sysfs_gpio(int gpio)
        snprintf(gpiostr, sizeof(gpiostr), "%d", gpio);
        if (open_write_close("/sys/class/gpio/unexport", gpiostr) < 0)
                LOG_ERROR("Couldn't unexport gpio %d", gpio);
-
-       return;
 }
 
 /*
index 8a832adf0ab3d68ab8fb6873dce8676665255336..5e4df93c2d1a2fcfc8c98e9888a00709fafa0862 100644 (file)
@@ -1683,14 +1683,11 @@ static int xds110_reset(int trst, int srst)
 static void xds110_execute_sleep(struct jtag_command *cmd)
 {
        jtag_sleep(cmd->cmd.sleep->us);
-       return;
 }
 
 static void xds110_execute_tlr_reset(struct jtag_command *cmd)
 {
        (void)xds_goto_state(XDS_JTAG_STATE_RESET);
-
-       return;
 }
 
 static void xds110_execute_pathmove(struct jtag_command *cmd)
@@ -1726,8 +1723,6 @@ static void xds110_execute_pathmove(struct jtag_command *cmd)
        }
 
        free((void *)path);
-
-       return;
 }
 
 static void xds110_queue_scan(struct jtag_command *cmd)
@@ -1799,8 +1794,6 @@ static void xds110_queue_scan(struct jtag_command *cmd)
        }
        xds110.txn_request_size += total_bytes;
        xds110.txn_result_size += total_bytes;
-
-       return;
 }
 
 static void xds110_queue_runtest(struct jtag_command *cmd)
@@ -1820,8 +1813,6 @@ static void xds110_queue_runtest(struct jtag_command *cmd)
        xds110.txn_requests[xds110.txn_request_size++] = (clocks >> 16) & 0xff;
        xds110.txn_requests[xds110.txn_request_size++] = (clocks >> 24) & 0xff;
        xds110.txn_requests[xds110.txn_request_size++] = end_state;
-
-       return;
 }
 
 static void xds110_queue_stableclocks(struct jtag_command *cmd)
@@ -1838,8 +1829,6 @@ static void xds110_queue_stableclocks(struct jtag_command *cmd)
        xds110.txn_requests[xds110.txn_request_size++] = (clocks >>  8) & 0xff;
        xds110.txn_requests[xds110.txn_request_size++] = (clocks >> 16) & 0xff;
        xds110.txn_requests[xds110.txn_request_size++] = (clocks >> 24) & 0xff;
-
-       return;
 }
 
 static void xds110_execute_command(struct jtag_command *cmd)

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)