diff mbox series

tty: hvc: remove set but unused variable

Message ID 20230908061726.2641-1-liubo03@inspur.com
State New
Headers show
Series tty: hvc: remove set but unused variable | expand

Commit Message

Bo Liu Sept. 8, 2023, 6:17 a.m. UTC
The local variable vdev in hvcs_destruct_port() is set
but not used. Remove the variable and related code.

Signed-off-by: Bo Liu <liubo03@inspur.com>
---
 drivers/tty/hvc/hvcs.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Jiri Slaby Sept. 11, 2023, 7:16 a.m. UTC | #1
On 08. 09. 23, 8:17, Bo Liu wrote:
> The local variable vdev in hvcs_destruct_port() is set
> but not used. Remove the variable and related code.
> 
> Signed-off-by: Bo Liu <liubo03@inspur.com>

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
diff mbox series

Patch

diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index d29fdfe9d93d..b537d1fb67d4 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -664,7 +664,6 @@  static void hvcs_return_index(int index)
 static void hvcs_destruct_port(struct tty_port *p)
 {
 	struct hvcs_struct *hvcsd = container_of(p, struct hvcs_struct, port);
-	struct vio_dev *vdev;
 	struct completion *comp;
 	unsigned long flags;
 
@@ -686,7 +685,6 @@  static void hvcs_destruct_port(struct tty_port *p)
 	printk(KERN_INFO "HVCS: Destroyed hvcs_struct for vty-server@%X.\n",
 			hvcsd->vdev->unit_address);
 
-	vdev = hvcsd->vdev;
 	hvcsd->vdev = NULL;
 
 	hvcsd->p_unit_address = 0;