aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/android (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2017-03-23staging: ks7010: fixed a coding style issueXiangyang Zhang1-4/+4
Fixed checkpatch.pl CHECK: Logical continuations should be on the previous line Signed-off-by: Xiangyang Zhang <xyz.sun.ok@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: ks7010: invert if statement conditionalsTobin C. Harding1-10/+10
Checkpatch emits WARNING: Avoid multiple line dereference. Function uses if statement blocks to guard the body of the function. If we invert these conditionals and return, then the code becomes more readable and subsequent code is indented less. The checkpatch fix then follows trivially. Invert conditionals, return from function if new conditional evaluates to true. Reduce the level of indentation in subsequent code. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: ks7010: remove redundant checkTobin C. Harding1-2/+1
Function checks for condition inside a loop that checks the same condition, this is redundant. Fix also removes checkpatch CHECK. Remove redundant check. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: ks7010: add braces to multi-line indentTobin C. Harding1-8/+10
The addition of curly braces around single statements that span multiple lines makes the code more readable in general. Add curly braces to multi-line indented statement. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: ks7010: add explicit check to 'size' variablesTobin C. Harding3-6/+6
When checking the value of a variable that holds a 0 an explicit check is good style. i.e - if (!size) + if (size == 0) Update checks on 'numerical' variables to use explicit checks. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: ks7010: add explicit check to memcmp() callsTobin C. Harding2-15/+13
Calls to functions memcmp() and strcmp() are more clearly readable when the return value is explicitly checked. i.e if (memcmp(foo, bar, size) == 0) Modify driver to use an explicit check on the value returned by memcmp(). Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: ks7010: fix memcmp() bugTobin C. Harding1-2/+2
Call site to memcmp() treats return value as if it were an error code, it is not. If memcmp() finds inputs to be not the same, an error return code should be set explicitly. Correctly handle return value from call to memcmp(), set error code explicitly. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: fbtft: Replace a bit shift by a use of BIT.Arushi Singhal4-4/+4
This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: rts5208: Replace a bit shift by a use of BIT.Arushi Singhal1-2/+2
This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: rtl8712: Invert comparison to reduce indentationNarcisa Ana Maria Vasile1-6/+5
Check the condition: "pdata->length < 32" first, to be able to return immediately in case of error and then continue with the rest of the function without one extra indentation level. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: rtl8712: Restructure code for clarityNarcisa Ana Maria Vasile1-36/+33
Invert if statements to be able to return immediately in case of error, and to avoid additional else branch. Improve layout of function since there is more horizontal space now. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: rtl8712: Invert the test on check_fwstate() to reduce indentationNarcisa Ana Maria Vasile1-7/+7
Negate if condition to be able to return immediately in case of error, and then continue with the rest of the function without extra indentation level. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: rtl8712: Invert if statements to reduce indentation levelNarcisa Ana Maria Vasile1-22/+17
Invert if statements to be able to return immediately in case of error, and to avoid additional else branch, and then continue with the rest of the function without excessive indentation. This was found using the following Coccinelle script: @disable neg_if@ expression e,E; statement S; @@ *if (e) S else { return -E; } @disable neg_if@ expression e,E; statement S; identifier l; @@ *if (e) S else { rc = -E; goto l; } Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: sm750fb: Remove typedef from "typedef enum _spolarity_t"Arushi Singhal1-6/+5
This patch removes typedefs from enum and renames it from "typedef enum _spolarity_t" to "enum spolarity" as per kernel coding standards." Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: sm750fb: Remove typedef from "typedef struct _mode_parameter_t"Arushi Singhal3-9/+9
This patch removes typedefs from struct and renames it from "typedef struct _mode_parameter_t" to "struct mode_parameter" as per kernel coding standards." Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: dgnc: remove tracing prints in dgnc_tty.cAbhishek Bhardwaj1-4/+0
Remove tracing prints in dgnc_tty_send_xchar. The same functionality could be achieved by using ftrace. Signed-off-by: Abhishek Bhardwaj <abshkbh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: speakup: Match alignment with open parenthesis.Arushi Singhal4-6/+6
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: speakup: Removed Unnecessary parentheses.Arushi Singhal1-1/+1
Unnecessary parentheses are removed to improve readability. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: speakup: spaces preferred around operatorArushi Singhal6-22/+22
Fixed the checkpatch.pl issues like: CHECK: spaces preferred around that '&' (ctx:VxV) CHECK: spaces preferred around that '|' (ctx:VxV) CHECK: spaces preferred around that '-' (ctx:VxV) CHECK: spaces preferred around that '+' (ctx:VxV) etc. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: speakup: Moved OR operator to previous line.Arushi Singhal1-4/+4
Moved logical OR operator to previous line to fix the following checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: speakup: fixes braces {} should be used on all arms of this statementArushi Singhal5-28/+37
This patch fixes the checks reported by checkpatch.pl for braces {} should be used on all arms of this statement. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: speakup: Simplify "NULL" comparisonsArushi Singhal2-4/+4
Fixed coding style for null comparisons in speakup driver to be more consistant with the rest of the kernel coding style. Replaced 'x != NULL' with 'x' and 'x = NULL' with '!x'. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: speakup: Moved logical to previous line.Arushi Singhal1-6/+6
Moved logical operator to previous line to fix the following checkpatch issue: CHECK: Logical continuations should be on the previous line. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23remove unnecessary initial allocation of vcPranay Kr. Srivastava1-11/+0
This patch removes the unnecessary allocation of current foreground vc during initialization. This initialization is already handled in the loop that follows it for all available virtual consoles. Signed-off-by: Pranay Kr. Srivastava <pranjas@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23return same error value from spk_set_key_infoPranay Kr. Srivastava1-8/+19
This patch makes spk_set_key_info return -EINVAL in case of failure instead of returning 4 different values for the type of error that occurred. Print the offending values instead as debug message. Signed-off-by: Pranay Kr. Srivastava <pranjas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23ov5693: remove unused functionAlan Cox1-23/+0
It's commented out in the tree with a note saying to remove it. So let's remove it. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23speakup: Fix spurious space pronunciation on spelling lettersSamuel Thibault1-8/+5
This gathers emitting the caps start string, space, spelled letter string, space, and caps stop string, into one printf, to avoid sending to the synth a space character alone, which the synth would then pronounce. Similarly, emit space along control-letter and letter spelling. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Tested-by: Zahari Yurukov <zahari.yurukov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21iio: dac: Add support for ltc2632 DACsMaxime Roussin-Belanger4-0/+348
Add support for Linear Technology LTC2632 (SPI) family of· dual 12- 10-, and 8-bits output DACs. Signed-off-by: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com> Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-03-21staging: ks7010: rename return value identifierTobin C. Harding3-84/+84
Driver uses multiple identifier names for the same task (retval, ret, rc). It would be easier to read the code if a single task is identified with a single name. 'ret' is the most common return value identifier name found in the kernel tree, following the principle of least surprise using 'ret' is a decent choice. Rename rc -> ret Rename retval -> ret Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: ks7010: remove zero comparisonTobin C. Harding1-2/+2
Comparison, equal to zero, is redundant 'if (foo == 0)' is equal to 'if (!foo)' Typical kernel coding style is to use the shorter form. Remove unnecessary zero comparison. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: ks7010: remove non-zero comparisonTobin C. Harding2-5/+5
Comparison, does not equal zero, is redundant 'if (foo != 0)' is equal to 'if (foo)' Typical kernel coding style is to use the shorter form. Remove unnecessary non-zero comparison. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: ks7010: make goto labels uniformTobin C. Harding1-35/+35
Driver uses different label forms for similar purposes. It would be more clear if single use case has uniform label. 'out' is generic and adds no meaning to label. Documentation/process/coding-style.rst: Choose label names which say what the goto does or why the goto exists. Rename labels so as to better describe what they do. If an execution path only exists for the label on an error, prefix the label with 'err_'. If a non-error execution path exist do not use prefix. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: ks7010: return directly on errorTobin C. Harding2-10/+7
Function uses goto label with no clean up code. In this case we should just return directly. Remove goto statement, return directly on error. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: ks7010: fix checkpatch MULTIPLE_ASSIGNMENTSTobin C. Harding1-1/+2
Checkpatch emits CHECK: multiple assignments should be avoided. Move multiple line assignment to individual lines. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: ks7010: fix checkpatch BRACESTobin C. Harding1-13/+9
Checkpatch emits CHECK: Unbalanced braces around else statement. Statements in question are single statements so we do not need braces. Checkpatch also warns about multiple line dereference for this code. Fix if/else/else if statement use of braces. Fix function argument layout at the same time since it is the same statement. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENTTobin C. Harding2-10/+10
Checkpatch emits CHECK: Alignment should match open parenthesis. Fix alignment to open parenthesis in line with kernel coding style. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: ks7010: fix checkpatch SPACINGTobin C. Harding1-2/+2
Checkpatch emits CHECK: No space is necessary after a cast. Remove unnecessary space after cast. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: ks7010: fix checkpatch LINE_SPACINGTobin C. Harding1-0/+1
Checkpatch emits CHECK: Please use a blank line after function/struct/union/enum declarations. Add blank line after function definition. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: vchiq_arm: Fix MODULE_LICENSEStefan Wahren1-1/+1
Regarding to the header the driver is licensed under BSD and GPL. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21Staging: media: Unmap and release region obtained by ioremap_nocacheArvind Yadav1-3/+9
Free memory mapping, if vpfe_ipipe_init is not successful. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging:sm750fb: Code readability is improved.Arushi Singhal1-25/+30
New variables are added to make the code more readable. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: rtl8712: checkpatch: Avoid multiple line dereferencesDing-Chi Wang1-6/+4
"WARNING: Avoid multiple line dereference - prefer 'poid_par_priv->information_buf_len'" "WARNING: Avoid multiple line dereference - prefer 'padapter->registrypriv.dev_network.Configuration'" "WARNING: Avoid multiple line dereference - prefer 'Adapter->mppriv.workparam.io_value'" Signed-off-by: Ding-Chi Wang <dcwang.tw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: lustre: libcfs: Define pr_fmt() to include relevant nameNarcisa Ana Maria Vasile1-5/+6
Define a pr_fmt() for tracefile.c Remove redundant prefix 'Lustre' from pr_*() calls. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: lustre: libcfs: Replace printk() with pr_*()Narcisa Ana Maria Vasile1-28/+22
Convert printk() calls into corresponding pr_*() calls. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: media: atomisp: fix build errors when PM is disabledJérémy Lefaure1-2/+2
The function atomisp_restore_iumit_reg is unused when PM is disabled. Adding __maybe_unused to the function definition avoids a warning. The function atomisp_mrfld_power_down is defined only when PM is enabled. So in atomisp_pci_probe, it should be called only when PM is enabled. Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: atomisp: remove useless condition in if-statementsDaeseok Youn1-4/+2
The css_pipe_id was checked with 'CSS_PIPE_ID_COPY' in previous if- statement. In this case, if the css_pipe_id equals to 'CSS_PIPE_ID_COPY', it could not enter the next if-statement. But the "next" if-statement has the condition to check whether the css_pipe_id equals to 'CSS_PIPE_ID_COPY' or not. It should be removed. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: media: atomisp: Remove unnecessary braces.Varsha Rao3-6/+3
Remove braces which are not required to fix the check patch issue. The following coccinelle script is used to fix this issue. @@ expression e,e1; @@ if(e) -{ e1; -} Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: media: atomisp: Remove unnecessary blank lines.Varsha Rao4-11/+0
Remove multiple blank lines, which are not required. This patch fixes the following check patch issue: CHECK: Please don't use multiple blank lines Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: media: atomisp: Fix block comments warning.Varsha Rao2-13/+15
Use kernel preferred block commenting style, to fix the checkpatch issue. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging: media: atomisp: Added spaces around arithmetic operators.Varsha Rao3-13/+13
Add spaces around arithmetic operators (/, +, -), to fix the checkpatch issue. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>