Linux-Serial Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] serial: ucc_uart: remove redundant assignment to pointer bdp
@ 2019-12-20  0:10 Colin King
  2019-12-20 14:20 ` Timur Tabi
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-12-20  0:10 UTC (permalink / raw)
  To: Timur Tabi, Greg Kroah-Hartman, Jiri Slaby, linuxppc-dev, linux-serial
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable bdp is being initialized with a value that is never
read and it is being updated later with a new value. The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/tty/serial/ucc_uart.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index afc2a5d69202..99a069ed3636 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -336,8 +336,6 @@ static int qe_uart_tx_pump(struct uart_qe_port *qe_port)
 	struct uart_port *port = &qe_port->port;
 	struct circ_buf *xmit = &port->state->xmit;
 
-	bdp = qe_port->rx_cur;
-
 	/* Handle xon/xoff */
 	if (port->x_char) {
 		/* Pick next descriptor and fill from buffer */
-- 
2.24.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] serial: ucc_uart: remove redundant assignment to pointer bdp
  2019-12-20  0:10 [PATCH] serial: ucc_uart: remove redundant assignment to pointer bdp Colin King
@ 2019-12-20 14:20 ` Timur Tabi
  0 siblings, 0 replies; 2+ messages in thread
From: Timur Tabi @ 2019-12-20 14:20 UTC (permalink / raw)
  To: Colin King, Greg Kroah-Hartman, Jiri Slaby, linuxppc-dev, linux-serial
  Cc: kernel-janitors, linux-kernel

On 12/19/19 6:10 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
> 
> The variable bdp is being initialized with a value that is never
> read and it is being updated later with a new value. The initialization
> is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King<colin.king@canonical.com>

Acked-by: Timur Tabi <timur@kernel.org>

Looks like this bug has been there since day 1.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-20  0:10 [PATCH] serial: ucc_uart: remove redundant assignment to pointer bdp Colin King
2019-12-20 14:20 ` Timur Tabi

Linux-Serial Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-serial/0 linux-serial/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-serial linux-serial/ https://lore.kernel.org/linux-serial \
		linux-serial@vger.kernel.org
	public-inbox-index linux-serial

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-serial


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git