Commit Graph

46 Commits

Author SHA1 Message Date
Al Viro bae301d346 staging: single_open() leaks
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-05 00:15:43 -04:00
Linus Torvalds 20b4fb4852 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS updates from Al Viro,

Misc cleanups all over the place, mainly wrt /proc interfaces (switch
create_proc_entry to proc_create(), get rid of the deprecated
create_proc_read_entry() in favor of using proc_create_data() and
seq_file etc).

7kloc removed.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
  don't bother with deferred freeing of fdtables
  proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
  proc: Make the PROC_I() and PDE() macros internal to procfs
  proc: Supply a function to remove a proc entry by PDE
  take cgroup_open() and cpuset_open() to fs/proc/base.c
  ppc: Clean up scanlog
  ppc: Clean up rtas_flash driver somewhat
  hostap: proc: Use remove_proc_subtree()
  drm: proc: Use remove_proc_subtree()
  drm: proc: Use minor->index to label things, not PDE->name
  drm: Constify drm_proc_list[]
  zoran: Don't print proc_dir_entry data in debug
  reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
  proc: Supply an accessor for getting the data from a PDE's parent
  airo: Use remove_proc_subtree()
  rtl8192u: Don't need to save device proc dir PDE
  rtl8187se: Use a dir under /proc/net/r8180/
  proc: Add proc_mkdir_data()
  proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
  proc: Move PDE_NET() to fs/proc/proc_net.c
  ...
2013-05-01 17:51:54 -07:00
David Howells 766d100d4e cxt1e1: Don't use create_proc_read_entry()
Don't use create_proc_read_entry() as that is deprecated, but rather use
proc_create_data() and seq_file instead.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Bob Beers <bob.beers@gmail.com>
cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: devel@driverdev.osuosl.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-29 15:41:52 -04:00
Chen Gang f1159d7cc0 Drivers: Staging: cxt1e1: strncpy issue, need set zero at the end.
need set '\0' at the end. or cause issue.

    it is called by c4_ioctl in drivers/staging/cxt1e1/linux.c
    all things need be initialized, before provide them to user mode.
    so we can not use strlcpy instead of strncpy.

  code style:
    all contents of the file use 4 spaces instead of '\t',
    so this patch has to follow, now.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-08 10:32:53 -07:00
