1
0
Fork 0
Commit Graph

28727 Commits (a81349a7b27adc66cc318ac0bc0f657b0b73a5af)

Author SHA1 Message Date
Tapasweni Pathak 3c97fbbe55 staging: rts5208: Add new line after declaration
This patch fixes checkpatch.pl warning in file ms.c
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-28 22:47:54 -04:00
Mahati Chamarthy 0be0b27dac Staging: rts5208: 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-28 22:47:54 -04:00
Tapasweni Pathak 02a29d2d92 staging: rtl8712: add new line after declarations
This patch fixes checkpatch.pl warning in hal_init.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-28 22:41:23 -04:00
Catalina Mocanu be075eb6ff staging: rtl8192ee: clean up function header formatting
Reformatted function header to silence the following checkpatch.pl error:
ERROR: code indent should use tabs where possible

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:35:10 -04:00
Catalina Mocanu 1cc3cacf10 staging: rtl8192ee: 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-28 22:35:10 -04:00
Heena Sirwani 18eaddefd4 Staging: rtl8192ee: Removed unnecessary return statement.
The following patch removes the checkpatch.pl warning:
WARNING: void function return statements are generally not useful.

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:34:57 -04:00
Heena Sirwani 54ca67e085 Staging: rtl8192ee: 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>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:34:57 -04:00
Aybuke Ozdemir 03c6eaa37a staging: iio: accel: Use __be16 instead of u16
This patch fixes these warning messages found by sparse:
drivers/staging/iio/accel/sca3000_ring.c:120:61: warning: incorrect type in argument 1 (different base types)
drivers/staging/iio/accel/sca3000_ring.c:120:61:    expected restricted __be16 const [usertype] *p
drivers/staging/iio/accel/sca3000_ring.c:120:61:    got unsigned short [usertype] *

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:22:13 -04:00
Roberta Dobrescu 2bd7e245ea staging: iio: light: Add a blank line after declarations
This fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations

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-28 22:20:30 -04:00
Roberta Dobrescu 10b2e445aa staging: iio: light: Remove space before function pointer arguments
This fixes the following checkpatch.pl warning:
WARNING: Unnecessary space before function pointer arguments

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-28 22:20:30 -04:00
Roberta Dobrescu ad3e646c5b staging: iio: light: Fix quoted string split across lines
This fixes the following checkpatch.pl warning:
WARNING: quoted string split across lines

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-28 22:20:30 -04:00
Roberta Dobrescu f3f883b411 staging: iio: Add #include guards to header files
This patch adds #include guards in order to make the header files idempotent.

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-28 22:19:04 -04:00
Vaishali Thakkar da96aecdc5 Staging: iio: Remove unnecessory immediate else after return statement
This patch fixes following checkpatch.pl warning:

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

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-28 22:19:04 -04:00
Roxana Blaj 7bf6513eeb staging: iio: frequency: remove unnecessary semicolon
This fixes the checkpatch.pl warning:
WARNING: macros should not use a trailing semicolon

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-28 22:19:04 -04:00
Aybuke Ozdemir f6077f4397 Staging: iio: light: 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-28 22:17:23 -04:00
Roxana Blaj 580885415e staging: iio: frequency: add new line after declarations
This fixes the checkpatch.pl 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-28 22:17:23 -04:00
Vaishali Thakkar bb49a0f9b7 Staging: iio: adc: 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-28 22:17:22 -04:00
Esra Altintas 6b4f375243 staging: bcm: Fix line 80 characters in Adapter.h
The following patch fixes the checkpatch.pl warning:
WARNING: line over 80 characters

Signed-off-by: Esra Altintas <es.altintas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:12:28 -04:00
Yeliz Taneroglu 0fb591632c staging: bcm: Fix quoted string split across lines warning
The following patch the checkpatch.pl warning:

drivers/staging/bcm/InterfaceIdleMode.c:215: warning:quoted string split across lines

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:12:28 -04:00
Catalina Mocanu 7557b6e172 staging: imx-drm: 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.

Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:08:13 -04:00
Aybuke Ozdemir 8684ba72fa staging: imx-drm: Array was made static const char * const
This patch fixes checkpatch.pl error in file imx-tve.c
WARNING: static const char * array should probably be static
const char * const

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:08:13 -04:00
Rahul Garg 1da2a44bf8 patch "staging: rtl8723au: os_dep: declared cfg80211_infrastructure_mode static
Declared cfg80211_infrastructure_mode method static to remove sparse warning

Signed-off-by: Rahul Garg <rahul.lnmiit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:06:13 -04:00
Omar Sandoval f1c571dcf0 staging: lustre: fix gfp_t/int coercion
Fix a few implicit casts between int and gfp_t which were caught by sparse.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:04:58 -04:00
Ramon Fried 3d3ab8cc68 staging: lustre: llite_lib.c Set ll_md_setattr function to be static
This fixes the following sparse warning:
llite_lib.c:1240:5: warning: symbol 'll_md_setattr' was not declared. Should it be static?

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:04:58 -04:00
Mathieu OTHACEHE 80190ca3e1 staging: rtl8821ae: fix sparse warning for static declarations
This patch fixes the following sparse warnings:

