Commit graph

348581 commits

Author SHA1 Message Date
David 'Digit' Turner
c89f2750e9 goldfish: add QEMU pipe driver
A QEMU pipe is a very fast communication channel between the
guest system and the emulator. Usage from the guest is simply
something like;

  // connect to special device
  fd = open("/dev/qemu_pipe", O_RDWR);

  // tell which service we want to talk to (must be zero-terminated)
  write(fd, "pipeName", strlen("pipeName")+1);

  // do read()/write() through fd now
  ...

  // close channel
  close(fd);

Signed-off-by: David 'Digit' Turner <digit@android.com>
[Added support for parameter buffers for speed]
igned-off-by: Xin, Xiaohui <xiaohui.xin@intel.com>
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Nakajima, Jun <jun.nakajima@intel.com>
[Ported to 3.6]
Signed-off-by: Tom Keel <thomas.keel@intel.com>
[Ported to 3.7, moved to platform/goldfish]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-24 13:49:34 -08:00
Jun Nakajima
e809c22b8f goldfish: add the goldfish virtual bus
This imports the current Google code and cleans it up slightly to use pr_ and
to properly request its resources.

Goldfish is an emulator used for Android development. It has a virtual bus where
the emulator passes platform device information to the guest which then creates
the appropriate devices.

This part of the emulation is not architecture specific so should not be hiding
in architecture trees as it does in the Google Android tree. The constants it
uses do depend on the platform and the platform creates the bus device which then
talks to the emulator to ascertain the actual devices present.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
[Moved out of x86, cleaned up headers]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-24 13:49:34 -08:00
Mark Einon
c0594ee9ea staging: et131x: Fix all sparse warnings
Dan Carpenter has pointed out that there are several sparse warnings
from et131x.c, listed below. This patch fixes all these errors.

drivers/staging/et131x/et131x.c:1870:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1870:33:    expected unsigned int [usertype] *num_des
drivers/staging/et131x/et131x.c:1870:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1871:37: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1871:37:    expected unsigned int [usertype] *full_offset
drivers/staging/et131x/et131x.c:1871:37:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1872:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1872:33:    expected unsigned int [usertype] *min_des
drivers/staging/et131x/et131x.c:1872:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1873:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1873:33:    expected unsigned int [usertype] *base_hi
drivers/staging/et131x/et131x.c:1873:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1874:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1874:33:    expected unsigned int [usertype] *base_lo
drivers/staging/et131x/et131x.c:1874:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1876:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1876:33:    expected unsigned int [usertype] *num_des
drivers/staging/et131x/et131x.c:1876:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1877:37: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1877:37:    expected unsigned int [usertype] *full_offset
drivers/staging/et131x/et131x.c:1877:37:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1878:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1878:33:    expected unsigned int [usertype] *min_des
drivers/staging/et131x/et131x.c:1878:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1879:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1879:33:    expected unsigned int [usertype] *base_hi
drivers/staging/et131x/et131x.c:1879:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1880:33: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:1880:33:    expected unsigned int [usertype] *base_lo
drivers/staging/et131x/et131x.c:1880:33:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:1898:24: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:1898:24:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:1898:24:    got unsigned int [usertype] *base_hi
drivers/staging/et131x/et131x.c:1900:24: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:1900:24:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:1900:24:    got unsigned int [usertype] *base_lo
drivers/staging/et131x/et131x.c:1901:60: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:1901:60:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:1901:60:    got unsigned int [usertype] *num_des
drivers/staging/et131x/et131x.c:1902:39: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:1902:39:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:1902:39:    got unsigned int [usertype] *full_offset
drivers/staging/et131x/et131x.c:1910:24: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:1910:24:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:1910:24:    got unsigned int [usertype] *min_des
drivers/staging/et131x/et131x.c:2583:32: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:2583:32:    expected unsigned int [usertype] *offset
drivers/staging/et131x/et131x.c:2583:32:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:2585:32: warning: incorrect type in assignment (different address spaces)
drivers/staging/et131x/et131x.c:2585:32:    expected unsigned int [usertype] *offset
drivers/staging/et131x/et131x.c:2585:32:    got unsigned int [noderef] <asn:2>*<noident>
drivers/staging/et131x/et131x.c:2602:24: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/et131x/et131x.c:2602:24:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/et131x/et131x.c:2602:24:    got unsigned int [usertype] *offset
drivers/staging/et131x/et131x.c:4093:13: warning: symbol 'et131x_isr' was not declared. Should it be static?

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 09:15:18 -08:00
Harvey Yang
50b66b5ce4 staging: usbip: replace the interrupt safe spinlocks with common ones.
On the client side, we have a virtual hcd driver, there actually no
hardware interrupts, so we do not need worry about race conditions
caused by irq with spinlock held. Turning off irq is not good for system
performance after all. Just replace them with a non interrupt safe
version.