Dan Carpenter 96a8d14e87 staging: cxt1e1: buffer overflow in do_del_chan()
If we don't restrict "cp.channum" to 3 digits then the sprintf() will
overflow.  I've added a check and changed the sprintf() to snprintf().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 11:21:26 -08:00
Johan Meiring 477953e13a staging: cxt1e1: sbecrc.c: fixes coding style issue
This commit sorts out a coding style issue related to spaces between
parentheses and function names.

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:21:48 -08:00
Johan Meiring 3effcd06fb staging: cxt1e1: sbecrc.c: fixes brace placement
This commit sorts out the incorrect placement of braces in the file.

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:21:48 -08:00
Johan Meiring 0b7ccbeda0 staging: cxt1e1: sbecrc.c: fixes indentation issues
This commit converts several instances of space-based indentation
to use tabs instead.

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:21:48 -08:00
Johan Meiring 77c84b2995 staging: cxt1e1: musycc.c: fixes placement of parentheses
This commit fixes several incorrect placements of parantheses, as
identified by the checkpatch.pl tool.

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:21:47 -08:00
Johan Meiring fead55a03c staging: cxt1e1: musycc.c: fixes brace placement
This commit fixes incorrect brace placement as reported by the
checkpatch.pl tool.

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:20:39 -08:00
Johan Meiring ea9d1e960c staging: cxt1e1: musycc.c: uses tabs for indentation
This commit converts several instances of space usage for
indentation to tabs.

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:20:39 -08:00
Johan Meiring 1bcf4b2a22 staging: cxt1e1: musycc.h: fixes brace placement
This commit fixes incorrect brace placement.

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:20:39 -08:00
Johan Meiring 185b34d2b1 staging: cxt1e1: musycc.h: fixes coding style issues
This commit fixes instances of spaces being used for indentation
instead of tabs.

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:20:38 -08:00
Johan Meiring dec80537cc staging: cxt1e1: musycc.h: fixes indentation issues
This commit fixes indentation issues that were reported by the
checkpatch.pl tool.

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:18:40 -08:00
Devendra Naga 21aac2c935 staging: cxt1e1: solve coding style problem
remove the spaces and replace with tabs at the beginning of a line
and also remove space between function call and its open paranthesis

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:27:42 -07:00
Devendra Naga a47bf2452b staging: cxt1e1: use kernel's way of returning error codes
The error codes the kernel functions return are -ve numbers, convert this
function to follow the other kernel functions

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:27:41 -07:00
Linus Torvalds 12e5550892 Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (466 commits)
  net/hyperv: Add support for jumbo frame up to 64KB
  net/hyperv: Add NETVSP protocol version negotiation
  net/hyperv: Remove unnecessary kmap_atomic in netvsc driver
  staging/rtl8192e: Register against lib80211
  staging/rtl8192e: Convert to lib80211_crypt_info
  staging/rtl8192e: Convert to lib80211_crypt_data and lib80211_crypt_ops
  staging/rtl8192e: Add lib80211.h to rtllib.h
  staging/mei: add watchdog device registration wrappers
  drm/omap: GEM, deal with cache
  staging: vt6656: int.c, int.h: Change return of function to void
  staging: usbip: removed unused definitions from header
  staging: usbip: removed dead code from receive function
  staging:iio: Drop {mark,unmark}_in_use callbacks
  staging:iio: Drop buffer mark_param_change callback
  staging:iio: Drop the unused buffer enable() and is_enabled() callbacks
  staging:iio: Drop buffer busy flag
  staging:iio: Make sure a device is only opened once at a time
  staging:iio: Disallow modifying buffer size when buffer is enabled
  staging:iio: Disallow changing scan elements in all buffered modes
  staging:iio: Use iio_buffer_enabled instead of open coding it
  ...

Fix up conflict in drivers/staging/iio/adc/ad799x_core.c (removal of
module_init due to using module_i2c_driver() helper, next to removal of
MODULE_ALIAS due to using MODULE_DEVICE_TABLE instead).
2012-01-09 12:18:17 -08:00
Justin P. Mattock 42b2aa86c6 treewide: Fix typos in various parts of the kernel, and fix some comments.
The below patch fixes some typos in various parts of the kernel, as well as fixes some comments.
Please let me know if I missed anything, and I will try to get it changed and resent.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-12-02 14:57:31 +01:00
Alexander Beregalov cd420765eb Staging: cxt1e1: remove rcs keywords and log
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:11:35 -08:00
Alexander Beregalov 48d7c08f0f Staging: cxt1e1: remove ifdef __cplusplus
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:11:35 -08:00
Alexander Beregalov 05c0cb4e40 Staging: cxt1e1: remove unnecessary includes
Remove *BSD, SunOS and userspace includes.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:11:35 -08:00
Paul Gortmaker 452962366c staging: Add module.h to more drivers implicitly using it.
This 2nd batch of implicit module.h users only appeared when we
removed the unnecessary module.h from include/linux/miscdevice.h
[The 1st batch is already present in Greg's staging tree.]

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:32:10 -04:00
Linus Torvalds aa77677e0a Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1519 commits)
  staging: et131x: Remove redundant check and return statement
  staging: et131x: Mainly whitespace changes to appease checkpatch
  staging: et131x: Remove last of the forward declarations
  staging: et131x: Remove even more forward declarations
  staging: et131x: Remove yet more forward declarations
  staging: et131x: Remove more forward declarations
  staging: et131x: Remove forward declaration of et131x_adapter_setup
  staging: et131x: Remove some forward declarations
  staging: et131x: Remove unused rx_ring.recv_packet_pool
  staging: et131x: Remove call to find pci pm capability
  staging: et131x: Remove redundant et131x_reset_recv() call
  staging: et131x: Remove unused rx_ring.recv_buffer_pool
  Staging: bcm: Fix three initialization errors in InterfaceDld.c
  Staging: bcm: Fix coding style issues in InterfaceDld.c
  staging:iio:dac: Add AD5360 driver
  staging:iio:trigger:bfin-timer: Fix compile error
  Staging: vt6655: add some range checks before memcpy()
  Staging: vt6655: whitespace fixes to iotcl.c
  Staging: vt6656: add some range checks before memcpy()
  Staging: vt6656: whitespace cleanups in ioctl.c
  ...

