Skip to content

Commit

Permalink
tty: hvc: remove set but unused variable
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20230908061726.2641-1-liubo03@inspur.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Bo Liu authored and Greg Kroah-Hartman committed Sep 18, 2023
1 parent 22a048b commit 46c4699
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/tty/hvc/hvcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 46c4699

Please sign in to comment.