]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
drivers: rshim: drop useless typedef
authorAntonio Borneo <borneo.antonio@gmail.com>
Fri, 10 Jan 2025 12:55:18 +0000 (13:55 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 16 Feb 2025 16:20:42 +0000 (16:20 +0000)
Use 'struct name' instead of typedef.

Change-Id: Ifff56811f53a260c314c8f5473d368599e0912e6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8700
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
src/jtag/drivers/rshim.c

index 21fc7fd378509c329a19017447c8c78b777fc357..b37fe8c453c621090974e7a8ca3caa5d27aaea9a 100644 (file)
 
 #ifdef HAVE_SYS_IOCTL_H
 /* Message used to program rshim via ioctl(). */
-typedef struct {
+struct rshim_ioctl_msg {
        uint32_t addr;
        uint64_t data;
-} __attribute__((packed)) rshim_ioctl_msg;
+} __attribute__((packed));
 
 enum {
-       RSH_IOC_READ = _IOWR('R', 0, rshim_ioctl_msg),
-       RSH_IOC_WRITE = _IOWR('R', 1, rshim_ioctl_msg),
+       RSH_IOC_READ = _IOWR('R', 0, struct rshim_ioctl_msg),
+       RSH_IOC_WRITE = _IOWR('R', 1, struct rshim_ioctl_msg),
 };
 #endif
 
@@ -104,7 +104,7 @@ static int rshim_dev_read(int chan, int addr, uint64_t *value)
 
 #ifdef HAVE_SYS_IOCTL_H
        if (rc < 0 && errno == ENOSYS) {
-               rshim_ioctl_msg msg;
+               struct rshim_ioctl_msg msg;
 
                msg.addr = addr;
                msg.data = 0;
@@ -126,7 +126,7 @@ static int rshim_dev_write(int chan, int addr, uint64_t value)
 
 #ifdef HAVE_SYS_IOCTL_H
        if (rc < 0 && errno == ENOSYS) {
-               rshim_ioctl_msg msg;
+               struct rshim_ioctl_msg msg;
 
                msg.addr = addr;
                msg.data = value;