Commit graph

506962 commits

Author SHA1 Message Date
Peter Poklop f3e5df4348 Staging: fbtft: add declaration of non-static functions
This patch fixes these sparse warnings:
drivers/staging/fbtft/fbtft-sysfs.c:23:5: warning: symbol 'fbtft_gamma_parse_str' was not declared. Should it be static?
drivers/staging/fbtft/fbtft-sysfs.c:153:6: warning: symbol 'fbtft_expand_debug_value' was not declared. Should it be static?
drivers/staging/fbtft/fbtft-sysfs.c:209:6: warning: symbol 'fbtft_sysfs_init' was not declared. Should it be static?
drivers/staging/fbtft/fbtft-sysfs.c:216:6: warning: symbol 'fbtft_sysfs_exit' was not declared. Should it be static?

Signed-off-by: Peter Poklop <peter.poklop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:54:50 +01:00
Ravindran, Madhusudhanan (M.) 6a938a8cef staging: fbtft: Fix potential null dereference
This error is found by smatch tool.

Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:54:50 +01:00
Madhusudhanan Ravindran aa5735f139 staging: fbtft: Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scriptcoccinelle/api/memdup.cocci.

Signed-off-by: Madhusudhanan Ravindran <mravindran04@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:54:45 +01:00
Mitchel Humpherys d9954896a2 ion: improve ion_phys error message
Clients often get confused when ion_phys errors out due to some heap
being used that they didn't expect.  Add the heap name and heap type to
the error message to make it more obvious.

Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:44:39 +01:00
Abdul Hussain S d38f486142 staging: i2o: Use kstrdup rather than duplicating its implementation
The semantic patch that makes this change is available
in scripts/coccinelle/api/kstrdup.cocci

Signed-off-by: Abdul Hussain S <hussain.abdul@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:44:39 +01:00
Hatice ERTÜRK 7a48a09196 Staging: vt6655: changed C99 // comments
// erased and replace it with /**/ used.
Error found with checkpatch.pl

Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:42:22 +01:00
Alexey Khoroshilov 20ff1418d3 staging: vt6656: don't return zero on failure path in vt6656_probe()
If ieee80211_alloc_hw() fails in vt6656_probe(), it breaks off
initialization, but returns zero.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:41:38 +01:00
Quentin Lambert a1c6dcda80 staging: vt6655: remove deprecated use of pci api
Replace occurences of the pci api by appropriate call to the dma api.

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

@deprecated@
idexpression id;
position p;
@@

(
  pci_dma_supported@p ( id, ...)
|
  pci_alloc_consistent@p ( id, ...)
)

@bad1@
idexpression id;
position deprecated.p;
@@
...when != &id->dev
   when != pci_get_drvdata ( id )
   when != pci_enable_device ( id )
(
  pci_dma_supported@p ( id, ...)
|
  pci_alloc_consistent@p ( id, ...)
)

@depends on !bad1@
idexpression id;
expression direction;
position deprecated.p;
@@

