lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180218202655.5738-1-quytelda@tamalin.org>
Date:   Sun, 18 Feb 2018 12:26:53 -0800
From:   Quytelda Kahja <quytelda@...alin.org>
To:     gregkh@...uxfoundation.org, gs051095@...il.com,
        jonathankim@...semi.com, deanahn@...semi.com
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Quytelda Kahja <quytelda@...alin.org>
Subject: [PATCH 1/3] Staging: gdm724x: tty: Remove unnecessary macro 'gdm_tty_send'.

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@...alin.org>
---
 drivers/staging/gdm724x/gdm_tty.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index fc7682c18f20..1c3853bcfac2 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -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)
-- 
2.16.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