summaryrefslogtreecommitdiffstats
path: root/drivers/staging/silicom
Commit message (Collapse)AuthorAgeFilesLines
* silicom-bypass: Remove device_open/close()David Howells2013-04-091-24/+0
| | | | | | | Remove device_open/close() functions as they don't really do anything and remove Device_Open as it isn't counted atomically and the value isn't used. Signed-off-by: David Howells <dhowells@redhat.com>
* constify a bunch of struct file_operations instancesAl Viro2013-04-091-1/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* procfs: new helper - PDE_DATA(inode)Al Viro2013-04-091-19/+19
| | | | | | | | | | The only part of proc_dir_entry the code outside of fs/proc really cares about is PDE(inode)->data. Provide a helper for that; static inline for now, eventually will be moved to fs/proc, along with the knowledge of struct proc_dir_entry layout. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* silicom: bury bp_proc.cAl Viro2013-04-093-1330/+0
| | | | | | | | | It's a seriously rotten copy of parts of bp_mod.c; had been ifdefed out all along, lacks a bunch of declarations that would be needed if ifdef had been removed, all stuff in it is duplicated in bp_mod.c anyway... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* silicom: switch to create_proc_data(), clean procfs side of things upAl Viro2013-04-091-820/+379
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* silicom: untangle module_initAl Viro2013-04-091-192/+133
| | | | | | Helper functions are often useful. So are local variables... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* silicom: get_bypass_slave_pfs() open-codes lookup_port()Al Viro2013-04-091-25/+2
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* silicom: unobfuscate get_{status,master}_port_fn()Al Viro2013-04-091-48/+19
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* silicom: helper functions are often useful...Al Viro2013-04-091-280/+43
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Staging: silicom: bypasslib: remove unused including <linux/version.h>Wei Yongjun2012-11-011-1/+0
| | | | | | | | | | 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>
* Staging: silicom: remove unused including <linux/version.h>Wei Yongjun2012-11-011-1/+0
| | | | | | | | | | 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>
* Staging: silicom: remove code requiring an old LINUX_VERSION_CODEChad Williamson2012-10-292-213/+3
| | | | | | | | 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>
* Staging: silicom: Fix up version.h includesJesper Juhl2012-10-223-2/+1
| | | | | | | | | | | 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>
* Staging: silicom: fix up compiler warnings in bp_proc.cGreg Kroah-Hartman2012-10-221-3/+1
| | | | | | | | | | This removes the compiler warnings for unused variables and functions in the bp_proc.c file. Cc: Chad Williamson <chad@dahc.us> Cc: Daniel Cotey <puff65537@bansheeslibrary.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: silicom: fix explicit intialization of procfs_dir in bp_proc.cChad Williamson2012-10-221-1/+1
| | | | | | | | Remove explicit intialization of static procfs_dir to NULL, resolving a checkpatch.pl error. Signed-off-by: Chad Williamson <chad@dahc.us> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: silicom: remove unnecessary braces in bp_proc.cChad Williamson2012-10-221-39/+19
| | | | | | | | Remove unnecessary braces from single statement blocks in bp_proc.c, resolving checkpatch.pl warnings. Signed-off-by: Chad Williamson <chad@dahc.us> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: silicom: remove parentheses from return statements in bg_proc.cChad Williamson2012-10-221-2/+2
| | | | | | | | Remove unnecessary parentheses from return statements in bg_proc.c to resolve checkpatch.pl errors. Signed-off-by: Chad Williamson <chad@dahc.us> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: silicom: fix C99 comments in bp_proc.cChad Williamson2012-10-221-3/+3
| | | | | | | Fix C99 // comments in bp_proc.c to resolve checkpatch.pl errors. Signed-off-by: Chad Williamson <chad@dahc.us> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: silicom: fix whitespace in bp_proc.cChad Williamson2012-10-221-6/+6
| | | | | | | Remove superfluous spaces in bp_proc.c to resolve checkpatch.pl errors. Signed-off-by: Chad Williamson <chad@dahc.us> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: silicom: pointless check removalAlan Cox2012-10-221-9/+2
| | | | | | | bus_info is an array not a pointer. Fix silly if check Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fix silicom dependencies and build errorsRandy Dunlap2012-09-211-2/+2
| | | | | | | | | | | | | | | Fix kconfig dependencies in silicom. Fixes these build errors: ERROR: "init_net" [drivers/staging/silicom/bypasslib/bypass.ko] undefined! ERROR: "register_netdevice_notifier" [drivers/staging/silicom/bpctl_mod.ko] undefined! ERROR: "unregister_netdevice_notifier" [drivers/staging/silicom/bpctl_mod.ko] undefined! ERROR: "init_net" [drivers/staging/silicom/bpctl_mod.ko] undefined! ERROR: "netdev_info" [drivers/net/mii.ko] undefined! ERROR: "netif_carrier_on" [drivers/net/mii.ko] undefined! ERROR: "netif_carrier_off" [drivers/net/mii.ko] undefined! Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.c: checkpatch cleanups: C99 commentsDaniel Cotey2012-09-191-154/+70
| | | | | | | remove code or change to traditional comments Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.c: checkpatch cleanup: fix returnsDaniel Cotey2012-09-191-84/+81
| | | | | | | Fix up all the returns to cannonical form, and an ifdef removal Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-35/+35
| | | | | | | last of the unstylistic pointers cleaned up Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-41/+41
| | | | | | | pointer style cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-33/+33
| | | | | | | more checkpatch cleanups of pointers. Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-33/+33
| | | | | | | More pointer style cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-32/+32
| | | | | | | More notation fixes Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-23/+23
| | | | | | | first chunk, straighten up the pointer notation Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: checkpatch cleanup: fix includesDaniel Cotey2012-09-171-4/+1
| | | | | | | checkpatch fixups Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: checkpatch cleanup: header file whitespaceDaniel Cotey2012-09-171-26/+26
| | | | | | | Finish trailing spaces in libbp_sd.h Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: checkpatch cleanup: header file whitespaceDaniel Cotey2012-09-171-71/+71
| | | | | | | Whack all the line ending spaces so checkpatch.pl is happy. Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bypass.h: checkpatch whitespaceDaniel Cotey2012-09-171-27/+27
| | | | | | | Remove trailing spaces, second chunk Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bypass.h: checkpatch whitespaceDaniel Cotey2012-09-171-2/+2
| | | | | | | Remove trailing spaces, first chunk Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-5/+5
| | | | | | | twelfth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-22/+22
| | | | | | | eleventh chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-16/+16
| | | | | | | tenth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-24/+24
| | | | | | | ninth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-15/+15
| | | | | | | eighth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-27/+27
| | | | | | | seventh chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-5/+5
| | | | | | | sixth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-6/+6
| | | | | | | fifth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-15/+15
| | | | | | | fourth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-13/+13
| | | | | | | third chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-8/+8
| | | | | | | second chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-3/+3
| | | | | | | first chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: silicom: fix a comparing proc_dir_entry pointer against 0Devendra Naga2012-09-171-3/+1
| | | | | | | | | we should be using the NULL macro, not 0 to compare against a pointer value, and also remove braces around the single if conditional after the create_proc_entry Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: use kstrtoint_from_user()Dan Carpenter2012-09-171-22/+10
| | | | | | | | | | The main problem with the hand rolled code was that there weren't any range checks so you could corrupt memory by writing too much data to the proc file. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: add some range checks to proc functionsDan Carpenter2012-09-171-0/+24
| | | | | | | | | If you tried to cat more than 255 characters (the last character is for the terminator) to these proc files then it would corrupt kernel memory. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: silicom: remove S_IWOTH from proc declarationDan Carpenter2012-09-122-4/+2
| | | | | | | | We don't need these to be world writable or group writable. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud