From 43b54cc91b5d13110a99ef65a981c8bec9e68328 Mon Sep 17 00:00:00 2001 From: Christian Engelmayer Date: Wed, 7 May 2014 21:26:43 +0200 Subject: [PATCH] staging: silicom: Remove unused pointer in bypass_init_module() Pointer 'pbpctl_dev_c' in function bypass_init_module() is unused. Thus remove it. With the last variable declaration gone, there is no more need for an own block. Remove it and adapt the indenting accordingly. Signed-off-by: Christian Engelmayer Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/silicom/bpctl_mod.c | 41 ++++++++++++----------------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index 03b83b8c91cf..e361cde0ec69 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c @@ -6368,33 +6368,26 @@ static int __init bypass_init_module(void) sema_init(&bpctl_sema, 1); spin_lock_init(&bpvm_lock); - { - - struct bpctl_dev *pbpctl_dev_c = NULL; - for (idx_dev = 0, dev = bpctl_dev_arr; - idx_dev < device_num && dev->pdev; - idx_dev++, dev++) { - if (dev->bp_10g9) { - pbpctl_dev_c = get_status_port_fn(dev); - if (is_bypass_fn(dev)) { - printk(KERN_INFO "%s found, ", - dev->name); - dev->bp_fw_ver = bypass_fw_ver(dev); - printk("firmware version: 0x%x\n", - dev->bp_fw_ver); - } - dev->wdt_status = WDT_STATUS_UNKNOWN; - dev->reset_time = 0; - atomic_set(&dev->wdt_busy, 0); - dev->bp_status_un = 1; - - bypass_caps_init(dev); - - init_bypass_wd_auto(dev); - init_bypass_tpl_auto(dev); + for (idx_dev = 0, dev = bpctl_dev_arr; + idx_dev < device_num && dev->pdev; + idx_dev++, dev++) { + if (dev->bp_10g9) { + if (is_bypass_fn(dev)) { + printk(KERN_INFO "%s found, ", dev->name); + dev->bp_fw_ver = bypass_fw_ver(dev); + printk("firmware version: 0x%x\n", + dev->bp_fw_ver); } + dev->wdt_status = WDT_STATUS_UNKNOWN; + dev->reset_time = 0; + atomic_set(&dev->wdt_busy, 0); + dev->bp_status_un = 1; + + bypass_caps_init(dev); + init_bypass_wd_auto(dev); + init_bypass_tpl_auto(dev); } } -- 2.30.2