There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <redacted>
---
drivers/atm/fore200e.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Olof Johansson <hidden> Date: 2014-06-02 00:10:42
On Sat, May 31, 2014 at 4:08 PM, Rickard Strandqvist
[off-list ref] wrote:
quoted hunk
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <redacted>
---
drivers/atm/fore200e.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -2780,7 +2780,7 @@ static struct pci_driver fore200e_pca_driver = {staticint__initfore200e_module_init(void){-interr;+interr=0;printk(FORE200E"FORE Systems 200E-series ATM driver - version "FORE200E_VERSION"\n");
I can see how a tool that doesn't know about Kconfig dependencies
might think so, but if you look at Kconfig you'll see that for this
driver to be enabled for building either CONFIG_SBUS or CONFIG_PCI
must be set, and if either of them is then this variable will not be
used without first being set.
-Olof
Hi
No, regardless if it is a program that cppcheck or myself with limited
experience of kernel programming is not so easy to figure out.
But then I know that there is nothing wrong in this case, and that is
the main thing :-)
Best regards
Rickard Strandqvist
2014-06-02 2:10 GMT+02:00 Olof Johansson [off-list ref]:
On Sat, May 31, 2014 at 4:08 PM, Rickard Strandqvist
[off-list ref] wrote:
quoted
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <redacted>
---
drivers/atm/fore200e.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -2780,7 +2780,7 @@ static struct pci_driver fore200e_pca_driver = {staticint__initfore200e_module_init(void){-interr;+interr=0;printk(FORE200E"FORE Systems 200E-series ATM driver - version "FORE200E_VERSION"\n");
I can see how a tool that doesn't know about Kconfig dependencies
might think so, but if you look at Kconfig you'll see that for this
driver to be enabled for building either CONFIG_SBUS or CONFIG_PCI
must be set, and if either of them is then this variable will not be
used without first being set.
-Olof
From: David Miller <davem@davemloft.net> Date: 2014-06-03 00:11:23
From: Olof Johansson <redacted>
Date: Sun, 1 Jun 2014 17:10:39 -0700
On Sat, May 31, 2014 at 4:08 PM, Rickard Strandqvist
[off-list ref] wrote:
quoted
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <redacted>
---
drivers/atm/fore200e.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -2780,7 +2780,7 @@ static struct pci_driver fore200e_pca_driver = {staticint__initfore200e_module_init(void){-interr;+interr=0;printk(FORE200E"FORE Systems 200E-series ATM driver - version "FORE200E_VERSION"\n");
I can see how a tool that doesn't know about Kconfig dependencies
might think so, but if you look at Kconfig you'll see that for this
driver to be enabled for building either CONFIG_SBUS or CONFIG_PCI
must be set, and if either of them is then this variable will not be
used without first being set.
Yeah but it's harmless to apply this, which I've done.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html