linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: silicom: Remove unused pointer in bypass_init_module()
@ 2014-04-26 20:15 Christian Engelmayer
  2014-04-28  9:30 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Engelmayer @ 2014-04-26 20:15 UTC (permalink / raw)
  To: devel
  Cc: gregkh, chad, tulinizer, michael.banken, lorenz, rashika.kheria,
	andriy.shevchenko, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

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

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
---
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(-)

diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
index 7f3d884..2bf8964 100644
--- a/drivers/staging/silicom/bpctl_mod.c
+++ b/drivers/staging/silicom/bpctl_mod.c
@@ -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);
-- 
1.9.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] staging: silicom: Remove unused pointer in bypass_init_module()
  2014-04-26 20:15 [PATCH] staging: silicom: Remove unused pointer in bypass_init_module() Christian Engelmayer
@ 2014-04-28  9:30 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-04-28  9:30 UTC (permalink / raw)
  To: Christian Engelmayer
  Cc: devel, gregkh, rashika.kheria, linux-kernel, tulinizer,
	michael.banken, andriy.shevchenko, lorenz

On Sat, Apr 26, 2014 at 10:15:04PM +0200, Christian Engelmayer wrote:
> Pointer 'pbpctl_dev_c' in function bypass_init_module() is unused.
> Thus remove it.
> 
> Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
> ---
> 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(-)
> 
> diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
> index 7f3d884..2bf8964 100644
> --- a/drivers/staging/silicom/bpctl_mod.c
> +++ b/drivers/staging/silicom/bpctl_mod.c
> @@ -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


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

end of thread, other threads:[~2014-04-28  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-26 20:15 [PATCH] staging: silicom: Remove unused pointer in bypass_init_module() Christian Engelmayer
2014-04-28  9:30 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).