Signed-off-by: Harvey Yang <harvey.huawei.yang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 09:00:10 -08:00
Harvey Yang
dcf1477928 staging: usbip: use interrupt safe spinlock to avoid potential deadlock.
The function 'usbip_event_add()' may be called in interrupt context on
the stub side:
'stub_complete'->'stub_enqueue_ret_unlink'->'usbip_event_add'.
In this function it tries to get the lock 'ud->lock', so we should
disable irq when we get this lock in process context.

Signed-off-by: Harvey Yang <harvey.huawei.yang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 09:00:10 -08:00
Mark Einon
26ef1021c1 staging: et131x: Modify block comments to fit with networking style
In preparation for moving et131x to drivers/net, fixup the block
comments to match the preferred networking style - no /* on separate
line, but */ are on a seperate line.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 08:58:44 -08:00
Mark Einon
c655dee929 staging: et131x: Trivial camel case fixes
Checkpatch now highlights some camel case flag names. Fix these issues.

Also fix some remaining lines > 80chars issues for completeness.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 08:58:44 -08:00
Mark Einon
c8b0a484cc staging: et131x: Fix endian bugs in et131x_get_regs()
et131x_get_regs() calls et131x_mii_read(), passing the address of a u32
which is cast to a (u16 *). This works fine for little endian systems,
but not for big endian. Change so that the types are cast, not pointers
to the types.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 08:58:44 -08:00
Devendra Naga
c095454e4b staging: sep: remove assignment to i and j in sep_crypto_setup
the i and j are used in for loop and they assigned to zeros in the
for loop, so no need to assign them to zeros again.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 08:58:44 -08:00
Devendra Naga
7b63c5772f staging: dgrp: check for a valid proc dir entry pointer
while proc_create fails, the register_proc_table can do a derefernce of the
null pointer causing to oops the system, instead check for a valid pointer
at register and unregister

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 08:58:44 -08:00
H Hartley Sweeten
b194218dba staging: comedi: addi_apci_16xx: add defines for the PCI device ids
The PCI device ids supported by this driver are used multiple
places in the code. To improve maintainability, create #define's
for them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:08:50 -08:00
H Hartley Sweeten
5e72c1744f staging: comedi: addi_apci_16xx: change the MODULE_DESCRIPTION
Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver" so that modinfo provides a
better description of the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:08:50 -08:00
H Hartley Sweeten
1cc2be9139 staging: comedi: addi_apci_16xx: remove unnecessary include
This driver does not use any of the functionality provided by
comedi_fc.h. Remove the #include.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:08:50 -08:00
H Hartley Sweeten
0ecb3ea9ce staging: comedi: addi_apci_16xx: add missing copyright comment
Add the missing copyright information. This information was
originally in the hwdrv_apci16xx.c file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:08:50 -08:00
H Hartley Sweeten
92eb37959f staging: comedi: addi_apci_16xx: rewrite low-level support code
The current low-level support code in hwdrv_apci16xx.c is seriously
broken. Besides that, it's overly complicated.

Rewrite, and simplify, the low-level code so it complies with the
comedi API.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:08:05 -08:00
H Hartley Sweeten
26b3989946 staging: comedi: addi_apci_2200: change the MODULE_DESCRIPTION
Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver" so that modinfo provides a
better description of the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:03:02 -08:00
H Hartley Sweeten
20f2e2e1ce staging: comedi: addi_apci_2200: only allocate needed subdevices
The addi-data "common" code always allocated 7 subdevices. This
driver only requires 3. Change the allocation and remove the
unused subdevices.

Update the comments for the initialization of each subdevice.

Also, update the subdevice that is passed to addi_watchdog_cleanup()
to match the new subdevice number.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:03:02 -08:00
H Hartley Sweeten
5872471364 staging: comedi: addi_apci_2200: add missing copyright comment
Add the missing copyright information. This information was
originally in the hwdrv_apci2200.c file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:03:02 -08:00
H Hartley Sweeten
43ae290bf8 staging: comedi: addi_apci_2200: remove unnecessary include
This driver does not use any of the support provided by comedi_fc.h.
Remove it's include.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:03:02 -08:00
H Hartley Sweeten
2762a09d77 staging: comedi: addi_apci_2200: remove unnecessary boardinfo
The boardinfo is not longer needed by this driver. Remove it
as well as the addi_find_boardinfo() function.

This removes the final ties to the addi-data "common" code so
remove the #include for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:03:02 -08:00
H Hartley Sweeten
3f8e9e67cb staging: comedi: addi_apci_2200: remove devpriv allocation
The 'devpriv' is not used in this driver. Remove it's allocation
in the auto_attach and the check for it in the detach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:03:02 -08:00
H Hartley Sweeten
934efe63e8 staging: comedi: addi_apci_2200: use addi_watchdog module
The current watchdog support in hwdrv_apci2200.c does not conform
to the comedi API.