(
- pci_dma_supported@p ( id,
+ dma_supported ( &id->dev,
...
+ , GFP_ATOMIC
  )
|
- pci_alloc_consistent@p ( id,
+ dma_alloc_coherent ( &id->dev,
...
+ , GFP_ATOMIC
  )
)

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:41:38 +01:00
Vaishali Thakkar 875887c308 Staging: ste_rmi4: Use SIMPLE_DEV_PM_OPS() macro
Macro SIMPLE_DEV_PM_OPS() can be used when same suspend
and resume callbacks are used for suspend to RAM and
hibernation. So, here use SIMPLE_DEV_PM_OPS to make code
shorter and cleaner.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:37:31 +01:00
Cristina Opriceana aa6432f122 Staging: iio: Remove line over 80 characters
Rename variable in order to fix the 80 characters per line warning.
Found by checkpatch.pl

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:35:52 +01:00
Cristina Opriceana ccc5fbe090 Staging: iio: Remove multiple blank lines
This patch removes blank uneeded lines in order to remove the folowing
checkpatch.pl warning:
"Please don't use multiple blank lines".

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:35:52 +01:00
Cristina Opriceana 7079f21b66 Staging: iio: Align function parameters to match first row
This patch improves coding style by aligning parameters in
iio/magnetometer function calls, to remove the following warning:
"CHECK: Alignment should match open parenthesis".

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:35:09 +01:00
Cristina Opriceana 9fb163f49e Staging: iio: Simplify NULL pointer condition
Replace NULL comparrison with its shorter form.
Done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:33:50 +01:00
Vatika Harlalka 2c4b2980ae Staging: rtl8188eu: Remove extern as it is defined but never used
RTW_WPA_VERSION is removed as is declared and defined but
never used in the code.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:29:27 +01:00
Vatika Harlalka 680355f3d4 Staging: rtl8188eu: Remove unused macros
These macros are defined but never used in the code.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:29:27 +01:00
Vatika Harlalka 5ce019df9b Staging: rtl8188eu: Remove unused extern declarations.
These externs are defined but not used anywhere in the code.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:29:27 +01:00
Vatika Harlalka 127883b803 Staging: rts5208: Add new variable idx to shorten line length and increase readability
Add new variable idx to shorten line length of other statements
and increase readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:28:22 +01:00
Vatika Harlalka 7ef4ec4a65 Staging: rts5208: Introduce a new variable to shorten line length and increase readability
The variable block_no is introduced so as to shorten line length
in the long assignment statement and increase readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:28:22 +01:00
Vaishali Thakkar ae89faccc6 Staging: speakup: Use module_spk_synth
Macro module_spk_synth can be used for speakup drivers
whose init and exit paths does only module registrations.
So, here remove some boilerplate code by using
module_spk_synth.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:27:34 +01:00
Vaishali Thakkar c950a892cc Staging: speakup: Add helper macro for spk_synth boilerplate
For simple modules that contain a single spk_synth without
any additional setup code then ends up being a block of
duplicated boilerplate. This patch adds a new macro,
module_spk_synth(), which replaces the
module_init()/module_exit() registrations with template
functions.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:27:13 +01:00
Sven Dziadek f6b43c2e85 Staging: wlan-ng: hfa384x: wrap long line
This fixes the coding style issue "line over 80 characters"
found by checkpatch.pl

Signed-off-by: Sven Dziadek <sven.dziadek@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:25:15 +01:00
Mateusz Kulikowski a8f4f33a4f staging: rtl8192e: remove CURRENT_RATE macro
CURRENT_RATE macro is used only once in driver. This patch removes it
and adds rtllib_current_rate() static function in file using that macro

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:14:00 +01:00
Mateusz Kulikowski e48617a48c staging: rtl8192e: remove eqMacAddr macro
Remove eqMacAddr macro and replace it with ether_addr_equal_unaligned()

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:14:00 +01:00
Mateusz Kulikowski 34fff6db29 staging: rtl8192e: rtllib.h: remove duplicated container_of
This macro is already defined in kernel.h - there is no need to redefine it.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:59 +01:00
Mateusz Kulikowski 7e4eb9fdf2 staging: rtl8192e: remove unused macros
Several (unused) macros were removed from driver.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:59 +01:00
Mateusz Kulikowski 7527cf3710 staging: rtl8192e: remove dead code
Remove commented-out unions and enum.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:59 +01:00
Mateusz Kulikowski 7b979cda81 staging: rtl8192e: remove rtllib_endianfree.h
rtllib_endianfree.h was not used (only included)

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:59 +01:00
Mateusz Kulikowski d69d20549b staging: rtl8192e: fix coding style warnings (printk -> netdev_*)
Use netdev_*, dev_* or pr_* instead of printk where possible.
KERN_DEBUG messages are left intact as pr_dbg has different behaviour.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:59 +01:00
Mateusz Kulikowski 2729011c40 staging: rtl8192e: rtllib_wx: remove duplicate messages
Some messages were reported with netdev_* macros and internal
driver-specific macro.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:58 +01:00
Mateusz Kulikowski 3325721d36 staging: rtl8192e: fix coding style errors (macros in parentheses)
Fix checkpatch.pl errors 'Macros with complex values should be enclosed in parentheses'.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:58 +01:00
Mateusz Kulikowski dc986e3ed3 staging: rtl8192e: fix coding style issues (spaces before semicolon)
Fix checkpatch.pl warning 'space prohibited before semicolon'.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:58 +01:00
Mateusz Kulikowski 0822339b52 staging: rtl8192e: fix coding style issues (merge broken strings)
Fix checkpatch.pl warnings:
- 'WARNING: quoted string split across lines'
- 'WARNING: break quoted strings at a space character'

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:58 +01:00
Hatice ERTÜRK d5133e7517 Staging: rtl8192u: Remove unnecessary spaces
Fix checkpatch.pl issues with "unnecessary whitespace before a quoted
newline" in r819xU_phy.c

Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:11:45 +01:00
Ioana Ciornei 7078db9dff staging: prism2sta: Replace memcpy with ether_add_copy
Replace memcpy() with ether_addr_copy() since addresses are __aligned(2).
The 2 structures are aligned to u16 as showed below:

typedef struct hfa384x_authenticateStation_data {
u8 address[ETH_ALEN];                           /* 0    6 */
u16 status;                                     /* 6    2 */
u16 algorithm;                                  /* 8    2 */
} __packed hfa384x_authenticateStation_data_t;

Total size: 10

typedef struct hfa384x_AuthRequest {
u8 sta_addr[ETH_ALEN];                          /* 0    6 */
u16 algorithm;                                  /* 6    2 */
} __packed hfa384x_AuthReq_t;
Total size: 8

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:11:45 +01:00
Redha Gouicem ec523735e4 Staging: lustre: lnet: lnet: router.c: fix useless returns and elses
This patch removes useless returns and elses.

Signed-off-by: Redha Gouicem <redha.gouicem@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-19 13:25:32 +01:00
Redha Gouicem e6157b1b19 Staging: lustre: lnet: lnet: router.c: fix 80 char line limit
This patch fixes lines longer than the 80 char limit.

Signed-off-by: Redha Gouicem <redha.gouicem@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-19 13:25:32 +01:00
Gauthier Voron acf60c3d3d Staging: lustre: fix some coding style
This patch remove unnecessary bracket.

Signed-off-by: Gauthier Voron <gauthier.voron@lip6.fr>
Signed-off-by: Hakan Metin <hakan.metin@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 23:59:18 +01:00
Gauthier Voron 9f0d9bfabf Staging: lustre: fix coding style
This patch fix too large line.

Signed-off-by: Gauthier Voron <gauthier.voron@lip6.fr>
Signed-off-by: Hakan Metin <hakan.metin@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 23:59:18 +01:00
Jonathan Sid-Otmane 71474ccba1 Staging: lustre: niobuf.c fic 80 char limit
This fixes the charatcer limit in niobuf.c

Signed-off-by: Jonathan Sid-Otmane <Jonathan.SidOtmane@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 22:17:08 +01:00
Jonathan Sid-Otmane 245cbcff17 Staging: lustre: vvp_dev.c: fix spaces issues
This fixes the space issues in the file vvp_dev.c

Signed-off-by: Jonathan Sid-Otmane <Jonathan.SidOtmane@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 22:12:51 +01:00
Roberto Medina 0b5cf51500 staging: lustre: linux: linux-prim: fixed coding style warnings and errors
Coding style fixes due to exported symbols and comment style.

Signed-off-by: Roberto Medina <robertoxmed@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 21:59:23 +01:00
Laure Millet 267d9c8a65 staging: lustre: namei.c: coding style: fix 80 characters limit
This patch fixes lines over 80 characters

Signed-off-by: Laure Millet <laure.millet@lip6.fr>
Signed-off-by: Maxime Lorrillere <maxime.lorrillere@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 21:55:04 +01:00
Laure Millet e65dbbb800 staging: lustre: namei.c: coding style: fix quoted string split across lines
This patch fixes a quoted string split across lines.

Signed-off-by: Laure Millet <laure.millet@lip6.fr>
Signed-off-by: Maxime Lorrillere <maxime.lorrillere@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 21:46:56 +01:00
Laure Millet 07b249fa5b staging: lustre: namei.c: Fix trailing whitespace
This patch fixes a trailing whitespace in namei.c

Signed-off-by: Laure Millet <laure.millet@lip6.fr>
Signed-off-by: Maxime Lorrillere <maxime.lorrillere@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 21:46:56 +01:00
Laure Millet 7248859642 Staging: lustre: namei.c: fix "foo * bar" should be "foo *bar"
This patch fixes a coding style error in a pointer declaration.

Signed-off-by: Laure Millet <laure.millet@lip6.fr>
Signed-off-by: Maxime Lorrillere <maxime.lorrillere@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 21:46:56 +01:00
Laure Millet 43550121a7 Staging: lustre: namei.c: fix missing a blank line after declarations
This fixes a missing blank line after declarations.

Signed-off-by: Laure Millet <laure.millet@lip6.fr>
Signed-off-by: Maxime Lorrillere <maxime.lorrillere@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 21:46:56 +01:00
Quentin Lambert 5ec2936508 Staging: dgnc: release the lock before testing for nullity
The refactoring intrduced in
c84a083b99 ("Staging: dgnc: Use goto for spinlock release before return")
inverts the order in which the lock is released and ld is tested for nullity.

This patch restores the execution flow.

Fixes: c84a083b99 ("Staging: dgnc: Use goto for spinlock release before return")
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 17:34:11 +01:00
Haneen Mohammed 8ac7f9b37e Staging: iio: replace pr_* with dev_*
dev_* is prefered over pr_* when appropriate device stuct is present.
This patch replace pr_err and pr_warn with its dev_ counterpart.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 11:21:33 +01:00
Haneen Mohammed 2c9356d115 Staging: media: replace pr_* with dev_*
This patch replace pr_err/pr_info with dev_err/dev_infi, when
appropriate device structure is found.

Issues found using the following Coccinelle script. pr_err/dev_err was
substituted with pr_info/dev_info in the later case.

@r exists@
identifier f, s, i;
position p;
@@
f(...,struct s *i,...) {
<+...
when != i == NULL
pr_err@p(...);
...+>
}
@rr@
identifier r.s, s2, fld;
@@

struct s {
	...
	struct s2 *fld;
	...
};

@rrr@
identifier rr.s2, fld2;
@@

struct s2 {
	...
	struct device fld2;
	...
};
@@
identifier r.i, r.s, rr.fld, rrr.fld2;
position r.p;
@@

-pr_err@p
+dev_err
   (
+ &i->fld->fld2,
...)

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 11:21:33 +01:00
Haneen Mohammed 3d719423da Staging: gdm724x: replace pr_* with dev_*
This patch replace pr_err/pr_info with dev_err/dev_info, when
appropriate device structure is found.

Issue found  and resolved using the following Coccinelle script.
pr_err/dev_err was substituted with pr_info/dev_info in the later case.

@r exists@
identifier f, s, i;
position p;
@@
f(...,struct s *i,...) {
<+...
when != i == NULL
pr_err@p(...);
...+>
}
@rr@
identifier r.s, s2, fld;
@@

struct s {
	...
	struct s2 *fld;
	...
};

@rrr@
identifier rr.s2, fld2;
@@

struct s2 {
	...
	struct device fld2;
	...
};
@@
identifier r.i, r.s, rr.fld, rrr.fld2;
position r.p;
@@

-pr_err@p
+dev_err
   (
+ &i->fld->fld2,
...)

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 11:21:33 +01:00