OSDN Git Service

Staging: gdm724x: tty: Remove unnecessary macro 'gdm_tty_send'.
authorQuytelda Kahja <quytelda@tamalin.org>
Sun, 18 Feb 2018 20:26:53 +0000 (12:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Feb 2018 17:06:35 +0000 (18:06 +0100)
Remove the macro 'gdm_tty_send' which adds unnecessary complexity and has
arguments that could mistakenly be evaluated multiple times.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm724x/gdm_tty.c

index fc7682c..1c3853b 100644 (file)
@@ -37,8 +37,6 @@
 
 #define MUX_TX_MAX_SIZE 2048
 
-#define gdm_tty_send(n, d, l, i, c, b) (\
-       n->tty_dev->send_func(n->tty_dev->priv_dev, d, l, i, c, b))
 #define gdm_tty_recv(n, c) (\
        n->tty_dev->recv_func(n->tty_dev->priv_dev, c))
 #define gdm_tty_send_control(n, r, v, d, l) (\
@@ -191,13 +189,12 @@ static int gdm_tty_write(struct tty_struct *tty, const unsigned char *buf,
 
        while (1) {
                sending_len = min(MUX_TX_MAX_SIZE, remain);
-               gdm_tty_send(gdm,
-                            (void *)(buf + sent_len),
-                            sending_len,
-                            gdm->index,
-                            gdm_tty_send_complete,
-                            gdm
-                           );
+               gdm->tty_dev->send_func(gdm->tty_dev->priv_dev,
+                                       (void *)(buf + sent_len),
+                                       sending_len,
+                                       gdm->index,
+                                       gdm_tty_send_complete,
+                                       gdm);
                sent_len += sending_len;
                remain -= sending_len;
                if (remain <= 0)