Skip to contentSkip to conversation

staging: silicom: Remove unused pointer in bypass_init_module()

PATCH Superseded Christian Engelmayer 2 participants 2 messages Apr 26, 2014 – Apr 28, 2014 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: silicom: Remove unused pointer in bypass_init_module()

Pointer 'pbpctl_dev_c' in function bypass_init_module() is unused. Thus remove it.

---
Compile tested and applies against v3.15-rc2 as well as branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

---
 drivers/staging/silicom/bpctl_mod.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/silicom/bpctl_mod.c +0 -3
index 7f3d884..2bf8964 100644
@@ -6372,13 +6372,10 @@ 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);
Signature · 1 line
1.9.1
#1 lore raw
Quoted 16 lines · Christian Engelmayer

Pointer 'pbpctl_dev_c' in function bypass_init_module() is unused. Thus remove it.

---
Compile tested and applies against v3.15-rc2 as well as branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

---
 drivers/staging/silicom/bpctl_mod.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/staging/silicom/bpctl_mod.c +0 -0
index 7f3d884..2bf8964 100644

drivers/staging/silicom/bpctl_mod.c static int __init bypass_init_module(void) · line 6376

Quoted 5 lines
drivers/staging/silicom/bpctl_mod.c +0 -2
@@ -6372,13 +6372,10 @@ static int __init bypass_init_module(void)
 	sema_init(&bpctl_sema, 1);
 	spin_lock_init(&bpvm_lock);
 	{
-
-		struct bpctl_dev *pbpctl_dev_c = NULL;

The code is indented so that it can do that declaration. Now the you have removed the declaration, please remove the indent block '{' as well.

This still falls under the one thing per patch rule because fixing the indenting and removing the unused declaration are closely related.

regards,
dan carpenter