Fix up conflicts in:
 - drivers/{Kconfig,Makefile}, drivers/staging/{Kconfig,Makefile}:
	vg driver movement
 - drivers/staging/brcm80211/brcmfmac/{dhd_linux.c,mac80211_if.c}:
	driver removal vs now stale changes
 - drivers/staging/rtl8192e/r8192E_core.c:
	driver removal vs now stale changes
 - drivers/staging/et131x/et131*:
	driver consolidation into one file, tried to do fixups
2011-10-26 15:39:02 +02:00
Paul Bolle 395cf9691d doc: fix broken references
There are numerous broken references to Documentation files (in other
Documentation files, in comments, etc.). These broken references are
caused by typo's in the references, and by renames or removals of the
Documentation files. Some broken references are simply odd.

Fix these broken references, sometimes by dropping the irrelevant text
they were part of.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-27 18:08:04 +02:00
Yong Zhang 18e9351e45 staging: irq: Remove IRQF_DISABLED
This flag is a NOOP and can be removed now.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16 20:09:38 +02:00
Michal Marek ce92b7ad6c staging/cxt1e1: Header cleanup
Remove dead and unused code in sbecom_inline_linux.h. This also fixes a
build failure under Turkish locale, where include/config/modversions.h
is incorrectly named as modversIons.h (an unrelated kbuild bug) and the
driver tries to needlessly include the empty file.

Reported-by: Serdar KÖYLÜ <s.koylux@gmail.com>
Cc: Bob Beers <bob.beers@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:49:30 -07:00
Jesper Juhl 08a3901c52 Remove unneeded version.h include from drivers/staging/cxt1e1/sbecom_inline_linux.h
It was pointed out by 'make versioncheck' that include of
linux/version.h is not needed in
drivers/staging/cxt1e1/sbecom_inline_linux.h
This patch removes it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 10:39:39 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Uwe Kleine-König 9e36261d45 staging/trivial: fix typos concerning "consistent"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:10 -08:00
Ralph Loader 3ec6080e2e staging: Fix some incorrect use of positive error codes.
Use -E... instead of just E... in a few places where negative error
codes are expected by a functions callers.  These were found by grepping
with coccinelle & then inspecting by hand to determine which were bugs.

The staging/cxt1e1 driver appears to intentionally use positive E...
error codes in some places, and negative -E... error codes in others,
making it hard to know which is intended where - very likely I missed
some problems in that driver.

Signed-off-by: Ralph Loader <suckfish@ihug.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21 12:35:50 -08:00
Greg Kroah-Hartman b8b739941e Staging: cxt1e1: rename global log_level variable
The driver should not have such a generic global variable name.

Reported-by: Zimny Lech <napohybelskurwysynom2010@gmail.com>
Cc: Bob Beers <bob.beers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-10 10:46:30 -08:00
Bob Beers c694ed85ea Staging: cxt1e1: multiple definition of max_mtu fix
eliminate multiple definition of max_mtu by renaming
 with cxt1e1_ prefix, similarly rename max_mru

