Commit graph

28727 commits

Author SHA1 Message Date
Domagoj Trsan d1d1a9d3a1 staging: line6: fix midibuf.c coding style issue
Fix the following checkpatch.pl warning:
- else is not generally useful after a break or return

Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:41:25 -07:00
Daeseok Youn c749201247 staging: dgap: use dgap_release_remap() in dgap_cleanup_board()
Just simply use dgap_release_remap() in dgap_cleanup_board() for
releasing map memory.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:39:25 -07:00
Daeseok Youn b23e487903 staging: dgap: adds missing iounmap for re_map_port in dgap_release_remap()
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:39:25 -07:00
Daeseok Youn 476f6bc80b staging: dgap: remove unused 'runwait' variable
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:39:24 -07:00
Mark Einon d40f0d8d3d staging: et131x: Remove unnecessary defines to enable driver PM
The Power Management functions can be conditional by assigning pm ops
directly to .driver.pm, instead of using #ifdef's, saving some lines of
code.

Reported-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:38:16 -07:00
Mark Einon b57cb55b46 staging: et131x: Add space after { in pci ID table
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:38:16 -07:00
Mark Einon ecce565056 staging: et131x: don't cast a void* to a struct pointer
Casting a void* popinter to a struct pointer is unnecessary, don't do
it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:38:15 -07:00
Mark Einon e112eb598d staging: et131x: zero allocation of fbr to prevent random address access
If et131x_rx_dma_memory_alloc() allocates rx_ring->fbr[0] but fails to
allocate rx_ring->fbr[1], this leaves fbr[0]->ring_virtaddr with the
possibility of being accessed in et131x_rx_dma_memory_free() as it
contains a random value, potentially causing an oops.

Fix this by zeroing the fbr memory on allocation. Subsequent frees of
this fbr memory explicitly zeros the ring_virtaddr value.

Reported-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:38:15 -07:00
Shawn Guo bfe945c8e1 imx-drm: imx-drm-core: add basic suspend/resume support
HDMI currently stops working after a system suspend/resume cycle.  The
cause is that the mode setting states in hardware gets lost and isn't
restored across the suspend/resume cycle.

The patch adds a very basic suspend/resume support to imx-drm driver,
and calls drm_helper_resume_force_mode() in .resume hook to restore the
mode setting states, so that HDMI can continue working after a system
suspend/resume cycle.

Since the suspend/resume hook can be called with drm_device pointer
being NULL from driver data, we need a check on the pointer in the
hooks.  And to avoid using a stale pointer from driver data, it also
clears driver data in .unload hook.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:36:27 -07:00
Shawn Guo b46355f0f7 imx-drm: ipuv3-plane: remove function ipu_plane_dpms()
All those ipu_*_put() calls in ipu_plane_dpms() are unnecessary,
because the only occurrence of ipu_plane_dpms() with 'mode' not being
DRM_MODE_DPMS_ON is in function ipu_disable_plane(), which already
has a ipu_plane_put_resources() call to put those ipu resources right
after ipu_plane_dpms().

So with those redundant ipu_*_put() calls removed from ipu_plane_dpms(),
the only left code in the function is ipu_plane_enable|disable().  Thus,
we can just call ipu_plane_enable|disable() as needed directly and
remove the ipu_plane_dpms() function completely.

Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:36:27 -07:00
Catalina Mocanu 13e55e4947 staging: ft1000-pcmcia: Don't initialise static to 0
This fixes the following checkpatch.pl error:
ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:34:38 -07:00
Sarah Khan 6a7cbc38ad staging: rtl8712: fixed missing blank line
WARNING : Missing a blank line after declaration
checkpatch.pl warning in hal_init.c

Signed-off-by: Sarah Khan <sarahjmi07@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:33:23 -07:00
Mahati Chamarthy a3d822b8e3 Staging: media: omap24xx: Fix else is not useful warning
This fixes the following checkpatch.pl warning:
WARNING: else is not generally useful after a break or return

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:33:23 -07:00
Mahati Chamarthy d8e186cebc Staging: rtl8192e: rtl8192e: Merge two lines and remove unused variable
This patch merges an assignment with an immediately following return of
the assigned variable. It also removes variables that became unused due to this transformation.
The following Coccinelle semantic patch was used to make this transformation:

@r@
identifier ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

@@
identifier r.ret;
expression e1;
type t;
@@

(
-t ret = e1;
|
-t ret;
)
 ... when != ret
     when strict

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:32:43 -07:00
Tapasweni Pathak bfcc6be5bc staging: rtl8192u: remove unecessary variable
This patch removes unncessary variable in file r8192U_core.c
using Coccinelle. Semantic patch for this is as follows :
@@
identifier ret;
@@

-int ret = 0;
 ... when != ret
     when strict
-return ret;
+return 0;

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:32:43 -07:00
Mahati Chamarthy a579c97823 Staging: media: lirc: Merge two lines and remove unused variable
This patch merges an assignment with an immediately following return of
the assigned variable. It also removes a variable that becomes unused due to this transformation.
The following Coccinelle semantic patch was used to make this transformation:

@r@
identifier ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

@@
identifier r.ret;
expression e1;
type t;
@@

(
-t ret = e1;
|
-t ret;
)
 ... when != ret
     when strict

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:31:33 -07:00
Roberta Dobrescu 707505b58e staging: dgnc: Replace non-standard spinlock's macros
This patch replaces non-standard spinlock's macros.
It is done using coccinelle and the following semantic patch:

@@
expression x;
@@

- DGNC_SPINLOCK_INIT(x)
+ spin_lock_init(&x)

@@
expression x, y;
@@

- DGNC_LOCK(x, y)
+ spin_lock_irqsave(&x, y)

@@
expression x, y;
@@

- DGNC_UNLOCK(x, y)
+ spin_unlock_irqrestore(&x, y)

@used_by_lock exists@
typedef ulong;
symbol lock_flags;
position p1, p2;
@@

(
 ulong lock_flags@p1;
|
 unsigned long lock_flags@p2;
)
...
(
 spin_lock_irqsave(..., lock_flags)
|
 spin_unlock_irqrestore(..., lock_flags)
)

@@
position used_by_lock.p1, used_by_lock.p2;
@@

(
- ulong lock_flags@p1;
+ unsigned long flags;
|
- unsigned long lock_flags@p2;
+ unsigned long flags;
)
<...
- lock_flags
+ flags
...>

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:31:32 -07:00
Catalina Mocanu 8f3a2e04e3 staging: ft1000-pcmcia: replace DEBUG macro with netdev_dbg
This fixes the following checkpatch.pl warning:
WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then
dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

Removing the macro also fixes:
WARNING: macros should not use a trailing semicolon

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:29:56 -07:00
Roberta Dobrescu 666e9084c0 staging: emxx_udc: Do not assign bool to 0/1
This fixes the following coccinelle warning:
WARNING: Assignment of bool to 0/1

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:27:58 -07:00
Roberta Dobrescu 5cbca95706 staging: emxx_udc: Do not use comparisons on bool tests
This fixes the following coccinelle warning:
WARNING: Comparison of bool to 0/1

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:27:58 -07:00
Aybuke Ozdemir 1a366abe5d Staging: imx-drm: Fix line over 80 characters warning
Fix checkpatch.pl issues with
line over 80 characters in parallel-display.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:25:29 -07:00
Mahati Chamarthy fc489a5287 Staging: vme: devices: Merges two lines of code and removes unused variable
This patch merges an assignment with an immediately following return of
the assigned variable.  The following Coccinelle semantic patch was used
to make this transformation:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:25:29 -07:00
Mahati Chamarthy 92db2a276c Staging: rtl8192e: Fix else is not useful warning style
This fixes the following checkpatch.pl warnings:
WARNING: else is not generally useful after a break or return

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:51:45 -07:00
Tapasweni Pathak 7d36429167 staging: rtl8723au: core: add consistent spacing around '-'
This patch fixes checkpatch.pl error in file rtw_ap.c
ERROR: need consistent spacing around '-' (ctx:WxV)

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:51:45 -07:00
Mahati Chamarthy a5310dc669 Staging: rtl8192e: rtl8192e: Merges two lines of code and removes unused variable
This patch merges an assignment with an immediately following return of
the assigned variable. It also removes a variable that becomes unused due to this transformation.
The following Coccinelle semantic patch was used to make this transformation:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

@@
identifier ret;
type t;
identifier c;
@@

-t ret = c;
 ... when != ret
     when strict

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:51:03 -07:00
Heena Sirwani ca7617852d Staging: bcm: Fix line over 80 characters.
The following patch fixes the checkpatch.pl warning:
WARNING: line over 80 characters

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:48:06 -07:00
Heena Sirwani 38bb617449 Staging: bcm: Remove unneeded else after return.
The following patch fixes the checkpatch.pl warning:
WARNING: else is generally not useful after a break or return.

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:48:06 -07:00
Tapasweni Pathak 522c15ee37 staging: bcm: remove space before tab
This patch fixes checkpatch.pl warning in headers.h file
WARNING : please, no space before tabs

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:47:12 -07:00
Tapasweni Pathak bd93bf4082 staging: bcm: fix error do not use c99 comments
This patch fixes checkpatch.pl error in InterfaceMacros.h file
ERROR: do not use C99 // comments

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:47:12 -07:00
Tapasweni Pathak ca6a32f3a3 Staging: ste_rmi4: add new line after declarations
This patch fixes checkpatch.pl warning in synaptics_i2c_rmi4.c file
WARNING : Missing a blank line after declarations

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:44:11 -07:00
Rajbinder Brar 3b9999ec18 Staging: vt6656: Merge two lines of code into one
This patch merges an assignment with an immediately following return of
the assigned variable. The following Coccinelle semantic patch was used
to make this transformation:

@@
expression ret;
identifier f;
@@

-ret=
+return
	f(...);
-return ret;

A variable that became unused due to this transformation was also
removed.

Signed-off-by: Rajbinder Brar <brar.rajbinder@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:42:54 -07:00
Tapasweni Pathak 3e46587ef1 staging: vt6656: remove unnecessary else after return
This patch fixes checkpatch.pl warning in files of vt6656
WARNING: else is not generally useful after a break or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:41:15 -07:00
Tapasweni Pathak 78fc84848a staging: vt6655: shift open brace '{' to previous line
This patch fixes checkpatch.pl error in baseband.c file
ERROR : that open brace { should be on the previous line

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:41:15 -07:00
Tapasweni Pathak cf329e54b3 staging: vt6655: remove unnecessary else after return
This patch fixes checkpatch.pl warning in aes_ccmp.c file
WARNING : else is not generally useful after a break or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:41:15 -07:00
Mahati Chamarthy eab4e78d08 Staging: vt6656: Merges two lines of code and also removes unused variable
This patch merges an assignment with an immediately following return of
the assigned variable.  The following Coccinelle semantic patch was used
to make this transformation:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

A variable that became unused due to this transformation was also removed.

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:40:17 -07:00
Mahati Chamarthy 88c9cc0092 Staging: vt6656: Merges two lines of code and removes unused variable
This patch merges an assignment with an immediately following return of
the assigned variable.The following Coccinelle semantic patch was used to make this transformation:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

A variable that became unused due to this transformation was also removed.

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:40:17 -07:00
Aybuke Ozdemir fdeef1fe4d Staging: vt6655: Fix C99 style commenting.
This patch fixes these error messages found by checkpatch.pl:
ERROR: do not use C99 // comments

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:40:17 -07:00
Gulsah Kose 77b55d84aa staging: dgnc: Fix unnecessary braces warning.
Fixes "braces {} are not necessary for single statement blocks"
checkpatch.pl warnings in dgnc_sysfs.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:36:56 -07:00
Benjamin Romer 35b8117b0a staging: unisys: fix IO memory copy in channel.h
The function ULTRA_check_channel_client() was recently patched to use
ioread8_rep(). Unfortunately the parameters were incorrectly ordered, and this
causes the function to fail and the guest to not boot.

This patch switches the parameters around and uses memcpy_fromio() instead,
which is clearer since a structure is being copied, not an array, and it
fixes the error message printout later in the function that was using the UUID
value in the channel, rather than the value copied from the channel, which
causes a misleading error to be reported.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:35:03 -07:00
Aybuke Ozdemir 24fc2d01db Staging: unisys: channels: Missing a blank line after declarations
This patch fixes these warning messages found by checkpatch.pl:
WARNING : Missing a blank line after declarations.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:33:34 -07:00
Catalina Mocanu d870f87dec staging: unisys: virthba: remove unnecessary return statement
This fixes the following checkpatch.pl warning:
WARNING: void function return statements are not generally useful

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:33:34 -07:00
Catalina Mocanu 6905cae3a8 staging: unisys: visorutil: remove unnecessary braces
This fixes the following checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:33:34 -07:00
Vaishali Thakkar 890d228fd9 Staging: iio: light: Use usleep_range instead of msleep
This patch fixes following checkpatch.pl warning:

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:31:36 -07:00
Tapasweni Pathak 89021ecc83 staging: speakup: remove jiffies comparison using time_after_eq()
This patch fixes checkpatch.pl warning in files of speakup
WARNING : Comparing jiffies is almost always wrong; prefer time_after,
time_before and friends

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:31:36 -07:00
Erin Grasmick 2e94283b68 staging: rtl8192ee: Remove unnecessary return statement
Removes void function return statements.

Signed-off-by: Erin Grasmick <ecg@unseen.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:28:39 -07:00
Erin Grasmick 90be2f1ff7 staging: rtl8192ee: Add blank lines after declarations
Signed-off-by: Erin Grasmick <ecg@unseen.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:28:03 -07:00
Aybuke Ozdemir 4a56f79054 Staging: rtl8192ee: Missing a blank line after declarations
This patch fixes these warning messages found by checkpatch.pl:
WARNING : Missing a blank line after declarations.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:26:22 -07:00
Erin Grasmick 239a5b01a1 staging: rtl8192ee: Fix unnecessary return at end of function.
Fix for unnecessary return at end of function as diagnosed by checkpatch.pl.

Signed-off-by: Erin Grasmick <ecg@unseen.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:26:22 -07:00
Roxana Blaj 4a8e307698 staging: rts5208: add new line after declarations
This fixes the warning:
WARNING: Missing a blank line after declarations

Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:22:25 -07:00
Tina Johnson 767c6a552b Staging: rts5208: Fix checkpatch warning: Missing blank line
The following checkpatch warning was fixed :

WARNING: Missing a blank line after declarations

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:22:25 -07:00
Roxana Blaj eb14865040 staging: rts5208: remove unnecessary return statement
This fixes the warning:
WARNING: void function return statements are not generally useful

Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:22:25 -07:00
Roxana Blaj b037e229e1 staging: rts5208: remove unnecessary else
This fixes the warning:
WARNING: else is not generally useful after a break or return

Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:22:25 -07:00
Gulsah Kose b76e05869a staging: rtl8821ae: Fixes unnecessary return warning.
This patch fixes "void function return statements are not generally
useful" checkpatch.pl warning in base.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:19:38 -07:00
Dan Carpenter 3232e04df7 [media] staging: lirc: freeing ERR_PTRs
We call kfree(data_buf) in the error handling and that will oops if this
is an error pointer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23 16:13:36 -03:00
Mark Einon b9ed09b3bc staging: et131x: Remove TODO item regarding split lines
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:35:09 -07:00
Mark Einon 26ca0f1b1a staging: et131x: Reduce split lines by renaming flowcontrol
Rename adapter->flowcontrol to adapter->flow, reducing split lines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:35:09 -07:00
Mark Einon c9e3c03a76 staging: et131x: Use braces on all arms of if/else in et131x_handle_recv_pkts
The 'if' blocks have braces, so the 'else' blocks should too.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:35:08 -07:00
Mark Einon 3f4d202942 staging: et131x: Reduce split lines by renaming some psr variables
Modify some packet status ring associated variables to save a few
split lines:

pktstat_ringsize -> psr_size
psr_num_entries -> psr_entries
index -> ii

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:35:08 -07:00
Mark Einon a02a26f0d6 staging: et131x: Reduce split lines in et131x_rx_dma_memory_alloc()
Modify temporary variables so that split lines can be reduced:

index -> k
fbr_tmp_physaddr -> fbr_physaddr

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:35:08 -07:00
Mark Einon 3b11d00df7 staging: et131x: Remove unused ce_stats struct member
This ce_stats struct member is no longer used. Remove it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:35:08 -07:00
Mark Einon d99249f17b staging: et131x: Remove unused MP_TCB defines
These two defines are not used, so remove them.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:35:08 -07:00
Mark Einon 365027332b staging: et131x: Remove unused et131x_adapter struct members
These two adapter struct members are not used, remove them.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:35:08 -07:00
Aybuke Ozdemir e2ce06152a Staging: octeon: Fix missing blank line warning.
Fixes "Missing a blank line after declarations"
checkpatch.pl warning in ethernet-xaui.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:33:47 -07:00
Tapasweni Pathak 20f4f1a053 staging: media: lirc: remove unnecessary break after return
This patch fixes checkpatch.pl warning in lirc_serial.c file
WARNING : break is not useful after goto or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:15:43 -07:00
Tapasweni Pathak c5366563d5 Staging: media: lirc: fixed else after return or break warning
This patch fixes checkpatch.pl warning in file lirc_serial.c
WARNING : else is not generally useful after a break or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:13:48 -07:00
Gulsah Kose abb0bdad0c staging: media: lirc: Fixed quoted string split warning.
This patch fixes "quoted string split across lines" checkpatch.pl
warning in lirc_imon.c.

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:05:41 -07:00
Gulsah Kose 00ef07e362 staging: media: omap4iss: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
iss_video.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:05:41 -07:00
Gulsah Kose 9d374b2c7a staging: media: omap4iss: Fixes missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
iss_csi2.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:05:41 -07:00
David S. Miller 1f6d80358d Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	arch/mips/net/bpf_jit.c
	drivers/net/can/flexcan.c

Both the flexcan and MIPS bpf_jit conflicts were cases of simple
overlapping changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-23 12:09:27 -04:00
Greg Donald 75c49d40c3 drivers: staging: lustre: Fix "open brace '{' following struct go on the same line" errors
Fix checkpatch.pl "open brace '{' following struct go on the same line" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:18:59 -07:00
Aybuke Ozdemir 2b06b70b52 Staging: lustre: include: linux: Fix line over 80 characters.
The following patch fixes the checkpatch.pl warning:
WARNING: line over 80 characters.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:18:59 -07:00
Vaishali Thakkar 2d02b0b81c Staging: lustre: Unnecessory else and braces are removed
This patch fixes following checkpatch.pl warning using coccinelle:

WARNING: else is not generally useful after a break or return

Semantic patch used for this is as follows:

@rule1@
expression e1;
@@

        if (e1) { ... return ...; }
-       else{
                ...
-       }

@rule2@
expression e2;
statement s1;
@@

        if(e2) { ... return ...; }
-       else
                s1

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:18:59 -07:00
Vaishali Thakkar 5ce91a9e85 Staging: lustre: Return statement is moved left after removing else
This patch fixes following checkpatch.pl warning using coccinelle:

WARNING: else is not generally useful after a break or return

Semantic patch used for this is as follows:

@rule1@
expression e1;
@@

        if (e1) { ... return ...; }
-       else{
                ...
-       }

@rule2@
expression e2;
statement s1;
@@

        if(e2) { ... return ...; }
-       else
                s1

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:18:59 -07:00
Tina Johnson 26c4ea46a5 Staging: lustre: Replace GOTO macro with necessary code
The GOTO macro is neither standard in Linux nor does its definiton
contain much useful code. Hence GOTO can be replaced with useful
parts of its definition. In a statement like GOTO(label, rc), the
replacing code will be goto label if rc is a constant or a variable.
But in cases like GOTO(label, e) where e is an assignment statement,
both assignment and goto statements are kept.

This patch was done using Coccinelle and the following semantic
patch was used:

@@
identifier rc,label;
expression e;
constant c;
@@

(
-GOTO(label,rc = e);
+rc = e;
+goto label;
|
-GOTO(label,rc);
+goto label;
|
-GOTO(label,c);
+goto label;
)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:18:41 -07:00
Tapasweni Pathak ddcb81e741 staging: rtl8712: merge lines and remove unused variable for immediate return
This patch merge two lines in a single line if immediate return is found.
Unused variables in each case were removed manually as they are no longer
needed.

This is done using Coccinelle. Semantic patch used for this is as
follows :
@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:14:37 -07:00
Tapasweni Pathak a988265c61 Staging: rtl8712: Add space after return type
This patch fixes checkpatch.pl warning in file rtl871x_ioctl.h
WARNING : Missing space after return type

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:14:36 -07:00
Tapasweni Pathak c08242008a Staging: rtl8712: Remove unnecessary parentheses
This patch fixes checkpatch.pl warning in files of rel8712
WARNING : Unnecessary parentheses - maybe == should be = ?

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:14:36 -07:00
Tapasweni Pathak 57b6686ebb Staging: rtl8712 : Fix line over 80 characters
This patch fixes checkpatch.pl warning in files of rtl8712
WARNING : line over 80 characters

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:14:36 -07:00
Tapasweni Pathak 9d76a7e4dc Staging: rtl8712: use kmalloc_array over kmalloc
This patch fixes checkpatch.pl warning in file rtl871x_xmit.c
WARNING : prefer kmalloc_array over kmalloc with multiply

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:11:56 -07:00
Tapasweni Pathak 15a4db9268 Staging: rtl8712: remove unnecessary 'out of memory' message
This patch fixes checkpatch.pl warning in file usb_ops_linux.c
WARNING : possible unecessary 'out of memory' message

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:08:58 -07:00
Tapasweni Pathak b105374c51 Staging: rtl8712: fixed space prohibition
This patch fixes checkpatch.pl warning in file rtl871x_io.h
WARNING : space prohibited before semicolon

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:08:58 -07:00
Tapasweni Pathak fbdba9c10b Staging: rtl8712: remove void function return; statement
This patch fixes checkpatch.pl warning in files of rtl8712
WARNING : void function return statement are not generally useful

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:04:57 -07:00
Tapasweni Pathak a2955b144b Staging: rtl8712: remove semicolon after macro
This patch fixes checkpatch.pl warning in rtl871x_mp.h file
WARNING : Macro should not use a trailing semicolon

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:04:57 -07:00
Aybuke Ozdemir c5861b738a Staging: rtl8712: Missing a blank line after declarations
This patch fixes these warning messages found by checkpatch.pl:
WARNING : Missing a blank line after declarations.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:02:31 -07:00
Aybuke Ozdemir b631ecd70e Staging: rtl8712: Remove unnecessary parentheses.
This patch fixes checkpatch.pl warning
Unnecessary parentheses in rtl871x_xmit.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:02:31 -07:00
Tapasweni Pathak 730cb373f3 Staging: rtl8712: remove break after return statement
This patch fixes checkpatch.pl warning in rtl871x_ioctl_linux.c file
WARNING : break is not useful after goto or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 08:02:06 -07:00
Aybuke Ozdemir 020e46e06a Staging: iio: meter: Fix unnecessary space warning
Fixed "Unnecessary space before function pointer argument" checkpatch.pl
warning in ade7854.h

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-22 07:59:36 -07:00
Tapasweni Pathak b5e736bd68 staging: iio: accel: remove else after return
This patch fixes checkpatch.pl warning in files of iio: accel
WARNING : else is not generally useful after a break or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-22 07:59:35 -07:00
Darshana Padmadas 0f8ad68b23 Staging: iio: adc: Fix else after return warning
This patch fixes checkpatch.pl warning:
WARNING: else is not generally useful after a break or return

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-22 07:58:48 -07:00
Darshana Padmadas 26cfea9e0e Staging: iio: adc: Fix quoted string split accross lines
This patch fixes the checkpatch warning:
WARNING: quoted string split across lines

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-22 07:58:48 -07:00
Darshana Padmadas 3ab7c7d48d Staging: iio: accel: Replace msleep with usleep for given range
This patch fixes checkpatch.pl warning:
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt

As per Documentation/timers/timers-howto.txt usleep_range should be used
for sleeping for 10us-20ms

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-22 07:58:47 -07:00
Darshana Padmadas 5b12d0ac20 Staging: iio: adc: Fix warning prefer kmalloc_array over kmalloc
This patch fixes the checkpatch warning:
WARNING: Prefer kmalloc_array over kmalloc with multiply

kmalloc_array is preffered for allocating for arrays.

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-22 07:58:47 -07:00
Greg Kroah-Hartman d84a2b0d6f Merge 3.17-rc6 into staging-next.
We want the fixes in there, and it resolves a merge issue with
drivers/iio/accel/bma180.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-22 07:30:03 -07:00
Mauro Carvalho Chehab 3cf0c6bd68 Merge remote-tracking branch 'linus/master' into patchwork
There are some patches that depends on media-v3.16-rc6.
So, merge back from upstream before applying them.

* linus/master: (1123 commits)
  drm/nouveau: ltc/gf100-: fix cbc issues on certain boards
  drm/bochs: add missing drm_connector_register call
  drm/cirrus: add missing drm_connector_register call
  staging: vt6655: buffer overflow in ioctl
  USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters
  USB: storage: Add quirk for Ariston Technologies iConnect USB to SCSI adapter
  USB: storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter
  USB: EHCI: unlink QHs even after the controller has stopped
  [SCSI] fix for bidi use after free
  [SCSI] fix regression that accidentally disabled block-based tcq
  [SCSI] libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu
  drm/radeon: Fix typo 'addr' -> 'entry' in rs400_gart_set_page
  drm/nouveau/runpm: fix module unload
  drm/radeon/px: fix module unload
  vgaswitcheroo: add vga_switcheroo_fini_domain_pm_ops
  drm/radeon: don't reset dma on r6xx-evergreen init
  drm/radeon: don't reset sdma on CIK init
  drm/radeon: don't reset dma on NI/SI init
  drm/radeon/dpm: fix resume on mullins
  drm/radeon: Disable HDP flush before every CS again for < r600
  ...
2014-09-21 16:40:04 -03:00
Mahati Chamarthy 3f76a4ea53 Staging: rtl8192e: Fix __constant_htons to htons style warning
This fixes the following checkpatch.pl warning:
WARNING: __constant_htons should be htons

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:54:04 -07:00
Catalina Mocanu 288903f6b9 staging: iio: cdc: Don't put an else right after a return
This fixes the following checkpatch.pl warning:
WARNING: else is not generally useful after a break or return.

While at it, remove new line for symmetry with the rest of the code.

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:49:39 -07:00
Gulsah Kose 0a5fcc6b2e staging: octeon: Fix quoted string split warning.
This patch fixes "quoted string split across lines" checkpatch.pl
warning in ethernet.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:49:39 -07:00
Gulsah Kose 39bc7513aa staging: octeon: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
ethernet.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:49:38 -07:00
Roberta Dobrescu 1ff99b312f staging: emxx_udc: Replace __constant_cpu_to_le16 with cpu_to_le16
This fixes the following checkpatch.pl warning:
WARNING: __constant_cpu_to_le16 should be cpu_to_le16
Additionally, it removes the space between function name and (.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:48:06 -07:00
Aybuke Ozdemir 113f5f24c6 Staging: rtl8821ae: Fix warnings of no space before tabs.
This patch fixes these warning messages found by checkpatch.pl:
WARNING: please, no space before tabs.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:48:06 -07:00
Aybuke Ozdemir a45cbb7814 Staging: rtl8821ae: Fix "foo * bar" warning.
This patch fixes these error messages found by checkpatch.pl:
ERROR: "foo* bar" should be "foo *bar"

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:48:05 -07:00
Aybuke Ozdemir 34c376fe07 Staging: wlan-ng: Fix return in void function warning
This fixes checkpatch.pl warning:
WARNING: void function return statements are not generally useful

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:42:15 -07:00
Aybuke Ozdemir fcf1b73d08 Staging: media: cxd2099: Missing a blank line after declarations
Fix checkpatch.pl issues with missing a blank
line after declarations in cxd2099.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:42:15 -07:00
Aybuke Ozdemir c2e9154269 Staging: octeon: Missing a blank line after declarations
Fix checkpatch.pl issues with missing a blank
line after declarations in ethernet-sgmii.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:42:15 -07:00
Aybuke Ozdemir 05fd349b17 staging: gs_fpgaboot Fix trailing whitespace.
Fix checkpatch.pl issues with trailing
whitespace in README.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:42:15 -07:00
Aybuke Ozdemir de77c125f5 staging: bcm: Fix line over 80 characters
Fix checkpatch.pl issues with
line over 80 characters in HandleControlPacket.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:42:15 -07:00
Gulsah Kose 5ad6ae1acf staging: media: lirc: Fixes missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
lirc_serial.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:40:44 -07:00
Gulsah Kose a5613fe896 staging: media: lirc: Fixes unnecessary return warning.
This patch fixes "void function return statements are not generally
useful" checkpatch.pl warning in lirc_zilog.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:40:44 -07:00
Gulsah Kose a17ec4c9fd staging: media: lirc: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
lirc_bt829.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:39:45 -07:00
Gulsah Kose 3f8028023c staging: media: lirc: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
lirc_sasem.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:39:45 -07:00
Gulsah Kose a87ba73ed1 staging: media: lirc: Fix unnecessary return warning.
This patch fixes "void function return statements are not generally
useful" checkpatch.pl warning in lirc_sasem.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:39:45 -07:00
Gulsah Kose fd8392f309 staging: media: lirc: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
lirc_zilog.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:39:45 -07:00
Tina Johnson 3170f3277b Staging: media: lirc: lirc_imon: Removed unnecessary variable to simplify return variable handling
Variable rc was removed after merging its assignment statement with
immediately following return statement. Variable retval is not used
at all other that to return its initial value.Hence replaced retval
with its initial value in the return statement and removed the variable.

This patch was done using Coccinelle script and the following semantic
patch was used:

@rule1@
identifier ret;
expression e;
@@

-int ret = 0;
 ... when != ret
(
-ret = e;
+return e;
-return ret;
|
-return ret;
+return 0;
)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:39:45 -07:00
Gulsah Kose 8ad5360ad8 staging: lustre: lnet: lnet: Fixed quoted string split warning.
This patch fixes "quoted string split across lines" checkpatch.pl
warning in api-ni.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:37:16 -07:00
Gulsah Kose 70b694c32e staging: lustre: lnet: lnet: Fix missing line warning.
This patch fixes "Fixes "Missing a blank line after declarations"
checkpatch.pl warning in api-ni.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:37:16 -07:00
Gulsah Kose a446b47d5d staging: lustre: lnet: lnet: Fix quoted string split warning.
This patch fixes "quoted string split across lines" checkpatch.pl
warning in lib-eq.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:37:16 -07:00
Darshana Padmadas 3e9cc5b045 Staging: lustre: Fix return in void function warning
This fixes checkpatch.pl warning:

WARNING: void function return statements are not generally useful

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:34:34 -07:00
Darshana Padmadas 6606a77f92 Staging: lustre: place open brace following struct on same line
This patch fixes checkpatch.pl warning:

WARNING: open brace following struct goes on the same line.

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:34:34 -07:00
Darshana Padmadas 4467a945fc Staging: lustre: libcfs: fix checkpatch warning else after return statement
Fix checkpatch warning by removing unnecessary else after return statement.

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:29:34 -07:00
Darshana Padmadas f5740b2e7e Staging: lustre: include: libcfs: removed else before return statement in libcfs_crypto.h
This is a patch to libcfs_crypto.h that fixes warning on unnecessary else before return statement found by checkpatch.pl tool.

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:29:34 -07:00
Roxana Blaj 225557bf27 staging: speakup: fix checkpatch warning
This fixes the checkpatch warning:
WARNING: line over 80 characters

Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:27:28 -07:00
Roxana Blaj 0a3a725adb staging: speakup: fix checkpatch warning
This fixes the cheackpatch warning:
WARNING: Missing a blank line after declarations

Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:27:28 -07:00
Nicoleta Birsan 472fe30efd Staging: speakup: fix checkpatch warning
This fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations

Signed-off-by: Nicoleta Birsan <nicolle.birsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:27:28 -07:00
Blaj Roxana 297cbdaeca staging: skein: replace spaces with tabs
This fixes the error and warning:
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line

Signed-off-by: Blaj Roxana <roxanagabriela10@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:27:28 -07:00
Roberta Dobrescu fb33aa47a0 staging: dgnc: Check sscanf return value
This fixes the following checkpatch.pl warnings:
WARNING: unchecked sscanf return value

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:25:23 -07:00
Gulsah Kose f23e875fd2 staging: dgnc: Fix unnecessary space warning.
Fixed "Unnecessary space before function pointer argument" checkpatch.pl
warning in dgnc_driver.h

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:25:22 -07:00
Gulsah Kose e8756d4a51 staging: dgnc: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
dgnc_sysfs.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:25:22 -07:00
Vaishali Thakkar 3dfe755780 Staging: dgnc: Merge lines and remove unused variable for immediate return
This patch merges two lines in a single line if immediate
return is found. It also removes unnecessory variable rc
as it is no longer needed.

This is done using Coccinelle. Semantic patch used for this
is as follows:

@@
type T;
identifier i;
identifier f;
constant C;
@@
- T i;
  ...when != i
     when strict
(
  return -C;
|
- i =
+ return
     f(...);
- return i;
)

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:25:22 -07:00
Roberta Dobrescu 10352c2a69 staging: dgnc: Move open brace on previous line
This fixes the following checkpatch.pl errors:
ERROR: that open brace { should be on the previous line

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:25:22 -07:00
Roberta Dobrescu 05a70e1403 staging: dgnc: Do not initialise statics to 0 or NULL
This fixes the following checkpatch.pl error:
ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:21:27 -07:00
Roberta Dobrescu b051017fb4 staging: dgnc: Replace kzalloc with kcalloc
This fixes the following checkpatch.pl warnings:
WARNING: Prefer kcalloc over kzalloc with multiply

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:17:14 -07:00
Roberta Dobrescu f3dadd29f7 staging: dgnc: Fix warnings relating to printk()
This fixes the following checkpatch.pl warnings:
WARNING: printk() should include KERN_ facility level
It replaces printk() with dev_dbg() in order to avoid the warning that a more
specific function should be used.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:17:14 -07:00
Mahati Chamarthy 2be13f7b7c Staging: rtl8192ee: rtl8192ee: Fix missing blank line warning
This fixes the following checkpatch.pl warnings:
WARNING: Missing a blank line after declarations

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:15:15 -07:00
Mahati Chamarthy b9209a93ed Staging: rtl8192ee: Fix else not useful style warning
This fixes the following checkpatch.pl warnings:
WARNING: else is not generally useful after a break or return

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:15:15 -07:00
Mahati Chamarthy 1709a582e1 Staging: rtl8192ee: Fix break is not useful warning
This fixes the following checkpatch.pl warnings:
WARNING: break is not useful after a goto or return

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:15:15 -07:00
Mahati Chamarthy fe6dc85eaf Staging: rtl8192ee: Fix else is not useful warning
This fixes the following checkpatch.pl warnings:
WARNING: else is not generally useful after a break or return

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:15:15 -07:00
Mahati Chamarthy f41788b7c9 Staging: rtl8192ee: Fix missing blank line warning
This fixes the following checkpatch.pl warnings:
WARNING: Missing a blank line after declarations

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:15:15 -07:00
Mahati Chamarthy ad39fe7434 Staging: rtl8192e: Fix printk debug style warning
This fixes the following checkpatch.pl warnings:
WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev,
 ... then pr_debug(...  to printk(KERN_DEBUG ...

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:14:30 -07:00
Mahati Chamarthy 4344672830 Staging: rtl8192e: Fix printk style warning
This fixes the following checkpatch.pl warnings:
WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:14:30 -07:00
Mahati Chamarthy 6af197672f Staging: rtl8192e: Fix space before semicolon warning
This fixes the following checkpatch.pl warning:
WARNING: space prohibited before semicolon

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:14:30 -07:00
Mahati Chamarthy 13402f7b76 Staging: rtl8192e: Fix else is not useful warning
This fixes the following checkpatch.pl warning:
WARNING: else is not generally useful after a break or return

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:14:30 -07:00
Mahati Chamarthy 5110e40260 Staging: rtl8192e: Fix void function return statements style warning
This fixes the following checkpatch.pl warnings:
WARNING:  void function return statements are not generally useful

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:14:30 -07:00
Mahati Chamarthy 59422a74b5 Staging: rtl8192e: Fix else is not useful style warning
This fixes the following checkpatch.pl warnings:
WARNING: else is not generally useful after a break or return

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:14:30 -07:00
Vaishali Thakkar 1f921b9f61 Staging: rtl8192e: Fixed style warning relating to printk()
This patch fixes following checkpatch.pl warning in file rtl_dm.c:

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO .

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:13:41 -07:00
Mahati Chamarthy 52e93b8ab4 Staging: rtl8192e: Fix unnecessary parentheses style warning
This fixes the following checkpatch.pl warning:
WARNING: Unnecessary parentheses - maybe == should be = ?

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:13:41 -07:00
Benedict Boerger 4af409f6c3 staging: rtl8192u: delete unused function CAM_read_entry
Fix the sparse warning: symbol 'CAM_read_entry' was not declared. Should it be static?

The function CAM_read_entry is not used and therefore deleted.

Signed-off-by: Benedict Boerger <benedict.boerger@cs.tu-dortmund.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:11:06 -07:00
Ragnar B. Johannsson 77baad9e4d staging: rtl8192u: Move ieee80211_crypto_* declarations to ieee80211/ieee80211.h
Move ieee80211_crypto*_init and _exit prototype declarations from r8192U_core.c to ieee80211/ieee80211.h. This fixes the following sparse warnings:

drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c:203:12: warning: symbol 'ieee80211_crypto_init' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c:223:13: warning: symbol 'ieee80211_crypto_deinit' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c:764:12: warning: symbol 'ieee80211_crypto_tkip_init' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c:769:13: warning: symbol 'ieee80211_crypto_tkip_exit' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:467:12: warning: symbol 'ieee80211_crypto_ccmp_init' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:472:13: warning: symbol 'ieee80211_crypto_ccmp_exit' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c:281:12: warning: symbol 'ieee80211_crypto_wep_init' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c:286:13: warning: symbol 'ieee80211_crypto_wep_exit' was not declared. Should it be static?

Signed-off-by: Ragnar B. Johannsson <ragnar@igo.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:11:06 -07:00
Mahati Chamarthy 5635b82a55 Staging: rtl8192e: Fix style warnings relating to printk(KERN_DEBUG
This fixes the following checkpatch.pl warnings:
WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:11:06 -07:00
Vaishali Thakkar fe40a0b361 Staging: rtl8192e: rtl8192e: Remove unnecessory braces and space
This patch removes following checkpatch.pl warnings in rtl_core.c file:

WARNING: Braces {} are not necessary for single statement blocks
WARNING: Space prohibited before semicolon

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:11:06 -07:00
Vaishali Thakkar 5c8b3961da Staging: rtl8192e: rtl8192e: Remove unnecessory variable
This patch removes unnecessory variable in file ret_core.c
using coccinelle script.Semantic patch for this is as follows:

@@
identifier ret;
@@

-int ret = 0;
 ... when != ret
     when strict
-return ret;
+return 0;

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:11:06 -07:00
Rajbinder Brar 4309635f69 Staging: vt6655: Break 80 character long line to remove checkpatch error
This removes checkpatch.pl warning
WARNING: line over 80 characters

Signed-off-by: Rajbinder Brar <brar.rajbinder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:01:22 -07:00
Rajbinder Brar b377ed4cce Staging: vt6656: Removing else after break statement to fix warning
This patch fixes the checkpatch.pl warning in baseband.c file
WARNING: else is not useful after a break or return

Signed-off-by: Rajbinder Brar <brar.rajbinder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:01:22 -07:00
Aybuke Ozdemir dbc6ee63d4 Staging: vt6655: Fix C99 style commenting.
This patch fixes these error messages found by checkpatch.pl:
ERROR: do not use C99 // comments

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:01:22 -07:00
Abel Moyo a600f4589f Staging: gdm724x: gdm_usb: added error checking in do_tx()
Added error checking for alloc_tx_struct in do_tx()

Signed-off-by: Abel Moyo <abelmoyo.ab@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:56:46 -07:00
Gulsah Kose 37d963fb80 staging: gdm724x: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
gdm_mux.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:56:46 -07:00
Daeseok Youn 492a1e7be5 staging: dgap: use schedule_timeout_interruptible() instead of dgap_ms_sleep()
Using schedule_timeout_interruptible() is exactly same as
setting a status of current process and calling  schedule_timeout().

Removes dgap_ms_sleep(), because this function is used
only when closing tty channel on dgap_tty_close().
And also removes ch_close_delay that is always set to 250
on dgap_tty_init().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:53:57 -07:00
Ankita Patil 335d9c85be Staging: dgap: Remove unnecessary variable.
This patch removes unnecessary variable in file dgap.c
using Coccinelle. Semantic patch for this is as follows:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Also removed the unneeded variable manually.

Signed-off-by: Ankita Patil <patil.ankita.r@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:53:57 -07:00
Purnendu Kapadia 50d0a21b61 staging: android: sw_sync: checkpatch fixes
- no space after cast
   - allignment should match open parenthesis
   - remove unnecessary new line

Signed-off-by: Purnendu Kapadia <pro8linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:35:53 -07:00
Aybuke Ozdemir 1f0f6c9862 Staging: rtl8723au: hal: Space prohibited before semicolon
This patch fixes these warning messages found by checkpatch.pl:
WARNING: Space prohibited before semicolon.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:30:11 -07:00
Aybuke Ozdemir 8c09757d91 Staging: rtl8723au: core: Fix unnecassary braces warning.
This patch fixes these warning messages found by checkpatch.pl:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:30:11 -07:00
Aybuke Ozdemir 867ce1bd68 Staging: rtl8723au: core: Fix "foo * bar" warning.
This patch fixes these error messages found by checkpatch.pl:
ERROR: "foo* bar" should be "foo *bar"

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:30:11 -07:00
Greg Donald c895a5df85 drivers: staging: rtl8723au: Fix "space required after that ','" errors
Fix checkpatch.pl "space required after that ','" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:28:04 -07:00
Kieron Browne f78c0710cd staging: rtl8723au: fix sparse incorrect type assignment warnings
Use cpu_to_le16 to cast int for assignment to __le16 members

Signed-off-by: Kieron Browne <kieron.browne@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:28:04 -07:00
MihaelaGaman adabff85c9 staging: rtl8723au: Fix checkpatch errors
Fix checkpatch.pl "spaces required around":
>, =, =, =, =, +=, >, >, <, <, :, <  errors.

Signed-off-by: MihaelaGaman <mp.gaman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:28:04 -07:00
Vaishali Thakkar 1703c17b8a Staging: rtl8188eu: os_dep: Compression of lines for immediate return
This patch compresses two lines in to a single line in file rtw_android.c
if immediate return statement is found. It also removes variable bytes_written as
it is no longer needed.

It is done using script Coccinelle. And coccinelle uses following semantic
patch for this compression function:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Signed-off-by: Vaishali Thakkar<vthakkar1994@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:26:01 -07:00
Gulsah Kose 16e614e850 staging: rtl8188eu: core: Fixed wrong space error.
This patch fixes "foo     * bar" should be "foo   *bar" checkpatch.pl error in rtw_cmd.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:26:01 -07:00
Catalina Mocanu 69869c01ff staging: iio: impedance-analyzer: add blank line after declaration
This fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations.

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:25:09 -07:00
Catalina Mocanu 714ab9bdd3 staging: iio: trigger: add blank lines after declarations
This fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations.

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:25:09 -07:00
Aybuke Ozdemir 8a689c1147 Staging: iio: resolver: Missing a blank line after declarations
This patch fixes these warning messages found by checkpatch.pl:
WARNING : Missing a blank line after declarations

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:24:43 -07:00
Catalina Mocanu 4b4c727519 staging: iio: dummy: add blank lines after declarations.
This fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations.

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:24:19 -07:00
Tina Johnson b581c3d9a9 Staging: iio: meter: ade7753: Fixed checkpatch.pl warnings
Clean-up patch to fix the following checkpatch.pl warnings:

ade7753.c:325: WARNING: Missing a blank line after declarations
ade7753.c:383: WARNING: Missing a blank line after declarations

Signed-off-by: Tina Johnson<tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:23:51 -07:00
Tina Johnson 9034720a54 Staging: iio: meter: ade7753: Merged assignment with immediately following return statement
Saved one line of code by merging the assigning and return statements
of variable ret. And thus removed variable len which was no longer useful.

This patch was done using Coccinelle script and the following semantic
patch was used:

@@
expression ret;
identifier f;
@@

-ret =
+return
      f(...);
-return ret;

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:23:51 -07:00
Julia Lawall 496a51bd64 staging: lustre: llite: Use kzalloc and rewrite null tests
This patch removes some kzalloc-related macros and rewrites the
associated null tests to use !x rather than x == NULL.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression ptr;
statement S,S1;
@@

  \(OBD_ALLOC\|OBD_ALLOC_WAIT\|OBD_ALLOC_PTR\|OBD_ALLOC_PTR_WAIT\)(ptr,...);
  if (
+     !
      ptr
-      == NULL
     ) S else S1

@@
expression ptr,size;
@@

- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_ALLOC_WAIT(ptr,size)
+ ptr = kzalloc(size, GFP_KERNEL)

@@
expression ptr,size;
@@

- OBD_ALLOC_PTR(ptr)
+ ptr = kzalloc(sizeof(*ptr), GFP_NOFS)

@@
expression ptr,size;
@@

- OBD_ALLOC_PTR_WAIT(ptr,size)
+ ptr = kzalloc(sizeof(*ptr), GFP_KERNEL)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:14:01 -07:00
Martin Kelly cdbcd33052 Staging/bcm: Fix whitespace/comments in Ioctl.h
Cleanup whitespace and comments in Ioctl.h in a few ways:
- > 80 character cleanup
- Comment clarification
- More consistent vertical alignment

Signed-off-by: Martin Kelly <martkell@amazon.com>
Reviewed-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:10:40 -07:00
Fabien Malfoy 33b443e467 staging: rtl8821ae: Remove space after unary operator in efuse.c
Several pointer declaration syntax have been fixed to match the coding style.

Signed-off-by: Fabien Malfoy <fabien.malfoy@laposte.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:10:40 -07:00
Merlin Chlosta c24cdca05e staging: rtl8192u: sparse warnings: declare ieee80211_TURBO_Info static
Declare ieee80211_TURBO_Info static to fix a sparse "symbol was not declared" warning.

Signed-off-by: Merlin Chlosta <eudyptula@merlin.geekmail.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:10:40 -07:00
Vincenzo Scotti 5b1ebbffc0 staging: emxx_udc: fix compile warnings: discarding const qualifier
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:10:40 -07:00
Masanari Iida f02935c575 staging: exxx_udc: Convert pr_warning to pr_warn
This patch Convert pr_warning to pr_warn.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:08:10 -07:00
Sudip Mukherjee 3aa2ec5819 staging: unisys: uislib: uislib.c: sparse warning of context imbalance
fixed sparse warning : context imbalance in 'destroy_device'
                        unexpected unlock
this patch will generate warning from checkpatch for
lines over 80 character , but since those are user-visible strings
so it was not modified.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Acked-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:08:10 -07:00
Luke Hart 635ecc5f36 staging: unisys: Fix sparse error - accessing __iomem directly
Copy the channel type into a temporary buffer so that code will work
for architectures that don't support MMIO. This now works in same way
as other tests in same function.

Signed-off-by: Luke Hart <luke.hart@birchleys.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:08:09 -07:00
Mark Einon cec78b98df staging: et131x: logical continuations should be on the previous line
Fix two occurrences of the checkpatch check:

CHECK: Logical continuations should be on the previous line

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:05:20 -07:00
Mark Einon d855b8935e staging: et131x: Fix 'else is not generally useful after a break or return'
Fix this checkpatch warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:05:20 -07:00
Mark Einon b6cb966074 staging: et131x: Use variable names instead of types in sizeof
A few calls to sizeof() in et131x.c give the type as a parameter
- use the equivalent variable name instead.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:05:20 -07:00
Mark Einon ee60c8ec32 staging: et131x: Use braces on all arms of if/else statements
In some places in et131x.c, one arm of am if/else statement has braces
and the other not - put braces on both arms where this happens.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:05:19 -07:00
Mark Einon c13756784a staging: et131x: Remove spaces after casts
In three places in et131x.c, spaces exist after a cast. Remove them.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:05:19 -07:00
Mark Einon 48c8f78914 staging: et131x: Add spinlock definition comments
Checkpatch --strict advises that spinlocks should be described when
defined, seems a good idea so this change does that.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:04:52 -07:00
Mark Einon 0c55fe2018 staging: et131x: Remove useless assignment to NULL
The stack variable skb is no longer used after it's set to
NULL. Don't set it to NULL.

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>
2014-09-19 16:04:52 -07:00
Mark Einon bacb71edb4 staging: et131x: Remove send_hw_lock spinlock
We don't need to use this lock - the tx path is protected by the
networking subsystem xmit_lock, so we don't also need it in
nic_send_packet().

The other use of this spinlock in et1310_enable_phy_coma() to protect
a low power flag makes no sense, so can just be removed.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:04:52 -07:00
Mark Einon 82d95799d8 staging: et131x: Simplify unlocking tcb_send_qlock in et131x_tx_timeout()
The tcb_send_qlock spinlock is unlocked in all three paths at the end of
et131x_tx_timeout(). We can call it once before entering any of the paths,
saving ourselves a few lines of code.

This change puts tcb->count++ outside of the lock, but et131x_tx_timeout()
itself is protected by the tx_global_lock, so this shouldn't matter.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:04:52 -07:00
Mark Einon 0b06912b84 staging: et131x: Remove blank lines form et131x.c
Remove some unecessary blank lines from et131x.c

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:04:52 -07:00
Mark Einon 82bb0be4c0 staging: et131x: Remove extra blank lines in et131x.h
Remove some blank lines from et131.h, including double blank lines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:04:51 -07:00
Mark Einon be685bb01f staging: et131x: Remove 'reduce number of spinlocks' TODO item
The number of spinlocks has been halved, from 8 to 4 since this
comment was made, let's see if this is enough.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:02:12 -07:00
Mark Einon 8019f2e2aa staging: et131x: Simplify code in nic_rx_pkts() for multicast_pkts_rcvd
In nic_rx_pkts(), we check that a multicast packet received (when using
a multicast list) is one that was requested - despite setting the list
up with the hardware. We shouldn't expect to get a mc packet we didn't
ask for, so remove these extra checks.

This also means that the surrounding code can be tiedied up a little.

Tested somewhat with omping, with no adverse effects seen.

Also remove this item from the TODO list.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:02:12 -07:00
Mark Einon 668caa674c staging: et131x: Combine two if statements with same effect
Both these if statements have the same effect when true, so combine
them and save a few lines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:02:12 -07:00
Mark Einon 97cd38dc93 staging: et131x: Remove struct tcb->flags
'struct tcb' member 'flags' was only used to collect tx stats, now
we are no longer collecting those particular stats, we no longer
need tcb->flags or the code used to peek into the skb to set it's
value.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:02:12 -07:00
Mark Einon f7cc9e0fd4 staging: et131x: Remove ununsed statistics
From struct ce_stats; unicast_pkts_rcvd, unicast_pkts_xmtd,
multicast_pkts_xmtd, broadcast_pkts_rcvd and broadcast_pkts_xmtd
are not returned or used for anything meaningful - remove the code
that collects them, and the struct members too.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:02:12 -07:00
Mark Einon 23780f077b staging: et131x: Tidy up rx/tx dropped & bytes stats
Remove some fairly useless comments regarding rx/tx _bytes and
_dropped, and use rcvd_pkts_dropped stat value to provide rx_dropped.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:02:12 -07:00
Mark Einon 701b943e5c staging: et131x: In et131x_tx(), don't return NETDEV_TX_BUSY, just drop the packet
Memory allocation errors do not denote NETDEV_TX_BUSY, simply drop
the packet silently with kfree_skb() and return NETDEV_TX_OK.

Also remove this item from the TODO list.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:02:12 -07:00
Mark Einon 4792e6d136 staging: et131x: Remove et131x_send_packets() function
Remove et131x_send_packets() and replace the only use in et131x_tx
with the removed function's body.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:02:12 -07:00
Luca Ellero 7baf929491 staging: comedi: ni_usb6501: add counter subdevice
Add counter support for NI USB-6501.

The following functions are introduced:
- ni6501_counter_command()
- ni6501_cnt_insn_config()
- ni6501_cnt_insn_read()
- ni6501_cnt_insn_write()

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:58:18 -07:00
Luca Ellero 5116a48c1b staging: comedi: ni_usb6501: rename ni6501_send_command()
Rename ni6501_send_command to ni6501_port_command

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:58:18 -07:00
Luca Ellero d6669ba21b staging: comedi: ni_usb6501: remove empty lines
ni6501_send_command(): remove empty lines in case statements

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:58:18 -07:00
Luca Ellero 78d8135608 staging: comedi: ni_usb6501: remove useless check
Remove useless test in ni6501_send_command. The check is useless since this
function is called only in this driver.

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:58:18 -07:00
Luca Ellero e9826c0c8a staging: comedi: ni_usb6501: replace spaces with tabs
ni6501_auto_attach(): replace spaces with tabs to get proper alignment

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:58:18 -07:00
Luca Ellero 88367bd588 staging: comedi: ni_usb6501: cleanup response_size
Cleanup response_size in ni6501_send_command (READ_PORT command).
No logical/functional change is introduced by this patch.

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:58:18 -07:00
Luca Ellero ddf9b6a4a0 staging: comedi: ni_usb6501: update comments
Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:58:18 -07:00
Luca Ellero aa66cd164b staging: comedi: ni_usb6501: add counter commands
Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:58:18 -07:00
Ian Abbott aff5b1f8eb staging: comedi: remove comedi_fc module
All the exported functions in the "comedi_fc" module have been migrated
to the core "comedi" module and renamed, so it is now just a dummy
module.  Remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:56:49 -07:00
Ian Abbott b8d57655fd staging: comedi: migrate copyrights from "comedi_fc.c"
The "comedi_fc" module was originally written and copyrighted by Frank
Mori Hess, but the functionality has been migrated into the core
"comedi" module.  Move the copyright notices over to the affected .c
files in the core comedi module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:55:32 -07:00
Ian Abbott bfa9facdb1 staging: comedi: add comedi_read_array_from_buffer()
The "comedi_fc" module contains a few functions useful to Comedi
drivers.  Their functionality is being migrated to the core "comedi"
module and renamed to start with the prefix `comedi_`.  As part of this
migration, move `cfc_read_array_from_buffer()` into the core comedi
module and rename it to `comedi_read_array_from_buffer()`.  Change the
external declaration of `cfc_read_array_from_buffer()` into an inline
function that calls `comedi_read_array_from_buffer()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:55:32 -07:00
Ian Abbott af2c6a8a24 staging: comedi: comedi_fc.h: use comedi_write_array_to_buffer()
Since `cfc_write_array_to_buffer()` is just an inline function that
calls `comedi_write_array_to_buffer()`, replace calls to the former to
the latter in the "comedi_fc.h" header.  This is part of the migration
of functionality from the "comedi_fc" module to the core "comedi"
module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:55:31 -07:00
Ian Abbott ea29c1d563 staging: comedi: add comedi_write_array_to_buffer()
The "comedi_fc" module contains a few functions useful to Comedi
drivers.  Their functionality is being migrated to the core "comedi"
module and renamed to start with the prefix `comedi_`.  As part of this
migration, move `cfc_write_array_to_buffer()` into the core comedi
module and rename it to `comedi_write_array_to_buffer()`.  Change the
external declaration of `cfc_write_array_to_buffer()` into an inline
function that calls `comedi_write_array_to_buffer()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:55:31 -07:00
Ian Abbott 5c520aafa0 staging: comedi: comedi_fc: cfc_write_array_to_buffer() data is const
The `data` pointer of `cfc_write_array_to_buffer()` ought to point to
`const` data.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:55:31 -07:00
Ian Abbott 5a78035924 staging: comedi: add comedi_handle_events()
The "comedi_fc" module contains a few functions useful to Comedi
drivers.  Their functionality is being migrated to the core "comedi"
module and renamed to start with the prefix `comedi_`.  As part of this
migration, move `cfc_handle_events()` into the core comedi module and
rename it to `comedi_handle_events()`.  Change the external declaration
of `cfc_handle_events()` into an inline function that calls
`comedi_handle_events()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:55:31 -07:00
Ian Abbott 1c38d6f22a staging: comedi: comedi_fc: use comedi_inc_scan_progress()
Since `cfc_inc_scan_progress()` is just an inline function that calls
`comedi_inc_scan_progress()`, replace calls to the former to the latter
in the "comedi_fc" module.  This is part of the migration of
functionality from the "comedi_fc" module to the core "comedi" module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:55:31 -07:00
Ian Abbott 2b4e1f6324 staging: comedi: add comedi_inc_scan_progress()
The "comedi_fc" module contains a few functions useful to Comedi
drivers.  Their functionality is being migrated to the core "comedi"
module and renamed to start with the prefix `comedi_`.  As part of this
migration, move `cfc_inc_scan_progress()` into the core comedi module
and rename it to `comedi_inc_scan_progress()`.  Change the external
declaration of `cfc_inc_scan_progress()` into an inline function that
calls `comedi_inc_scan_progress()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:55:31 -07:00
Ian Abbott 55deb39b12 staging: comedi: comedi_fc: use comedi_bytes_per_scan()
Since `cfc_bytes_per_scan()` is just an inline function that calls
`comedi_bytes_per_scan()`, replace calls to the former to the latter in
the "comedi_fc" module.  This is part of the migration of functionality
from the "comedi_fc" module to the core "comedi" module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:55:31 -07:00
Ian Abbott f146fe6341 staging: comedi: add comedi_bytes_per_scan()
The "comedi_fc" module contains a few functions useful to Comedi
drivers.  Their functionality is being migrated to the core "comedi"
module and renamed to start with the prefix `comedi_`.  As part of this
migration, move `cfc_bytes_per_scan()` into the core comedi module and
rename it to `comedi_bytes_per_scan()`.  Change the external declaration
of `cfc_bytes_per_scan()` into an inline function that calls
`comedi_bytes_per_scan()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:55:31 -07:00
Ian Abbott 062fdcada9 staging: comedi: addi_apci_3120: simplify setting of devpriv->us_UseDma
`apci3120_auto_attach()` first sets `devpriv->us_UseDma` to 1, then sets
it back to 0 if it fails to allocate the DMA buffer.  Since `*devpriv`
is initially zeroed out by `comedi_alloc_devpriv()`, change it to only
set `devpriv->us_UseDma` to 1 if the allocation succeeds.  Also, don't
bother explicitly initializing `devpriv->b_DmaDoubleBuffer` to 0 as it
is already zeroed out.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:39:39 -07:00
Ian Abbott fbfd9c8a17 staging: comedi: addi_apci_3120: use dma_alloc_coherent()
Use `dma_alloc_coherent()` to allocate the DMA buffers instead of
using `__get_free_pages()` to allocate and `virt_to_bus()` to get the
hardware address.  The coherent buffers are fairly small - at most 4
pages (although there are two of them).  Use of `virt_to_bus()` is
discouraged.

Note: `struct addi_private` is used by some other ADDI-DATA drivers as
well, but this is the only one using the affected members.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:39:39 -07:00
Ian Abbott 9c97e588d8 staging: comedi: addi_apci_3120: don't overallocate DMA buffer
The last parameter of `__get_free_pages()` is log2 (the 'order') of the
number of pages to be allocated.  This driver seems to think it is the
linear number of pages, so `apci3120_auto_attach()` first tries to allocate
16 pages, but only uses 4 of them, setting the buffer size to PAGE_SIZE
multiplied by the 'order'.  If the allocation fails, it tries
progressively smaller orders, down to 0.  If the allocation at order 0
succeeds, the buffer size is set to 0, which is likely to cause
problems.

Set the buffer size to `PAGE_SIZE` shifted left by the allocation order.
Since the maximum buffer size previously used was 4, start with an
allocation order of 2 instead of 4.  Rename the `ui_DmaBufferPages` member of
`struct addi_private` to `ui_DmaBufferPageOrder` and rename the `pages`
local variable to `order` to make it clearer what it is.

Note: `struct addi_private` is used by some other ADDI-DATA drivers as
well, but this is the only one using the affected members.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:39:39 -07:00
Ian Abbott df567feb00 staging: comedi: addi_apci_3120: don't allocate 2nd DMA buffer on failure
`apci3120_auto_attach()` tries to allocate two DMA buffers but may
allocate a single buffer or none at all.  If it fails to allocate the
first buffer, it still tries to allocate the second buffer, even though
it won't be used.  Change it to not bother trying to allocate the second
buffer if the first one fails.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:39:39 -07:00
Ian Abbott aee447566d staging: comedi: remove comedi_board()
All calls to the inline function `comedi_board()` in "comedidev.h" have
been removed, so remove the function.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:36:25 -07:00
Ian Abbott 75fbdbf61d staging: comedi: adl_pci9118: use dma_alloc_coherent()
Use `dma_alloc_coherent()` to allocate the DMA buffers instead of
using `__get_free_pages()` to allocate and `virt_to_bus()` to get the
hardware address.  The coherent buffers are fairly small - at most 4
pages (although there are two of them).  Use of `virt_to_bus()` is
discouraged.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:36:25 -07:00
Ian Abbott f39f87e9ea staging: comedi: adl_pci9118: don't overallocate DMA buffer
The last parameter of `__get_free_pages()` is log2 (the 'order') of the
number of pages to be allocated.  This driver seems to think it is the
linear number of pages, so `pci9118_alloc_dma()` first tries to allocate
16 pages, but only uses 4 of them, setting the buffer size to PAGE_SIZE
multiplied by the 'order'.  If the allocation fails, it tries
progressively smaller orders, down to 0.  If the allocation at order 0
succeeds, the buffer size is set to 0, which is likely to cause
problems.

Set the buffer size to `PAGE_SIZE` shifted left by the allocation order.
Since the maximum buffer size previously used was 4, start with an
allocation order of 2 instead of 4.  Rename the `pages` member of
`struct pci9118_dmabuf` (and the local variable in
`pci9118_alloc_dma()`) to `order` to make it clearer what it is.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:36:25 -07:00
Ian Abbott d5733baf23 staging: comedi: adl_pci9118: don't allocate 2nd DMA buffer on failure
`pci9118_alloc_dma()` tries to allocate two DMA buffers but may allocate
a single buffer or none at all.  If it fails to allocate the first
buffer, it still tries to allocate the second buffer, even though it
won't be used.  Change it to not bother trying to allocate the second
buffer if the first one fails.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:36:24 -07:00
Dan Carpenter ed87c2b2e7 staging: vt6655: buffer overflow in ioctl
->u.generic_elem.len is a user controlled number between 0-255.  We
should limit it to avoid memory corruption.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:32:20 -07:00
Greg Kroah-Hartman 922b83b4aa First round of IIO fixes for the 3.17 cycle.
* Fix an overwritten error return that can prevent deferred probing when
   using of_iio_channel_get_by_name
 * A series that deals with an incorrect reference count when the default
   trigger is set within the main probe routine for a driver.  Can result
   in a double free if the trigger is changed.
 * Fix a buglet with xilinx-xadc concerning setup of the address for an
   aux channel.
 * At91 adc driver could sometimes get a touchscreen reading rather than
   the intended adc channel.  This is fixed by using the channel data register
   instead.
 * Fix some ST magnetometer gain values that differ in production parts from
   the prerelease ones used for driver development.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUFfUOAAoJEFSFNJnE9BaIcyoQAKYclsqsYvWfNmxaGncSCwjZ
 hPh/YrlOv/Gto9yvLRbLHlvP966STHvi6T0g0dXGxAMy5q2vvYzP9T9iHexUIeW/
 l/UJ0lGTz7YNl0/RwoLD9l8CrNscKPh6ZDsR+Y73mlJzsl4oTsGYlv00PKbleSLk
 8qqLqagTa1ToiujOE2j9H+rvea3G9nzCvPYQbJR+tDQ/LqBSquyhpF+/oumwPTCP
 EVajxFzh/MUQdRtPd27IVP1g/lbssvhCburrf/KVbfskwTcV0Mhpj4joU18dMjy8
 VvRLRJbjqxaKPYux97WEFhDh5eQbS5GZ8NX4xZgDfvn8RBFG0P4T7jNXH1p0QGoN
 /tbDJcTeDfJYZoD/p2ZZWjr0CnR5t12kY6EVPRje79S3rkaS0NN0B7A4ywRhoUnC
 r5e7R+zqtM4QibkcZSw71mgh83cWt9mAn3hgUn/riqkjcp4hyZxVR3RhrUZKpl/J
 EBFNVGXJXoLBgtg4n+LM+2MeESVutVEytlv/ORMCrphI7+H1d2GP0nrITpClDBVZ
 tkikHJoRrf21ceJDxY+b3bTemrbH/9METu9AyzYjoHyNOvqoZQcSoB7gOxBcmCHm
 X/uJLEzJHJrz6XlBQKqxt11li6rmczaPta3AN78GArN1/cmaCPNDiAKq4edq+gAn
 uvn5V8GTfs/XRJk/kVrl
 =MS7C
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-3.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First round of IIO fixes for the 3.17 cycle.

* Fix an overwritten error return that can prevent deferred probing when
  using of_iio_channel_get_by_name
* A series that deals with an incorrect reference count when the default
  trigger is set within the main probe routine for a driver.  Can result
  in a double free if the trigger is changed.
* Fix a buglet with xilinx-xadc concerning setup of the address for an
  aux channel.
* At91 adc driver could sometimes get a touchscreen reading rather than
  the intended adc channel.  This is fixed by using the channel data register
  instead.
* Fix some ST magnetometer gain values that differ in production parts from
  the prerelease ones used for driver development.
2014-09-19 15:29:39 -07:00
Greg Kroah-Hartman 27f5a85fb5 Second round of new IIO drivers, features and cleanups for the 3.18 cycle.
New drivers and part support
 * Bosch bmg160 Gyroscope driver
 * Dyna-Image al3320a ambient light sensor driver
 * Bosh bmi055 gyroscope part driver (accelerometer part supported by bmc150)
 * isl29018 - add support for isl29023 and isl29035
 * kxcjk-1013 - add support for kxcj9-1008 and kxtj2-1009
 * bmc150 - additional part support (BMI055 accelerometer part, BMA255,
   BMA222E, BMA250E and BMA280).  Different resolutions but otherwise similar
   parts.
 * bma180 - add BMA250 (note different from the BMA250E support above despite
   the naming).  A lot of driver reworking lead up to this - described below.
 
 New features
 * kxcjk1013 - add threshold event support.
 * rockchip - document DT bindings.
 * isl29018 - ACPI support
 * bma180 - enable use without IRQ
 
 Cleanups
 * Tree wide - drop owner field assignment if using the module_platform_driver
   helper as that assigns it anyway.
 * kxcjk1013 - drop a redundant assignment of the current range and fix a
   a defined but not used warning.
 * inv_mpu6050 - Remove an unnecessary cast form a void pointer.
 * rockchip - drop and unused variable.
 * at91_adc - make a local function static.
 * st-sensors-core - correctly handle an error in setting in
   st_sensors_set_drdy_int_pin
 * isl29018 - typo fix
 * bmc150 - fix incorrect scale value for 16G range (Driver new this cycle)
 * bmc150 - fix issues when CONFIG_PM_RUNTIME not set (Driver new this cycle)
 * ad7606 - line length tidy up.
 * bmg160 - set power state only if PM_RUNTIME is defined.
 * ak8975 - fix some unnecessary casting between char * and const char *
 * bma180 - prefix remaining bits and bobs with bma180_ and ensure consistent.
          - use a bool instead of an int for state (as its either on or off).
          - expose the temperature channel
          - statically allocate buffers to avoid need for update_scan_mode
            callback.
          - refactor to allow futher chip variants including support for part
            specific config and disable code + different resolutions.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUGJipAAoJEFSFNJnE9BaIPMUP/38mZ3zua6Tupx74APGwjiNm
 wWWve38LdWKM4tzkrI9DycdfZbrNyiAs570kpSvp4CT2hQfQ8aYcFSA85xyPuFtl
 0f3x5qp1pM28Bv4yYgNqf/QnZ1QK8P3cRTv59uiII6Z3MKVhIpvG+P+svMEaKjqD
 +u+MQnevQ5C8ejykOV/YKcrFwdq5/IcJojwC8ga50GZBE3CmGGmkEi8lGdWSgn8E
 EUv6lRSjGeYcJgWDged1cTA0yLJ3yu7/10OkJwRhvQEmthfUsgNYT2zIJYn966S5
 5xSG40Aa/V+FUATBmreW8dcFH2fYSdZjsLdtbyX4X+OeMtK7eNsSr0Ikkm9YpNsE
 1QAQeREE9LbimIdwGBMkpakiS/NAEYo/8jvUk896BBkCpnTHUg8lMn0NztYCAkvT
 Q+zGAv+/axvCAQ7hxSTyFdd4+wVbsXthDxY/8NosAGTfeQE+5iG5Jtr39qxJ1NEj
 ua3qSFPQLcACCjMkF6MONo0i+fuUJOSiovUmDupKm+aaiXQl5m7TZMxrvQ8LOYH7
 NJyragLrDPOxT8C2T3PJ0jQM/dNAkh8v4JK7i9ysz8RtgB+i0CoZTM+8JjWUfv1D
 VQhizA8Nn1WnW2RnIrap9y3I8JC0Pb0GzbvWG4ItF0uR/UIkCbahMzIQcf1XARJU
 Rc7Oq7icbZdPs233Jlsx
 =fazl
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.18b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second round of new IIO drivers, features and cleanups for the 3.18 cycle.

New drivers and part support
* Bosch bmg160 Gyroscope driver
* Dyna-Image al3320a ambient light sensor driver
* Bosh bmi055 gyroscope part driver (accelerometer part supported by bmc150)
* isl29018 - add support for isl29023 and isl29035
* kxcjk-1013 - add support for kxcj9-1008 and kxtj2-1009
* bmc150 - additional part support (BMI055 accelerometer part, BMA255,
  BMA222E, BMA250E and BMA280).  Different resolutions but otherwise similar
  parts.
* bma180 - add BMA250 (note different from the BMA250E support above despite
  the naming).  A lot of driver reworking lead up to this - described below.

New features
* kxcjk1013 - add threshold event support.
* rockchip - document DT bindings.
* isl29018 - ACPI support
* bma180 - enable use without IRQ

Cleanups
* Tree wide - drop owner field assignment if using the module_platform_driver
  helper as that assigns it anyway.
* kxcjk1013 - drop a redundant assignment of the current range and fix a
  a defined but not used warning.
* inv_mpu6050 - Remove an unnecessary cast form a void pointer.
* rockchip - drop and unused variable.
* at91_adc - make a local function static.
* st-sensors-core - correctly handle an error in setting in
  st_sensors_set_drdy_int_pin
* isl29018 - typo fix
* bmc150 - fix incorrect scale value for 16G range (Driver new this cycle)
* bmc150 - fix issues when CONFIG_PM_RUNTIME not set (Driver new this cycle)
* ad7606 - line length tidy up.
* bmg160 - set power state only if PM_RUNTIME is defined.
* ak8975 - fix some unnecessary casting between char * and const char *
* bma180 - prefix remaining bits and bobs with bma180_ and ensure consistent.
         - use a bool instead of an int for state (as its either on or off).
         - expose the temperature channel
         - statically allocate buffers to avoid need for update_scan_mode
           callback.
         - refactor to allow futher chip variants including support for part
           specific config and disable code + different resolutions.
2014-09-19 15:21:21 -07:00
Kirill Tkhai f139caf2e8 sched, cleanup, treewide: Remove set_current_state(TASK_RUNNING) after schedule()
schedule(), io_schedule() and schedule_timeout() always return
with TASK_RUNNING state set, so one more setting is unnecessary.

(All places in patch are visible good, only exception is
 kiblnd_scheduler() from:

      drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c

 Its schedule() is one line above standard 3 lines of unified diff)

No places where set_current_state() is used for mb().

Signed-off-by: Kirill Tkhai <ktkhai@parallels.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1410529254.3569.23.camel@tkhai
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Anil Belur <askb23@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dave Kleikamp <shaggy@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: David Howells <dhowells@redhat.com>
Cc: Dmitry Eremin <dmitry.eremin@intel.com>
Cc: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Isaac Huang <he.huang@intel.com>
Cc: James E.J. Bottomley <JBottomley@parallels.com>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: J. Bruce Fields <bfields@fieldses.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Laura Abbott <lauraa@codeaurora.org>
Cc: Liang Zhen <liang.zhen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Masaru Nomura <massa.nomura@gmail.com>
Cc: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Oleg Drokin <green@linuxhacker.ru>
Cc: Peng Tao <bergwolf@gmail.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Robert Love <robert.w.love@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Ursula Braun <ursula.braun@de.ibm.com>
Cc: Zi Shen Lim <zlim.lnx@gmail.com>
Cc: devel@driverdev.osuosl.org
Cc: dm-devel@redhat.com
Cc: dri-devel@lists.freedesktop.org
Cc: fcoe-devel@open-fcoe.org
Cc: jfs-discussion@lists.sourceforge.net
Cc: linux390@de.ibm.com
Cc: linux-afs@lists.infradead.org
Cc: linux-cris-kernel@axis.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-nfs@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: linux-raid@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: qla2xxx-upstream@qlogic.com
Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: user-mode-linux-user@lists.sourceforge.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-09-19 12:35:17 +02:00
abdoulaye berthe 88d5e520aa driver:gpio remove all usage of gpio_remove retval in driver
this remove all reference to gpio_remove retval in all driver
except pinctrl and gpio. the same thing is done for gpio and
pinctrl in two different patches.

Signed-off-by: Abdoulaye Berthe <berthe.ab@gmail.com>
Acked-by: Michael Büsch <m@bues.ch>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-09-18 11:03:10 -07:00
Dave Airlie b2efb3f0a1 Linux 3.17-rc5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUFjfVAAoJEHm+PkMAQRiGANkIAIU3PNrAz9dIItq8a/rEAhnx
 l2shHoOyEmyNR2apholM3BPUNX50cbsc/HGdi7lZKLkA/ifAj6B9nFD2NzVsIChD
 1QWVcvdkKlVuxXCDd26qbijlfmbTOAWrLw9ntvM+J6ZtECM6zCAZF4MAV/FwogPq
 ETGKD76AxJtVIhBMS99troAiC1YxmQ7DKgEr8CraTOR1qwXEonnPCmN/IZA6x2/G
 EXiihOuQB5me1X7k4PI0V8CDscQOn+3B2CQHIrjRB+KiTF+iKIuI8n6ORC6bpFh+
 U8UZP9wLlIG1BrUHG83pIndglIHotqPcjmtfl1WGrRr2hn7abzVSfV+g5Syo3Vg=
 =Ep+s
 -----END PGP SIGNATURE-----

drm: backmerge tag 'v3.17-rc5' into drm-next

This is requested to get the fixes for intel and radeon into the
same tree for future development work.

i915_display.c: fix missing dev_priv conflict.
2014-09-16 11:38:04 +10:00
Greg Kroah-Hartman 882ebfc28c Merge 3.17-rc5 into tty-next
We want those fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-14 22:17:40 -07:00
Greg Kroah-Hartman caf382fe31 Merge 3.17-rc5 into staging-next.
This fixes a merge conflict in lustre, and we want the other fixes that
went into 3.17-rc5 as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-14 19:33:47 -07:00
Linus Torvalds 83373f7028 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro:
 "double iput() on failure exit in lustre, racy removal of spliced
  dentries from ->s_anon in __d_materialise_dentry() plus a bunch of
  assorted RCU pathwalk fixes"

The RCU pathwalk fixes end up fixing a couple of cases where we
incorrectly dropped out of RCU walking, due to incorrect initialization
and testing of the sequence locks in some corner cases.  Since dropping
out of RCU walk mode forces the slow locked accesses, those corner cases
slowed down quite dramatically.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  be careful with nd->inode in path_init() and follow_dotdot_rcu()
  don't bugger nd->seq on set_root_rcu() from follow_dotdot_rcu()
  fix bogus read_seqretry() checks introduced in b37199e
  move the call of __d_drop(anon) into __d_materialise_unique(dentry, anon)
  [fix] lustre: d_make_root() does iput() on dentry allocation failure
2014-09-14 17:37:36 -07:00
Rickard Strandqvist 3f2882d369 staging: lustre: Cleaning up unnecessary use of memset in conjunction with strncpy
Using memset before strncpy just to ensure a trailing null
character is an unnecessary double writing of a string

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-14 10:05:11 -07:00
Tina Johnson eb9671261d Staging: lustre: lustre: mdc: mdc_request: Removed useless variable
Variable rc is initialised and returned by the function without modifying.
Hence replaced rc with it's initial value in the return statement and
removed the variable.

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-14 10:02:19 -07:00
Spencer Baugh 727543d639 staging: lustre: fix pointer whitespace style
Fix errors reported by checkpatch of this kind:
ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Spencer Baugh <sbaugh@andrew.cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-14 10:00:24 -07:00
Spencer Baugh db7b4b391e staging: lustre: fix function definition style
Fix errors reported by checkpatch of this kind:
ERROR: open brace '{' following function declarations go on the next line

Signed-off-by: Spencer Baugh <sbaugh@andrew.cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-14 10:00:24 -07:00
Artemiy Volkov 2101f98caf staging: lustre: Fix address space mismatch in ksocknal_recv_iov()
This patch fixes the following sparse warnings:

drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:51: warning:
	cast removes address space of expression
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:39: warning:
	incorrect type in assignment (different address spaces)
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:39:    expected
	void [noderef] <asn:1>*iov_base
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:39:    got
	void *<noident>

by simplifying an expression containing non-__user-attributed type names.

Signed-off-by: Artemiy Volkov <artemiyv@acm.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-14 10:00:24 -07:00
Greg Donald 4127ef9b55 drivers: staging: lustre: Cleanup src/dst comparisons in obdo_cmp_md()
Cleanup obdo_cmp_md() src/dst comparisons using bitwise OR assignments

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-14 10:00:24 -07:00
Al Viro f77ced6637 [fix] lustre: d_make_root() does iput() on dentry allocation failure
double-free is a bad thing

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-09-13 22:13:39 -04:00
Laurentiu Palcu dc4ecaf21c staging: iio: light: isl29018: add ACPI support
Add support for enumerating the device through ACPI.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-13 17:55:54 +01:00
Tobias Klauser b4a814d4a9 staging: vt6655: Remove unnecessary condition around include
ethtool (and SIOCETHTOOL in particular) is part of Linux since the
pre-git era, it thus makes no sense no sense to make the include of
linux/ethtool.h conditional. Also remove the unused define
DEVICE_ETHTOOL_IOCTL_SUPPORT.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:59:18 -07:00
Tobias Klauser 22981e0e5a staging: vt6655: Use net_device_stats from struct net_device
Instead of using an own copy of struct net_device_stats in struct
vnt_private, use stats from struct net_device. Also remove the thus
unnecessary device_get_stats(), as it would now just return
netdev->stats, which is the default in dev_get_stats().

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:59:18 -07:00
Tobias Klauser 46ef6886ac staging: vt6655: Remove unused member from struct vnt_private
The pci_state member of struct vnt_private is used nowhere in the code,
so remove it. Supposedly it was used to save the PCI configuration space
which is now done using pci_save_state().

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:56:51 -07:00
Tobenna P. Igwe 1299b721d3 staging:rtl8188eu: Fix sparse warning cast to restricted __le16
This patch fixes the following sparse warnings:

  CHECK   drivers/staging/rtl8188eu/hal/fw.c
drivers/staging/rtl8188eu/hal/fw.c:219:13: warning: cast to restricted __le16
drivers/staging/rtl8188eu/hal/fw.c:219:13: warning: cast to restricted __le16
drivers/staging/rtl8188eu/hal/fw.c:219:13: warning: cast to restricted __le16
drivers/staging/rtl8188eu/hal/fw.c:219:13: warning: cast to restricted __le16

by changing the signature from 'u16' to '__le16'.

Signed-off-by: Tobenna P. Igwe <ptigwe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:56:51 -07:00
Vincenzo Scotti 1fe473b3a2 staging: emxx_udc: fix style warnings: const strings should be const char
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:55:55 -07:00
Vincenzo Scotti 9af928157c staging: emxx_udc: fix style warnings: return in void functions
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:55:55 -07:00
Vincenzo Scotti 7f39ae05ad staging: emxx_udc: fix style warnings: blank line after declarations
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:55:55 -07:00
Domagoj Trsan 8e69a81106 staging: speakup: fix missing blank lines after declarations
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:54:51 -07:00
Domagoj Trsan e48735236b staging: speakup: fix line indentations
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:54:51 -07:00
Domagoj Trsan 11a18fc3d1 staging: speakup: fix redundant return in void functions
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:54:50 -07:00
Domagoj Trsan e7027b9b25 staging: speakup: fix warnings: line over 80 characters
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:53:53 -07:00
Sudip Mukherjee 4f01952d23 staging: unisys: uislib: uislib.c: sparse warning of context imbalance
fixed sparse warning : context imbalance in 'resume_device'
                        unexpected unlock
this patch will generate warning from checkpatch for
lines over 80 character , but since those are user-visible strings
so it was not modified.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Acked-by: Benjamin Romer <benjamin.romer@unisys.com>
Tested-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:49:13 -07:00
Nitin Kuppelur 15ef0cc124 Staging: octeon-hcd: removed dummy label
This is a patch to the octeon-hcd.c file that fixes
removes dummy label i.e. label followed by return of
void function

Signed-off-by: Nitin Kuppelur <nitinkuppelur@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:49:13 -07:00
Sanjeev Sharma 93a9f05ac6 staging:r8190_rtl8256: coding style: Fixed commenting style
This is a patch to the r8190_rtl8256.c file that fixes
commenting style Error

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:47:59 -07:00
Greg Donald a82b4b018a drivers: staging: rtl8723au: Fix 'code indent should use tabs where possible' errors
Fix checkpatch.pl 'code indent should use tabs where possible' errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:47:59 -07:00
John L. Hammond 91b3aaf991 staging/lustre: remove lvfs.h
Move the definition of struct lvfs_run_ctxt to the one file that
needed it (lustre/include/obd.h). Remove the then unneeded headers
lustre/include/lvfs.h and lustre/include/linux/lvfs.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:45:01 -07:00
John L. Hammond 04b18c8d49 staging/lustre/libcfs: remove upcall cache
The upcall cache is unused so remove include/linux/libcfs/lucache.h
and lustre/libcfs/upcall_cache.c.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:45:01 -07:00
John L. Hammond d5d2337c56 staging/lustre: remove unused lvfs code
Remove the unused "lvfs" functions obd_lvfs_fid2dentry(),
ll_lookup_one_len(), l_dput(), lustre_rename(), push_ctxt(), and
pop_ctxt(). Remove the unused members of struct lvfs_run_ctxt.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:45:01 -07:00
John L. Hammond 6272d77805 staging/lustre: remove lvfs_linux.h
The definitions in lustre/include/linux/lvfs_linux.h are not used so
remove that header.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:45:01 -07:00
James Simmons 46ffc93438 staging/lustre: remove portals_compat25.h
Remove include/linux/libcfs/linux/portals_compat25.h.

. remove some unused/unnecessary macros such as smp_num_cpus /
  SIGNAL_MASK_ASSERT etc.

. replace some macros with direct kernel API calls such as
  RECALC_SIGPENDING/CLEAR_SIGPENDING/CURRENT_SECONDS,
  cfs_wait_event_interruptible/_exclusive etc.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/4778
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:45:01 -07:00
John L. Hammond 16e0631db7 staging/lustre: remove linux/lustre_common.h
Expand the two uses of ll_inode_blksize() and remove the then
unnecessary header lustre/include/linux/lustre_common.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/11495
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:45:01 -07:00
James Simmons fdedd94509 staging/lustre/lvfs: remove the lvfs layer
The lvfs layer is obsolete and unused by Lustre clients. So remove it
and integrate the last of the procfs code into the obdclass layer.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/5512
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:45:01 -07:00
Hugues Morisset b037976f7a staging: lustre: fix coding style of function's pointer
Signed-off-by: Hugues Morisset <morisset.hugues@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:43:46 -07:00
Hugues Morisset fe67299757 staging: lustre: fix inappropriate enums declarations.
Signed-off-by: Hugues Morisset <morisset.hugues@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:43:46 -07:00
Hugues Morisset 498374f7b6 staging: lustre: fix coding style on long lines
Signed-off-by: Hugues Morisset <morisset.hugues@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:43:46 -07:00
Julia Lawall 187516688d staging: lustre: lov: expand the GOTO macro
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier lbl;
identifier rc;
constant c;
@@

- GOTO(lbl,\(rc\|c\));
+ goto lbl;

@@
identifier lbl;
expression rc;
@@

- GOTO(lbl,rc);
+ rc;
+ goto lbl;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:42:37 -07:00
Oleg Drokin f5b3f330f7 staging/lustre: remove unused function is_osp_on_mdt
This function is no longer used anywhere.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:41:42 -07:00
Mikhail Pershin a33105259f staging/lustre: use osc_reply_portal for OUT services
OUT service is used to server both MDS-MDS updates and MDS-OST
therefore services on MDT and OST are set to use the same request
and reply portals to be fully unified and able to serve any type
of requests.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Reviewed-on: http://review.whamcloud.com/8390
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3467
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:41:42 -07:00
Greg Donald 1cc30ab907 drivers: staging: lustre: Fix 'code indent should use tabs where possible' errors
Fix checkpatch.pl 'code indent should use tabs where possible' errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:40:56 -07:00
Greg Donald 650ea11ffa drivers: staging: lustre: Fix "space prohibited after that open parenthesis '('" errors
Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:40:56 -07:00
Ian Abbott 0220d472df staging: comedi: adl_pci9118: replace comedi_board() calls
The `comedi_board(dev)` inline function calls just return
`dev->board_ptr`.  Expand the inline function calls.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:36:45 -07:00
Ian Abbott 058543b77f staging: comedi: amplc_dio200_common: replace comedi_board() calls
The `comedi_board(dev)` inline function calls just return
`dev->board_ptr`.  Expand the inline function calls.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:36:45 -07:00
Chase Southwood d699f10766 staging: comedi: hwdrv_apci3120: remove void function return statement
Returns at the end of void functions are useless.  Remove this one.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:36:06 -07:00
Chase Southwood bfc81c4a22 staging: comedi: hwdrv_apci3120: else is not useful after return
The statement nested in an else after a return may be brought out one
indent level, the else is useless.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:36:06 -07:00
Chase Southwood 8aeec82ffd staging: comedi: hwdrv_apci3120: add a blank line after declarations
Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:36:06 -07:00
Chase Southwood 93093cad2a staging: comedi: hwdrv_apci3120: clean up comments
This patch fixes improper comment indentation, removes dead code and
obsolete comments, and conforms remaining comments to a consistent kernel
commenting style.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:36:06 -07:00
H Hartley Sweeten aaa0c2f77b staging: comedi: usbduxsigma: prevent "empty acquisition" async commands
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0 for both the analog input and output async commands. The (*do_cmd) for
both subdevices sets up and starts the command without handling the "empty
acquisition". This results in the interrupt functions trying to transfer 0 data
samples.

Validate that the cmd->stop_arg is >= 1 in the (*do_cmdtest) to prevent the
"empty acquisition".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:22 -07:00
H Hartley Sweeten e98348e0cb staging: comedi: usbdux: prevent "empty acquisition" async commands
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0 for both the analog input and output async commands. The (*do_cmd) for
both subdevices sets up and starts the command without handling the "empty
acquisition". This results in the interrupt functions trying to transfer 0 data
samples.

Validate that the cmd->stop_arg is >= 1 in the (*do_cmdtest) to prevent the
"empty acquisition".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:22 -07:00
H Hartley Sweeten 32f9ff7039 staging: comedi: s626: fix cmd->stop_arg validation for stop_src == TRIG_COUNT
The only limit for the stop_arg with a stop_src == TRIG_COUNT is that there is at
least 1 scan in order to prevent an empty acquisition. The max test is bogus.

Fix the validation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:22 -07:00
H Hartley Sweeten 8b9505527e staging: comedi: s626: 'ai_sample_count' is always 'stop_arg'
When the cmd->stop_src == TRIG_COUNT, the 'ai_sample_count' is the cmd->stop_arg.
For a stop_src == TRIG_NONE the 'ai_sample_count' is currently set to 1 but the
driver never actually uses the value.

Simplify the 'stop_count' initialization by just setting it to the cmd->stop_arg.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:22 -07:00
H Hartley Sweeten 27cb98142f staging: comedi: s626: clarify COMEDI_CB_EOA code
The end-of-acquisition only applies when the cmd->stop_src == TRIG_COUNT.

Refactor the code in s626_handle_eos_interrupt() that detects the end-of-
acquisition to clarify this.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:22 -07:00
H Hartley Sweeten e37b20aa58 staging: comedi: s626: remove 'ai_continuous' from private data
This member of the private data is set based on the cmd->stop_src. Just use the
cmd->stop_src directly and remove the member.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 8c602c498c staging: comedi: rtd520: prevent "empty acquisition" async command
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0. The (*do_cmd) then sets up and starts the command without handling the "empty
acquisition". This results in the interrupt function trying to transfer 0 data
samples.

Validate that the cmd->stop_arg is >= 1 in the (*do_cmdtest) to prevent the
"empty acquisition".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 1e2e39effd staging: comedi: pcmuio: return void from pcmuio_start_intr()
This function always returns '0' so the comedi_event() is never done by the
callers.

Change the return type to void and remove the comedi_event() dead code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 8e7fed7ed7 staging: comedi: pcmuio: 'stop_count' is always 'stop_arg'
When the cmd->stop_src == TRIG_COUNT, the 'stop_count' is the cmd->stop_arg.
For any other stop_src the 'stop_count' is 0, which is also the cmd->stop_arg.

Simplify the 'stop_count' initialization.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 75d46fd781 staging: comedi: pcmuio: remove 'continuous' from private data
This member of the private data is set based on the cmd->stop_src. Just use the
cmd->stop_src directly and remove the member.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 7173126484 staging: comedi: pcmuio: remove "empty acquisition" async command
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0. This causes the (*do_cmd) to immediately generate a COMEDI_CB_EOA event
without acquiring any data.

This "empty acquisition" async command is not really useful. Validate that the
cmd->stop_arg is >= 1 in the (*do_cmdtest) and remove the "empty acquisition"
code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 22499048e3 staging: comedi: pcmmio: return void from pcmmio_start_intr()
This function always returns '0' so the comedi_event() is never done by the
callers.

Change the return type to void and remove the comedi_event() dead code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 811ba919e4 staging: comedi: pcmmio: 'stop_count' is always 'stop_arg'
When the cmd->stop_src == TRIG_COUNT, the 'stop_count' is the cmd->stop_arg.
For any other stop_src the 'stop_count' is 0, which is also the cmd->stop_arg.

Simplify the 'stop_count' initialization.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 1ea37fd27a staging: comedi: pcmmio: remove "empty acquisition" async command
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0. This causes the (*do_cmd) to immediately generate a COMEDI_CB_EOA event
without acquiring any data.

This "empty acquisition" async command is not really useful. Validate that the
cmd->stop_arg is >= 1 in the (*do_cmdtest) and remove the "empty acquisition"
code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten fe094b7e00 staging: comedi: pcl711: remove "empty acquisition" async command
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0. This causes the (*do_cmd) to immediately generate a COMEDI_CB_EOA event
without acquiring any data.

This "empty acquisition" async command is not really useful. Validate that the
cmd->stop_arg is >= 1 in the (*do_cmdtest) and remove the "empty acquisition"
code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 7be7f9c3e3 staging: comedi: ni_pcidio: prevent "empty acquisition" async command
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0. The (*do_cmd) then sets up and starts the command without handling the "empty
acquisition". This results in the interrupt function trying to transfer 0 data
samples.

Validate that the cmd->stop_arg is >= 1 in the (*do_cmdtest) to prevent the
"empty acquisition".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten fd6887b2ec staging: comedi: ni_atmio16d: prevent "empty acquisition" async command
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0. The (*do_cmd) then sets up and starts the command without handling the "empty
acquisition". This results in the interrupt function trying to transfer 0 data
samples.

Validate that the cmd->stop_arg is >= 1 in the (*do_cmdtest) to prevent the
"empty acquisition".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 76af50ddee staging: comedi: me4000: validate cmd->stop_arg in step 3 of (*do_cmdtest)
The async command arguments are supposed to be trivially validated in step 3
of the (*do_cmdtest). Fix the validation of the stop_arg.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:21 -07:00
H Hartley Sweeten 759658ddff staging: comedi: dt282x: prevent "empty acquisition" async commands
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0 for both the analog input and output async commands. The (*do_cmd) for
both subdevices sets up and starts the command without handling the "empty
acquisition". This results in the interrupt functions trying to transfer 0 data
samples.

Validate that the cmd->stop_arg is >= 1 in the (*do_cmdtest) to prevent the
"empty acquisition".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:20 -07:00
H Hartley Sweeten 1a021d6387 staging: comedi: das16m1: prevent "empty acquisition" async command
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0. The (*do_cmd) then sets up and starts the command without handling the "empty
acquisition". This results in the interrupt function trying to transfer 0 data
samples.

Validate that the cmd->stop_arg is >= 1 in the (*do_cmdtest) to prevent the
"empty acquisition".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:20 -07:00
H Hartley Sweeten 2c8af779c4 staging: comedi: das16: prevent "empty acquisition" async command
This driver currently allows a cmd->stop_src == TRIG_COUNT with a cmd->stop_arg
of 0. The (*do_cmd) then sets up and starts the command without handling the "empty
acquisition". This results in the interrupt function trying to transfer 0 data
samples.

Validate that the cmd->stop_arg is >= 1 in the (*do_cmdtest) to prevent the
"empty acquisition".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:35:20 -07:00