Use the addi_watchdog module to provide support for the watchdog
subdevice and remove the now unneeded hwdrv_apci2200.c file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:03:00 -08:00
H Hartley Sweeten
de59c285a4 staging: comedi: drivers (core): remove BUG_ON in comedi_auto_unconfig()
comedi_find_board_minor() will always return a ninor number between
0 and < COMEDI_NUM_BOARD_MINORS, or -ENODEV if a minor is not found.

Remove the unnecessary BUG_ON().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:26:20 -08:00
H Hartley Sweeten
57b71c3e6f staging: comedi: drivers (core): don't BUG_ON due to faulty drivers
The postconfig for drivers that support async commands currently can
BUG_ON if the subdevice was improperly configured by the driver.

Change the BUG_ON so that a dev_warn() is output and the postconfig
returns -EINVAL. This will prevent the comedi core from attaching to
the faulty driver but does not BUG the kernel.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:26:20 -08:00
H Hartley Sweeten
40f58a65c9 staging: comedi: drivers (core): factor out async subdevice postconfig
Factor the setup of an async subdevice out of postconfig(). This allows
bringing the code back a couple indents and makes the postconfig a bit
clearer.

For aesthetic reasons, rename postconfig() to __comedi_device_postconfig().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:26:19 -08:00
H Hartley Sweeten
01fca37863 staging: comedi: drivers (core): remove forward declarations
Move a couple of the functions to avoid the need for the forward
declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:26:19 -08:00
H Hartley Sweeten
5b6cbd87d3 staging: comedi: comedi_fops: remove last forward declaration
There is still a forward declaration in this file for parse_insn().
Remove the need for it by moving do_insnlist_ioctl() down a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:25:07 -08:00
Peter Huewe
37fbb4acda staging/comedi: remove workaround for !pci_driver.name
All pci drivers in drivers/ have the pci_driver.name field set, so we
can remove this workaround and the accompanying todo.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:22:49 -08:00
Peter Huewe
49d2dbee8b staging/comedi: Add pci_driver.name to skel driver
This patch adds the comedi_driver.name to pci_driver.name
to the skel driver, so we can remove the workaround in drivers.c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:22:49 -08:00
Peter Huewe
24d8e51ef3 staging/comedi: Use bool initializations
Found with coccicheck.

The semantic patch that makes this output is available
in scripts/coccinelle/misc/boolinit.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:22:49 -08:00
Greg Kroah-Hartman
35be842538 Staging: comedi: enable it to build on all arches
Hopefully all of the arch-specific problems are now resolved, so let's
let this subsystem be enabled on all arches.  If there are problems
found, we will fix them up.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Bernd Porr <mail@berndporr.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:19:45 -08:00
Ian Abbott
3eb4fd1f56 staging: comedi: Allow comedi on ARM
Bernd Porr reports success getting comedi to work on ARM.  He writes:

"""
comedi works nicely on the Raspberry PI. I've compiled the rpi kernel
with comedi enabled and it works with the USBDUX-sigma (need to test the
other boards). With comedirecord running I can plot one channel at 1kHz
without buffer overflow (resulting to 70% load).

So, I guess we just need to add "ARM" to Kconfig in the comedi subdir?

         depends on BROKEN || FRV || M32R || MN10300 || SUPERH || TILE || X86 || ARM

I'm running just now 3.2.27 but also the development kernel compiles
with ARM enabled (haven't tested yet).

/Bernd
"""

Enable the COMEDI config option to be selected for ARM.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Bernd Porr <mail@berndporr.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:17:16 -08:00
Julia Lawall
82ebecc503 staging: omap-thermal/omap-bandgap.c: adjust duplicate test
Delete successive tests to the same location.  There was a previous test on
ret and it has not been updated since then.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@s exists@
local idexpression y;
expression x,e;
@@

*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
... when != \(y = e\|y += e\|y -= e\|y |= e\|y &= e\|y++\|y--\|&y\)
    when != \(XT_GETPAGE(...,y)\|WMI_CMD_BUF(...)\)
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:00:10 -08:00
Chen Gang
4b90d01425 staging: tidspbridge/pmgr: another using strlcpy instead of strncpy
The fields must be null-terminated,
  or next strstr in dcd_get_objects, will cause issue

additoinal info:
  nldr_create may call cod_get_base_name, let sz_zl_file to get name (sz_name)
  and then call dcd_get_objects, passing sz_zl_file as a name string.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:00:10 -08:00
Chen Gang
9814a8750e staging: tidspbridge/pmgr: use strlcpy instead of strncpy
The fields must be null-terminated,
  or next strcpy in dbll_find_dsp_symbol, will cause issue

