* [PATCH] pch_uart: remove set but not used variable 'tx_empty'
@ 2018-10-23 13:21 ` zhong jiang
0 siblings, 0 replies; 3+ messages in thread
From: zhong jiang @ 2018-10-23 13:21 UTC (permalink / raw)
To: gregkh; +Cc: jslaby, linux-serial, linux-kernel
tx_empty is not used after setting its value. It is safe to remove
the unused variable.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
drivers/tty/serial/pch_uart.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index cb85002..9ed121f 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -933,7 +933,6 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
struct scatterlist *sg;
int nent;
int fifo_size;
- int tx_empty;
struct dma_async_tx_descriptor *desc;
int num;
int i;
@@ -958,11 +957,9 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
}
fifo_size = max(priv->fifo_size, 1);
- tx_empty = 1;
if (pop_tx_x(priv, xmit->buf)) {
pch_uart_hal_write(priv, xmit->buf, 1);
port->icount.tx++;
- tx_empty = 0;
fifo_size--;
}
--
1.7.12.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] pch_uart: remove set but not used variable 'tx_empty'
@ 2018-10-23 13:21 ` zhong jiang
0 siblings, 0 replies; 3+ messages in thread
From: zhong jiang @ 2018-10-23 13:21 UTC (permalink / raw)
To: gregkh; +Cc: jslaby, linux-serial, linux-kernel
tx_empty is not used after setting its value. It is safe to remove
the unused variable.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
drivers/tty/serial/pch_uart.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index cb85002..9ed121f 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -933,7 +933,6 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
struct scatterlist *sg;
int nent;
int fifo_size;
- int tx_empty;
struct dma_async_tx_descriptor *desc;
int num;
int i;
@@ -958,11 +957,9 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
}
fifo_size = max(priv->fifo_size, 1);
- tx_empty = 1;
if (pop_tx_x(priv, xmit->buf)) {
pch_uart_hal_write(priv, xmit->buf, 1);
port->icount.tx++;
- tx_empty = 0;
fifo_size--;
}
--
1.7.12.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pch_uart: remove set but not used variable 'tx_empty'
2018-10-23 13:21 ` zhong jiang
(?)
@ 2018-10-29 7:52 ` Jiri Slaby
-1 siblings, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2018-10-29 7:52 UTC (permalink / raw)
To: zhong jiang, gregkh; +Cc: linux-kernel, linux-serial
On 23. 10. 18, 15:21, zhong jiang wrote:
> tx_empty is not used after setting its value. It is safe to remove
> the unused variable.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Reviewed-by: Jiri Slaby <jslaby@suse.cz>
> ---
> drivers/tty/serial/pch_uart.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
> index cb85002..9ed121f 100644
> --- a/drivers/tty/serial/pch_uart.c
> +++ b/drivers/tty/serial/pch_uart.c
> @@ -933,7 +933,6 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
> struct scatterlist *sg;
> int nent;
> int fifo_size;
> - int tx_empty;
> struct dma_async_tx_descriptor *desc;
> int num;
> int i;
> @@ -958,11 +957,9 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
> }
>
> fifo_size = max(priv->fifo_size, 1);
> - tx_empty = 1;
> if (pop_tx_x(priv, xmit->buf)) {
> pch_uart_hal_write(priv, xmit->buf, 1);
> port->icount.tx++;
> - tx_empty = 0;
> fifo_size--;
> }
>
>
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-29 7:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23 13:21 [PATCH] pch_uart: remove set but not used variable 'tx_empty' zhong jiang
2018-10-23 13:21 ` zhong jiang
2018-10-29 7:52 ` Jiri Slaby
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.