drivers/staging/rtl8821ae/pci.c:52:4: warning: symbol '_rtl_mac_to_hwqueue' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:365:6: warning: symbol 'rtl_pci_check_buddy_priv' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:409:6: warning: symbol 'rtl_pci_get_linkcontrol_field' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:1748:6: warning: symbol 'rtl_pci_deinit' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:1763:5: warning: symbol 'rtl_pci_init' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:1780:5: warning: symbol 'rtl_pci_start' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:1814:6: warning: symbol 'rtl_pci_stop' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:2105:21: warning: symbol 'hw_export' was not declared. Should it be static?

Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:03:58 -04:00
Christoph Jaeger 348fecd2a2 staging: ozwpan: Remove typedefs
As these typedefs are only used once, there is no real need for them.

Signed-off-by: Christoph Jaeger <email@christophjaeger.info>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:03:58 -04:00
Heinrich Schuchardt ae66475289 staging : android : sync : get_unused_fd
sync.h recommends to use get_unused_fd which does not set
O_CLOEXEC while the rest of the android tree uses
get_unused_fd_flags and sets O_CLOEXEC.

The patch adjust the comment.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:03:57 -04:00
Mark Einon 20187a7b69 staging: et131x: Remove unnecessary parentheses
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 21:58:12 -04:00
Mark Einon 177e882ee8 staging: et131x: Remove unnecessary OOM message
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 21:58:12 -04:00
Mark Einon f4aae620e3 staging: et131x: Cat some lines less than 80 columns
Some split lines are less than 80 chars if rejoined, so rejoin them.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 21:58:12 -04:00
Mark Einon 37dcca4364 staging: et131x: Use ether_addr_copy when copying ethernet addresses
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 21:58:12 -04:00
Lars-Peter Clausen 6822ee34ad staging:iio:ad5933: Drop "raw" from channel names
"raw" is the name of a channel property, but should not be part of the
channel name itself.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-27 10:36:35 +01:00
Lars-Peter Clausen 824269c586 staging:iio:ad5933: Fix NULL pointer deref when enabling buffer
In older versions of the IIO framework it was possible to pass a
completely different set of channels to iio_buffer_register() as the one
that is assigned to the IIO device. Commit 959d2952d1 ("staging:iio: make
iio_sw_buffer_preenable much more general.") introduced a restriction that
requires that the set of channels that is passed to iio_buffer_register() is
a subset of the channels assigned to the IIO device as the IIO core will use
the list of channels that is assigned to the device to lookup a channel by
scan index in iio_compute_scan_bytes(). If it can not find the channel the
function will crash. This patch fixes the issue by making sure that the same
set of channels is assigned to the IIO device and passed to
iio_buffer_register().

Fixes the follow NULL pointer derefernce kernel crash:
	Unable to handle kernel NULL pointer dereference at virtual address 00000016
	pgd = d53d0000
	[00000016] *pgd=1534e831, *pte=00000000, *ppte=00000000
	Internal error: Oops: 17 [#1] PREEMPT SMP ARM
	Modules linked in:
	CPU: 1 PID: 1626 Comm: bash Not tainted 3.15.0-19969-g2a180eb-dirty #9545
	task: d6c124c0 ti: d539a000 task.ti: d539a000
	PC is at iio_compute_scan_bytes+0x34/0xa8
	LR is at iio_compute_scan_bytes+0x34/0xa8
	pc : [<c03052e4>]    lr : [<c03052e4>]    psr: 60070013
	sp : d539beb8  ip : 00000001  fp : 00000000
	r10: 00000002  r9 : 00000000  r8 : 00000001
	r7 : 00000000  r6 : d6dc8800  r5 : d7571000  r4 : 00000002
	r3 : d7571000  r2 : 00000044  r1 : 00000001  r0 : 00000000
	Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
	Control: 18c5387d  Table: 153d004a  DAC: 00000015
	Process bash (pid: 1626, stack limit = 0xd539a240)
	Stack: (0xd539beb8 to 0xd539c000)
	bea0:                                                       c02fc0e4 d7571000
	bec0: d76c1640 d6dc8800 d757117c 00000000 d757112c c0305b04 d76c1690 d76c1640
	bee0: d7571188 00000002 00000000 d7571000 d539a000 00000000 000dd1c8 c0305d54
	bf00: d7571010 0160b868 00000002 c69d3900 d7573278 d7573308 c69d3900 c01ece90
	bf20: 00000002 c0103fac c0103f6c d539bf88 00000002 c69d3b00 c69d3b0c c0103468
	bf40: 00000000 00000000 d7694a00 00000002 000af408 d539bf88 c000dd84 c00b2f94
	bf60: d7694a00 000af408 00000002 d7694a00 d7694a00 00000002 000af408 c000dd84
	bf80: 00000000 c00b32d0 00000000 00000000 00000002 b6f1aa78 00000002 000af408
	bfa0: 00000004 c000dc00 b6f1aa78 00000002 00000001 000af408 00000002 00000000
	bfc0: b6f1aa78 00000002 000af408 00000004 be806a4c 000a6094 00000000 000dd1c8
	bfe0: 00000000 be8069cc b6e8ab77 b6ec125c 40070010 00000001 22940489 154a5007
	[<c03052e4>] (iio_compute_scan_bytes) from [<c0305b04>] (__iio_update_buffers+0x248/0x438)
	[<c0305b04>] (__iio_update_buffers) from [<c0305d54>] (iio_buffer_store_enable+0x60/0x7c)
	[<c0305d54>] (iio_buffer_store_enable) from [<c01ece90>] (dev_attr_store+0x18/0x24)
	[<c01ece90>] (dev_attr_store) from [<c0103fac>] (sysfs_kf_write+0x40/0x4c)
	[<c0103fac>] (sysfs_kf_write) from [<c0103468>] (kernfs_fop_write+0x110/0x154)
	[<c0103468>] (kernfs_fop_write) from [<c00b2f94>] (vfs_write+0xd0/0x160)
	[<c00b2f94>] (vfs_write) from [<c00b32d0>] (SyS_write+0x40/0x78)
	[<c00b32d0>] (SyS_write) from [<c000dc00>] (ret_fast_syscall+0x0/0x30)
	Code: ea00000e e1a01008 e1a00005 ebfff6fc (e5d0a016)

Fixes: 959d2952d1 ("staging:iio: make iio_sw_buffer_preenable much more general.")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-27 10:30:58 +01:00
navin patidar 368c75b98b staging: rtl8188eu: odm.h: Remove unused struct dyn_primary_cca
struct odm_dm_struct has a member of struct dyn_primary_cca,
which is initialized once and then never used by driver, so
we can remove struct dyn_promary_cca and code which initialize
it.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:13 -07:00
navin patidar 8f4ece938a staging: rtl8188eu: Rework function ODM_AntennaDiversity_88E()
Rename CamelCase function name.
Remove unnecessary comments.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:13 -07:00
navin patidar d2f44b7cf6 staging: rtl8188eu: Rework function odm_HWAntDiv()
Rename CamelCase function name and local variables.
 Remove unnecessary debugging messages.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:13 -07:00
navin patidar 5c45dde4ab staging: rtl8188eu: Rework function ODM_AntselStatistics_88E()
Rename CamelCase function name and local variables.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:13 -07:00
navin patidar 6b26b75daf staging: rtl8188eu: Rework function ODM_SetTxAntByTxInfo_88E()
Rename CamelCase function name and local variables.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:13 -07:00
navin patidar 7614f02350 staging: rtl8188eu: Rework function odm_UpdateTxAnt_88E()
Rename CamelCase function name and local variables.
Remove unnecessary debugging messages.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:13 -07:00
navin patidar 052a806d6b staging: rtl8188eu: Rework function ODM_UpdateRxIdleAnt_88E()
Rename CamelCase function name and local variables.
Remove unnecessary debugging messages and comments.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:12 -07:00
navin patidar db0ccdacd0 staging: rtl8188eu: Rework function ODM_AntennaDiversityInit_88E()
Rename CamelCase function name.
Remove unnecessary debugging messages.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:12 -07:00
navin patidar c4d7ea0991 staging: rtl8188eu: Rework function odm_FastAntTrainingInit()
Rename CamelCase function name.
Remove unnecessary comments and debugging messages.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:12 -07:00
navin patidar 09002c76b5 staging: rtl8188eu: Rework function odm_TRX_HWAntDivInit()
Rename CamelCase function name.
Remove unnecessary comments.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:12 -07:00
navin patidar 87b89e850f staging: rtl8188eu: Rework function odm_RX_HWAntDivInit()
Rename CamelCase function name.
Remove unnecessary comments.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:12 -07:00
navin patidar 146b901038 staging: rtl8188eu: Remove unused header file odm_RegDefine11AC.h
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:12 -07:00
navin patidar 6f1b7df415 staging: rtl8188eu: Remove odm_debug.c
Move a function and global variable from odm_debug.c to odm.c

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:12 -07:00
Malcolm Priestley 46fa0ec0fa staging: vt6655: device_get_options remove unused variable devname
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:45:41 -07:00
Malcolm Priestley 42f709eff1 staging: vt6655: pr_err remove string to net device name
Just print driver name with dev_err removing the string formatting.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:45:41 -07:00
Eli Billauer 7051924f77 xillybus: Move out of staging
This driver has been functional and stable throughout the year it has spent
in the staging area. It has been patched for minor bugs, coding style issues
and improvements during this period.

This is the second submission of this move-out, after making several style
improvements, as suggested by Dan Carpenter.

Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:44:16 -07:00
Grzegorz Swirski 9b4c8cfaff staging: wlan-ng: remove unused 'result' var
Signed-off-by: Grzegorz Swirski <grzegorz@swirski.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:42:39 -07:00
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