additoinal info:
  dbll_find_dsp_symbol call find_symbol_callback to get name.
  and then call strcpy to copy the name to upper caller.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:00:10 -08:00
Chen Gang
ec7e0aef31 staging: tidspbridge/pmgr: additional checking after return from strlen_user
strlen_user will return the length including final NUL.
    and will return 0 if failed (for example: if user string not NUL terminated)

  so need check whether it is an invalid parameter.

addtional info:
  can reference the comments of strlen_user in lib/strnlen_user.c

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:00:10 -08:00
Aaro Koskinen
cdbbc618f8 staging: xgifb: delete pVBInfo->BaseAddr
Delete redundant field.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:00:10 -08:00
Aaro Koskinen
b8e1cc5c8d staging: xgifb: do not use pVBInfo->BaseAddr
Use pre-calculated register addresses instead of pVBInfo->BaseAddr.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:00:10 -08:00
Aaro Koskinen
56810a92c6 staging: xgifb: use XGIRegInit()
Avoid copy-paste and use XGIRegInit() to initialize registers addresses.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:00:10 -08:00
Jake Champlin
7648e10942 Staging: Comedi: daqboard2000: Fixed Coding Style Issue
Fixed Coding Style Warning

Signed-off-by: Jake Champlin <jake.champlin.27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20 15:59:58 -08:00
Jake Champlin
74c7c503c7 Staging: Comedi: pcl818: Fixed Coding Style Issues
Fixed single line if statement brace issues as well as pointer errors from
checkpatch.pl

Signed-off-by: Jake Champlin <jake.champlin.27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20 15:59:58 -08:00
Stefan Hajnoczi
3d1390389f staging: line6: clean up line6_variax_process_message()
Previous versions of the line6 driver snooped MIDI traffic in order to
make device state accessible via sysfs attributes.  This involved a lot
of logic in line6_variax_process_message() that has since been removed.

Drop unused conditionals in line6_variax_process_message().

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20 15:57:47 -08:00
Stefan Hajnoczi
4e6a8ffba2 staging: line6: clean up line6_pod_process_message()
Previous versions of the line6 driver snooped MIDI traffic in order to
make device state accessible via sysfs attributes.  This involved a lot
of logic in line6_pod_process_message() that has since been removed.

Drop unused conditionals in line6_pod_process_message() and reduce the
levels of indentation.  Only two MIDI messages are still tracked: the
POD version message on startup and monitor level changes originating
from the device.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20 15:57:47 -08:00
Stefan Hajnoczi
98115f1df3 staging: line6: drop CONFIG_LINE6_USB_DUMP_PCM
The CONFIG_LINE6_USB_DUMP_PCM config option prints a hexdump of PCM
audio data as URBs are sent and received.  The usbmon feature should be
used instead of manually dumping PCM URBs.  There are a few advantages
to using usbmon:

 * Can be turned on/off at runtime
 * Provides full USB-level traffic
 * tcpdump and wireshark support for powerful analysis
 * No driver-specific code is required

This is the last user of line6_write_hexdump() so we drop it too.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20 15:56:59 -08:00
Sebastian Wankerl
25c97da8b9 wlan-ng/prism2mgmt.c: formated too long lines
Formated pr_debug() calls

Signed-off-by: Sebastian Wankerl <sisewank@cip.cs.fau.de>
Signed-off-by: Sebastian Ehrenfels <qi50dube@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20 15:56:59 -08:00
Sebastian Wankerl
52070c709d wlan-ng/prism2mgmt.c: added parantheses to macro
Enclose the macro into braces so that it can be closed by a semicolon

Signed-off-by: Sebastian Wankerl <sisewank@cip.cs.fau.de>
Signed-off-by: Sebastian Ehrenfels <qi50dube@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-20 15:56:59 -08:00
Jake Champlin
4156a76037 Staging: Comedi: amplc_dio200: Fixed bracing issue
Fixed coding style error

Signed-off-by: Jake Champlin <jake.champlin.27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18 17:40:18 -08:00
Dan Magenheimer
d6c19b6e7a staging: zcache: fix uninitialized variable compile warning
[V2: no code changes, patchset now generated via git format-patch -M]

Fix unitialized variable in zcache which generates warning during build

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18 13:43:44 -08:00
Dan Magenheimer
112a35edd6 staging: zcache: re-enable config/build of zcache after renaming
In staging, re-enable config/build of zcache after ramster->zcache renaming.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18 13:43:44 -08:00
Dan Magenheimer
d651b886e4 staging: zcache: adjustments to config/build files due to renaming
[V2: no code changes, patchset now generated via git format-patch -M]

In staging/zcache, adjust config/build due to ramster->zcache renaming

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18 13:43:44 -08:00