* [PATCH v2] staging: silicom: Remove unused pointer in bypass_init_module()
@ 2014-04-28 18:47 Christian Engelmayer
2014-04-28 19:24 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Christian Engelmayer @ 2014-04-28 18:47 UTC (permalink / raw)
To: devel
Cc: dan.carpenter, gregkh, chad, tulinizer, michael.banken, lorenz,
rashika.kheria, andriy.shevchenko, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2547 bytes --]
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 <cengelma@gmx.at>
---
v2: Added changes requested by Dan Carpenter:
Dan pointed out that with the declaration gone, the indent block shall be
removed. This was intentionally left out in v1 in order to keep the
changeset more readable. However, according to the input, also with the
additional indenting change this still qualifies for one logical change.
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 | 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 7f3d884..2fb9a6f 100644
--- a/drivers/staging/silicom/bpctl_mod.c
+++ b/drivers/staging/silicom/bpctl_mod.c
@@ -6371,33 +6371,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);
}
}
--
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 v2] staging: silicom: Remove unused pointer in bypass_init_module()
2014-04-28 18:47 [PATCH v2] staging: silicom: Remove unused pointer in bypass_init_module() Christian Engelmayer
@ 2014-04-28 19:24 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-04-28 19:24 UTC (permalink / raw)
To: Christian Engelmayer
Cc: devel, gregkh, rashika.kheria, linux-kernel, tulinizer,
michael.banken, andriy.shevchenko, lorenz
On Mon, Apr 28, 2014 at 08:47:27PM +0200, Christian Engelmayer wrote:
> 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 <cengelma@gmx.at>
> ---
> v2: Added changes requested by Dan Carpenter:
>
> Dan pointed out that with the declaration gone, the indent block shall be
> removed. This was intentionally left out in v1 in order to keep the
> changeset more readable. However, according to the input, also with the
> additional indenting change this still qualifies for one logical change.
>
> 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
Great thanks. :) You only need to work against staging next and not
v3.15-rc2 because this will go into v3.16.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-28 19:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 18:47 [PATCH v2] staging: silicom: Remove unused pointer in bypass_init_module() Christian Engelmayer
2014-04-28 19:24 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox