1
0
Fork 0
Commit Graph

28 Commits (821d6f0359b0614792ab8e2fb93b503e25a65079)

Author SHA1 Message Date
Joel Porquet c1ad28a399 staging: silicom/bypasslib/bp_ioctl.h: Fix erroneous global variable definitions
Originally, this header was defining two new typedefs, CMND_TYPE and
CMND_TYPE_SD, following this type of declaration:

typedef enum {
	...
} CMND_TYPE;

A previous commit (785086556a) tried to
fix warnings that were pointed out by checkpatch.pl, concerning not
adding new typedefs. But this commit only removed the 'typedef' keyword,
thus transforming both the typedefs into two the definition of global
variables. For example:

enum {
	...
} CMND_TYPE;

As noticed by the Sparse tool, this patch removes those erroneous global
variable definitions, and just leaves anonymous enum type definitions:

enum {
	...
};

Signed-off-by: Joel Porquet <joel@porquet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:36:07 -07:00
Chaitanya Hazarey 9c73b46af4 Staging: Silicom: bpctl_mod.c & bypass.c: Adding blank lines
Added a blank line after declarations in many places to fix
the following warning issued by checkpatch.pl:

WARNING: Missing a blank line after declarations

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:30:23 -07:00
Daeseok Youn 5397db900a staging: silicom: remove redundant pci_get_drvdata() call
The pci_get_drvdata() and checking NULL for dev are
called twice in while loop in is_bypass_dev().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 15:34:16 -07:00
Aybuke Ozdemir 785086556a staging/silicom/bypasslib/bp_ioctl.h Fix do not add new typedefs.
Fix checkpatch.pl issues with do not add
new typedefs in bp_ioctl.h

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:55:31 -07:00
Jade Bilkey 75a0ef14fc staging: silicom: 80 character and tab formatting in libbp_sd.h
Fixes 80+ character limit warnings from checkpatch.pl
Changes aesthetics of spaces and tabs where appropriate.

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 19:48:41 -08:00
Jade Bilkey c509fdd94a staging: silicom: fix trailing whitespace in libbp_sd.h
Fixes checkpatch.pl trailing whitespace errors.

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Reviewed-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 19:48:41 -08:00
Surendra Patil f1fe476ecb drivers:staging:silicom fixed checkpatch coding style error on macros
checkpatch displays below errors for bypasslib/bp_ioctl.h file

	 ERROR: Macros with complex values should be enclosed in parenthesis
Hence added parenthesis for macros with complex values.

Signed-off-by: Surendra Patil <surendra.tux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-12 09:32:17 -08:00
Wei Yongjun c246d19ab1 Staging: silicom: fix sparse non static symbol warnings
Fixes the following sparse warnings:

drivers/staging/silicom/bypasslib/bypass.c:528:12: warning: symbol 'init_lib_module' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:534:13: warning: symbol 'cleanup_lib_module' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-09 10:28:15 -08:00
Michael Hoefler 382d277b38 silicom: remaining checkpatch issues in bypass.c
In this patch we fix some "logical" errors in bypass.c of the silicom bypass
driver (in staging).

Checkpatch complains about the following errors:
 - unnecessary forward declarations in a source file
 - assignment in if condition

In addition to that the __init and __exit macros were missing at the init and
cleanup function.

There are still two warnings left for this file related to too many leadingtabs
at nested blocks. I did not touch this issue becasue the code needs really some
refactoring. And since i do not have the appropriate hardware to test the code,
i do not change the functionality in any way.

Signed-off-by: Michael Hoefler <michael.hoefler@studium.uni-erlangen.de>
Signed-off-by: Christoph Kohl <christoph.kohl@t-online.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 09:04:49 -08:00
Michael Hoefler 6618b75069 silicom: fix coding style issues in bypass.c
This patch improves bypass.c (in staging) in terms of coding style. This
includes different issues some of them mentioned by checkpatch:

 - a c++ one line comment
 - parenthesis at return statementes
 - multiple definitions in one line
 - missing braces according to the style guide

Signed-off-by: Michael Hoefler <michael.hoefler@studium.uni-erlangen.de>
Signed-off-by: Christoph Kohl <christoph.kohl@t-online.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 09:04:49 -08:00
Michael Hoefler 74552f1b2f silicom: fix whitespace issues in bypass.c
This patch addresses several problems in bypass.c found by checkpatch.
Furthermore it removes/adds some empty lines to make the code more readable.

The following problems are fixed:
 - line over 80 characters
 - space after logical operator !
 - spaces instead of tabs
 - missing empty line after local declarations
 - empty line after {

The empty line issues were not discovered by checkpatch but in my opinion these
changes make perfect sense in terms of readability.

Signed-off-by: Michael Hoefler <michael.hoefler@studium.uni-erlangen.de>
Signed-off-by: Christoph Kohl <christoph.kohl@t-online.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 09:04:49 -08:00
Rupert Muchembled 473b171625 Staging: silicom: Remove unnecessary variable from get_bypass_info()
Remove unnecessary variable ioctl from get_bypass_info().

As a consequence, this patch removes an assignment to ioctl in an if condition,
reported by checkpatch.pl.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11 16:34:54 -08:00
Rupert Muchembled a82c40cba2 Staging: silicom: Remove unnecessary variable from do_cmd()
Remove unnecessary variable ioctl from do_cmd().

As a consequence, this patch removes an assignment to ioctl in an if condition,
reported by checkpatch.pl.

Signed-off-by: Rupert Muchembled <rupert@rmuch.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11 16:34:54 -08:00
Chad Williamson 22ca14a9d9 Staging: silicom: move symbol exports beneath definitions in bypass.c
Move the EXPORT_SYMBOL macros in bypass.c beneath the definitions
they refer to, resolving checkpatch.pl warnings. While we're at it, use
EXPORT_SYMBOL rather than EXPORT_SYMBOL_NOVERS.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:31:10 -07:00
Chad Williamson c482ca7294 Staging: silicom: remove the EXPORT_SYMBOL_NOVERS macro
Since all references to EXPORT_SYMBOL_NOVERS have been removed,
we can remove its definition from bp_mod.h and bypasslib/bplibk.h.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 14:31:09 -07:00
Lisa Nguyen a30c0e1975 staging/silicom/bypasslib: Move opening brace to previous line
Moved opening brace to previous line to resolve checkpatch errors and
meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:03:32 +09:00
Lisa Nguyen d5025da5e6 staging/silicom/bypasslib: Remove extra space before line
Removed extra space at beginning of a statement to resolve
checkpatch errors and meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:03:31 +09:00
Lisa Nguyen 0248598d03 staging/silicom/bypasslib: Add space around ||
Added space around piping symbols to resolve checkpatch errors and
meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:03:30 +09:00
Lisa Nguyen 14cd6f9941 staging/silicom/bypasslib: Add space around &&
Added space around double ampersands to resolve checkpatch errors
and meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:03:30 +09:00
Lisa Nguyen d8195f86b4 staging/silicom/bypasslib: Add space around ==
Added space around equal signs to resolve checkpatch errors and
meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:03:29 +09:00
Lisa Nguyen f55a69012a staging/silicom/bypasslib: Fix code indentation errors
Fixed code indentation errors generated by checkpatch.pl to
meet kernel coding standards in bplibk.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:03:29 +09:00
Lisa Nguyen 4d18cd3c08 staging/silicom/bypasslib: Reformat comments
Resolved the C99 comment style issue by reformatting existing comments
to meet kernel coding standards in bp_ioctl.h

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 21:03:29 +09:00
Randy Dunlap 90a08fdcd4 staging: fix all sparse warnings in silicom/bypasslib/
Fix all sparse warning in drivers/staging/silicom/bypasslib/,
e.g.:

drivers/staging/silicom/bypasslib/bypass.c:471:21: warning: non-ANSI function declaration of function 'init_lib_module'
drivers/staging/silicom/bypasslib/bypass.c:478:25: warning: non-ANSI function declaration of function 'cleanup_lib_module'
drivers/staging/silicom/bypasslib/bypass.c:137:5: warning: symbol 'is_bypass_dev' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:182:5: warning: symbol 'is_bypass' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:192:5: warning: symbol 'get_bypass_slave' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:197:5: warning: symbol 'get_bypass_caps' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:202:5: warning: symbol 'get_wd_set_caps' was not declared. Should it be static?
etc.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 09:43:40 -07:00
Wei Yongjun f489e2d0ee Staging: silicom: bypasslib: remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-01 08:44:42 -07:00
Chad Williamson 3e4cce9dad Staging: silicom: remove code requiring an old LINUX_VERSION_CODE
Remove all code and associated preprocessor logic dependent on an old
LINUX_VERSION_CODE since such code is dead for an in-kernel driver.

Signed-off-by: Chad Williamson <chad@dahc.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-29 15:01:02 -07:00
Jesper Juhl 4c0a655387 Staging: silicom: Fix up version.h includes
drivers/staging/silicom/bypasslib/bplibk.h actually uses stuff from
version.h so it should include the header.
drivers/staging/silicom/bp_proc.c and
drivers/staging/silicom/bypasslib/bypass.c currently include the
header but use nothing from it so they don't need to.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 15:57:13 -07:00
Daniel Cotey 13d6b7b21a Staging: silicom: minor cleanup: remove unused define
DEVICE_NODE not used

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 14:31:52 -07:00
DanielC 7040e556c9 staging: add Silicom Bypass driver
The Silicom Bypass Network Interface Cards (NICs) are network cards with
paired ports (2 or 4).  The pairs either act as a "wire" allowing the
network packets to pass or insert the device in between the two ports.
When paired with the on-board hardware watchdog or other failsafe, they
provide high availability for the network in the face of software
outages or maintenance.

Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:12:43 -07:00