Signed-off-by: Bob Beers <bbeers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:12:14 -07:00
Tracey Dent a4f131f07c Staging: cxt1e1: Makefile: replace the use of <module>-objs with <module>-y
Changed <module>-objs to <module>-y in Makefile.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:23:50 -07:00
Tracey Dent 6fa7aa0d13 Staging: cxt1e1: Makefile: cleaned up Makefile cflag lines
Changed to use the proper ccflags-y option

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-05 11:56:39 -07:00
Andy Shevchenko b01d467ddd staging: cxt1e1: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:56 -07:00
Andy Shevchenko ff5cb20b7b staging: cxt1e1: use '%pMF' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:11 -07:00
Thomas Gleixner 0f0800f17a staging: Bulk convert the semaphore mess
init_MUTEX(_LOCKED) and DECLARE_MUTEX are going away. Bulk convert
staging users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-07 19:31:32 -07:00
Michael Prokop d5fa13361b Staging: cxt1e1: Kconfig: SBE_PMCC4_NCOMM can not be compiled as module, adjust help description
The Kconfig description for CONFIG_SBE_PMCC4_NCOMM says:

  If you have purchased this optional support you must say Y or M
  here to allow the driver to operate with the NCOMM product.

This is not correct as it can not be built as module,
this patch updates the description accordingly.

Signed-off-by: Michael Prokop <mika@grml.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 16:59:56 -07:00
Jiri Kosina 9c770f3b88 Staging: cxt1e1: remove code guarded by GENERIC_HDLC_VERSION
Current linux kernel has GENERIC_HDLC_VERSION equal to 4, no need to
have dead code in-kernel which was there for ancient kernel versions.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:20:59 -07:00
Jiri Kosina 5749df14ae Staging: cxt1e1: remove all code dependent on LINUX_VERSION_CODE
Remove all code which is dead for in-kernel driver due to being
ifdefed by LINUX_VERSION_CODE.

While at it, also remove surrounding code which is commented out,
or '#if 1' nops.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-18 15:16:21 -07:00
Randy Dunlap 7c1e68ba92 staging: cxt1e1: fix semaphore build breakage
Fix build errors by including linux/semaphore.h:

drivers/staging/cxt1e1/pmcc4_private.h:144: error: field 'sr_sem_busy' has incomplete type
drivers/staging/cxt1e1/pmcc4_private.h:146: error: field 'sr_sem_wait' has incomplete type
drivers/staging/cxt1e1/pmcc4_private.h:189: error: field 'sem_wdbusy' has incomplete type
drivers/staging/cxt1e1/musycc.c:617: error: implicit declaration of function 'down'
drivers/staging/cxt1e1/musycc.c:641: error: implicit declaration of function 'up'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 14:15:34 -07:00
Peter Hüwe 40447df803 Staging: cxt1e1: fix up one remaining THIS_MODULE usage
Copied from original Patch by Randy Dunlap

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:11 -07:00
Joe Perches 694a98073f Staging: staging/cxt1e1: Convert bare printks to pr_<level>
Added #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
A few line splits for long arguments
A couple of embedded function names converted to "%s", __func__
Removed some uses of THIS_MODULE->name

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:04 -07:00
Joe Perches e6e4d05d4d Staging: cxt1e1: fix cxt1e1 module names
On Mon, 2010-05-03 at 10:09 -0700, Randy Dunlap wrote:
> Lots of cxt1e1 source code uses THIS_MODULE->name, which won't build
> when CONFIG_MODULES is not enabled, so use KBUILD_MODNAME instead.

Perhaps a conversion to pr_<level> is better?

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:02 -07:00
Randy Dunlap d87d909a45 Staging: cxt1e1: use netdev_priv to fix build
Fix cxt1e1 build error:
drivers/staging/cxt1e1/linux.c:1195: error: 'struct net_device' has no member named 'priv'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Bob Beers <bob.beers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:57 -07:00
Bob Beers 50ee11fe38 staging: Add driver to support wanPMC-CxT1E1 card.
Obviously still needs serious attention, but it compiles.

Original author: Rick Dobbs

Add driver to support wanPMC-CxT1E1 card.

This card provides 1-4 ports of T1E1 in PMC form factor.

Note, Rick doesn't want his email showing up as the "From:" author, but
has given his blessing to have the code included in the kernel tree.

Signed-off-by: Bob Beers <bob.beers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:31 -07:00