aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ft1000 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-04-03staging: ft1000: Drop unneeded cast on netdev_privJulia Lawall1-7/+7
The result of netdev_priv is already implicitly cast to the type of the left side of the assignment. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; T *x; @@ x = - (T *) netdev_priv(...) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26ft1000-pcmcia: ft1000_hw.c: code refactoring: add ft1000_read_dsp_timer()Daniele Alessandrelli1-158/+41
Add new function ft1000_read_dsp_timer() replacing recurring code block for reading DSP timer. Such code refactoring solves all remaining "line over 80 characters" warnings reported by checkpatch.pl. Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26ft1000-pcmcia: ft1000_hw.c: fix style issues not requiring code refactoringDaniele Alessandrelli1-83/+106
Fix all the trivial style issues (as reported by checkpatch.pl) not requiring code refactoring. A following patch is expected to fix the remaining issues by performing some code refactoring. Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18Staging: ft1000: replace pr_err with dev_errHaneen Mohammed1-2/+3
This patch replace pr_err with dev_err, when appropriate device structure is found. Issue found using the following Coccinelle script: @r exists@ identifier f, s, i; position p; @@ f(...,struct s *i,...) { <+... when != i == NULL pr_err@p(...); ...+> } @rr@ identifier r.s, fld; @@ struct s { ... struct device *fld; ... }; @@ identifier r.i, rr.fld; position r.p; @@ -pr_err@p +dev_err ( + i->fld, ...) Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: ft1000: Remove parentheses around right side an assignmentHaneen Mohammed4-7/+7
Parentheses are not needed around the right hand side of an assignment. This patch remove parenthese of such occurenses. Issue was detected and solved using the following coccinelle script: @rule1@ identifier x, y, z; expression E1, E2; @@ ( x = (y == z); | x = (E1 == E2); | x = -( ... -) ; ) Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: ft1000: Iterate list using list_for_each_entrySomya Anand3-9/+8
Code using doubly linked list is iterated generally using list_empty and list_entry functions, but it can be better written using list_for_each_entry macro. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a macro which is used to iterate over a list of given type. So while loop used to iterate over a list can be replaced with list_for_each_entry macro. However, if list_del is used in the loop, then list_for_each_entry_safe is a better choice. This transformation is done by using the following coccinelle script. @ rule1 @ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry; @@ - while (list_empty(&E1) == 0) + list_for_each_entry (I1, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ...when != list_del(...); when != list_del_init(...); } @ rule2 @ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: ft1000: Use module_pcmcia_driverVaishali Thakkar1-12/+1
Macro module_pcmcia_driver is used for drivers whose init and exit paths does only register and unregister to pcmcia API. So, here remove some boilerplate code by using module_pcmcia_driver. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15staging: ft1000: ft1000-usb: ft1000_hw.c: adjust function argumentsAya Mahfouz1-9/+9
Handles the following issues: Removing extra parentheses around function arguments, Removing unnecessary pointer to pointer casts. Issues were detected using the following coccinelle script: @@ expression e; type t; identifier f; @@ f(..., -(t *) e ,...) @@ expression e; identifier f; @@ f(..., & -( e -) ,...) @@ expression e; identifier f; @@ f(..., -( e -) ,...) Parentheses removal were left to the script. However, there were some cases that were handled manually. In addition, handling pointer casts were done manually too because not all replacements generated by the script were suitable. When pointer casts on function arguments were in the form: <func>(...,(<type> *)&<expression>,...) the replacements were discarded due to compilation warnings. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15staging: ft1000: ft1000-usb: ft1000_download.c: adjust function argumentsAya Mahfouz1-7/+7
Handles the following issues: Removing extra parentheses around function arguments, Removing unnecessary pointer to pointer cast. Issues were detected using the following coccinelle script: @@ expression e; type t; identifier f; @@ f(..., -(t *) e ,...) @@ expression e; identifier f; @@ f(..., & -( e -) ,...) @@ expression e; identifier f; @@ f(..., -( e -) ,...) Parentheses removal were left to the script. However, handling pointer casts were done manually because not all replacements generated by the script were suitable. In general, the following cases were discarded: pointer casts in macros, pointer casts on function arguments in the form of: <func>(...,(<type> *)&<expression>,...) since both cases generated compilation warnings. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15staging: ft1000: ft1000-usb: adjust function argumentsAya Mahfouz1-4/+4
Handles the following issues: Removing extra parentheses around function arguments, Removing unnecessary pointer to pointer cast. Issues were detected using the following coccinelle script: @@ expression e; type t; identifier f; @@ f(..., -(t *) e ,...) @@ expression e; identifier f; @@ f(..., & -( e -) ,...) @@ expression e; identifier f; @@ f(..., -( e -) ,...) Parentheses removal were left to the script. However, handling pointer casts were done manually because not all replacements generated by the script were suitable. In general, the following cases were discarded: pointer casts in macros, pointer casts on function arguments in the form of: <func>(...,(<type> *)&<expression>,...) since both cases generated compilation warnings. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15staging: ft1000: ft1000-pcmcia: adjust function argumentsAya Mahfouz1-3/+5
Handles the following issues: Removing extra parentheses around function arguments, Removing unnecessary pointer to potinter cast. Issues were detected using the following coccinelle script: @@ expression e; type t; identifier f; @@ f(..., -(t *) e ,...) @@ expression e; identifier f; @@ f(..., & -( e -) ,...) @@ expression e; identifier f; @@ f(..., -( e -) ,...) Parentheses removal were left to the script. However, handling pointer casts were done manually because not all replacements generated by the script were suitable. In general, the following cases were discarded: pointer casts in macros, pointer casts on function arguments in the form of: <func>(...,(<type> *)&<expression>,...) since both cases generated compilation warnings. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15staging: ft1000: adjust function argumentsAya Mahfouz1-2/+2
Handles the following issues: Removing extra parentheses around function arguments, Removing unnecessary pointer to pointer cast. Issues detected and resolved using the following coccinelle script: @@ expression e; type t; identifier f; @@ f(..., -(t *) e ,...) @@ expression e; identifier f; @@ f(..., & -( e -) ,...) @@ expression e; identifier f; @@ f(..., -( e -) ,...) Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06Staging: drivers: Bool initializations should use true/falseCristina Opriceana1-2/+2
This patch replaces bool initializations of 1/0 with true/false in order to increase readability and respect the standards. Warning found by coccinelle. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26Staging: ft1000: Removed unnecessary bracesYeliz Taneroglu1-6/+3
The following patch fixes the checkpatch.pl warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26staging: ft1000: ft1000-pcmcia: Added missing blank line.Gulsah Kose1-0/+1
Added missing blank line after declaration. Removed following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26staging: ft1000: ft1000-pcmcia: Removed unnecessary parentheses.Gulsah Kose1-1/+1
This patch removes unnecessary parentheses from control expression. Removed following checkpatch.pl warning: WARNING: Unnecessary parentheses Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26staging: ft1000: ft1000-pcmcia: Deleted unnecessary braces.Gulsah Kose1-3/+2
Brackets were removed from the expression that containing single line in the phrase "if else". Removed following checkpatch.pl warnings: WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26staging: ft1000: ft1000-pcmcia: Removed all useless "else"Gulsah Kose1-144/+141
Removed all else keywords that used after break or return. Removed following checkpatch.pl warnings: WARNING: else is not generally useful after a break or return Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: ft1000: fix braces warningBilel DRIRA1-44/+29
This patch fix checkpatch.pl WARNING: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Bilel DRIRA <bilel.dr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17Staging: ft1000-pcmcia: fix else close brace styleAustin Kerbow1-19/+13
Fix the following checkpatch.pl errors ERROR: else should follow close brace '}' + } + else { ERROR: else should follow close brace '}' + } + else { ERROR: else should follow close brace '}' + } + else { ERROR: else should follow close brace '}' + } + else { ERROR: else should follow close brace '}' + } + else { Signed-off-by: Austin Kerbow <amkerbow@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: ft1000: ft1000-usb: ft1000_hw.c: Fix a potential memory leak.Rickard Strandqvist1-4/+4
Avoid allocate memory if we will exit the function. Was found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17Staging: ft1000: ft1000-pcmcia: Fixed a coding style issueDean Michael Ancajas1-3/+3
Fixed a coding style issue for braces. Signed-off-by: Dean Michael Ancajas <dbancajas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: ft1000 : replace __attribute ((__packed__) with __packedGeoff Darst1-2/+2
Replace two instances of __attribute ((__packed__) with __packed macro to address the warning found by the checkpatch.pl tool. Signed-off-by: Geoff Darst <geoffda@comcast.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging:ft1000_pcmcia:Added a blank line after declarationAnjana Sasindran1-0/+1
This patch fix the checkpatch.pl warning WARNING: Missing a blank line after declaration Signed-off-by: Anjana Sasindran <anjanasasindran123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03staging: ft1000: Logging message neateningJoe Perches7-518/+383
Use a more common logging style. o Convert DEBUG macros to pr_debug o Add pr_fmt o Remove embedded function names from pr_debug o Convert printks to pr_<level> o Coalesce formats and align arguments o Add missing terminating newlines Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03staging: ft1000: Whitespace neateningJoe Perches11-1407/+1407
Use normal kernel style, indentation and alignment. git diff -w shows no difference Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30Staging: ft1000: ft1000_hw.c: Removed some checkpatch errors and warnings.Surya Seetharaman1-4/+4
ERROR: space prohibited after that '&' (ctx:WxW) ERROR: "foo * bar" should be "foo *bar" ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: ft1000: ft1000-usb: Remove useless cast on void pointerTapasweni Pathak1-1/+1
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Build tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: ft1000: ft1000-pcmcia: Remove useless cast on void pointerTapasweni Pathak1-1/+1
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Build tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29Staging: ft1000: ft1000-pcmcia: Fix whitespace issuesNicky Chorley1-12/+12
This patch fixes the following errors and warnings identified by checkpatch.pl: WARNING: please, no spaces at the start of a line 814: FILE: ft1000_hw.c:814: tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL);$ WARNING: please, no spaces at the start of a line 815: FILE: ft1000_hw.c:815: i=0;$ ERROR: spaces required around that '=' (ctx:VxV) 815: FILE: ft1000_hw.c:815: i=0; WARNING: please, no spaces at the start of a line 816: FILE: ft1000_hw.c:816: while (tempword & FT1000_DB_DPRAM_TX) {$ ERROR: code indent should use tabs where possible 817: FILE: ft1000_hw.c:817: mdelay(10);$ WARNING: please, no spaces at the start of a line 817: FILE: ft1000_hw.c:817: mdelay(10);$ ERROR: code indent should use tabs where possible 818: FILE: ft1000_hw.c:818: i++;$ WARNING: please, no spaces at the start of a line 818: FILE: ft1000_hw.c:818: i++;$ ERROR: code indent should use tabs where possible 819: FILE: ft1000_hw.c:819: if (i==10) {$ WARNING: please, no spaces at the start of a line 819: FILE: ft1000_hw.c:819: if (i==10) {$ WARNING: suspect code indent for conditional statements (8, 12) 819: FILE: ft1000_hw.c:819: if (i==10) { spin_unlock_irqrestore(&info->dpram_lock, flags); ERROR: spaces required around that '==' (ctx:VxV) 819: FILE: ft1000_hw.c:819: if (i==10) { ERROR: code indent should use tabs where possible 820: FILE: ft1000_hw.c:820: spin_unlock_irqrestore(&info->dpram_lock, flags);$ WARNING: please, no spaces at the start of a line 820: FILE: ft1000_hw.c:820: spin_unlock_irqrestore(&info->dpram_lock, flags);$ ERROR: code indent should use tabs where possible 821: FILE: ft1000_hw.c:821: return;$ WARNING: please, no spaces at the start of a line 821: FILE: ft1000_hw.c:821: return;$ ERROR: code indent should use tabs where possible 822: FILE: ft1000_hw.c:822: }$ WARNING: please, no spaces at the start of a line 822: FILE: ft1000_hw.c:822: }$ ERROR: code indent should use tabs where possible 823: FILE: ft1000_hw.c:823: tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL);$ WARNING: please, no spaces at the start of a line 823: FILE: ft1000_hw.c:823: tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL);$ WARNING: please, no spaces at the start of a line 824: FILE: ft1000_hw.c:824: }$ Signed-off-by: Nicky Chorley <ndchorley@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: ft1000: do not initialise statics to 0 or NULLChen Weixiang1-1/+1
Remove following checkpatch.pl error from ft1000/ft1000-usb/ft1000_debug.c ERROR: do not initialise statics to 0 or NULL Signed-off-by: Chen Weixiang <weixiang.chen@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28staging: ft1000: Remove curly braces for single statement blocksEbru Akagunduz1-8/+4
This patch removes curly braces for single statement blocks using following coccinelle script: @@ expression e1; @@ - if (e1) { + if (e1) return ...; - } Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28Staging: ft1000: ft1000-usb: Removed unnecessary parenthesesTina Johnson1-2/+2
Unnecessary parentheses around the right hand side of an assignment is removed using the following semantic patch: @@ identifier x,f; constant C; @@ ( -x = (f / C ); +x = f / C ; | -x = (f % C ); +x = f % C ; ) Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23staging: ft1000: ft1000-pcmcia: removed unused variable in ft1000_hw.cJiayi Ye1-2/+0
Variable whose value is initialized but never used is unnecessary. The following Coccinelle semantic patch removed the unused variable. @e@ identifier i; position p; type T; @@ extern T i@p; @@ type T; identifier i; constant C; position p != e.p; @@ - T i@p; <+... when != i - i = C; ...+> Signed-off-by: Jiayi Ye <yejiayily@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23staging: ft1000: Remove parentheses from return argumentsTapasweni Pathak1-8/+8
The sematic patch used for this is: // <smpl> @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; // </smpl> Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: ft1000: ft1000-pcmcia: Replace printks with netdev_<level> and dev_<level>Kumari Radha1-6/+6
This patch replaces printk(KERN_INFO ... with dev_info and printk(KERN_ERR ... with netdev_err fixing following checkpatch.pl warnings in ft1000_hw.c: WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Kumari Radha <kumari.radha3@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: ft1000: ft1000-usb: Removed unnecessary else statement.Gulsah Kose1-6/+4
This patch fixes "else is not generally useful after a break or return" checkpatch.pl warning in ft1000_download.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: ft1000: ft1000-usb: Removed unnecessary else statement.Gulsah Kose1-43/+41
This patch fixes "else is not generally useful after a break or return" checkpatch.pl warning in ft1000_hw.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: ft1000: ft1000-usb: Removed unnecessary parentheses.Gulsah Kose1-1/+1
This patch fixes "Unnecessary parentheses" checkpatch.pl warning in ft1000_hw.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: ft1000: ft1000-usb: Added new line after declarations.Gulsah Kose1-0/+1
This patch fixes "Missing a blank line after declarations" checkpatch.pl warning in ft1000_hw.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: ft1000: ft1000-pcmcia: Add require space after that ','Aybuke Ozdemir1-3/+3
This patch fixes checkpatch.pl error in file ft1000_hw.c ERROR: space required after that ';' (ctx:VxV) Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: ft1000: ft1000-pcmcia: Used "linux" instead of "asm".Gulsah Kose1-2/+2
This patch fixes "Use #include <linux/uaccess.h> instead of <asm/uaccess.h" checkpatch.pl warning in ft1000_dnld.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: ft1000: ft1000-pcmcia: Removed unnecessary else expression.Gulsah Kose1-3/+2
This patch fixes "else is not generally useful after a break or return" checkpatch.pl warning in ft1000_dnld.c Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: ft1000-usb: use usleep_range instead of msleepCatalina Mocanu1-1/+1
This fixes the following checkpatch.pl warning: WARNING : msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt Signed-off-by: Catalina Mocanu <catalina.mocanu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: ft1000-usb: remove unnecessary return statementCatalina Mocanu1-2/+0
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-23staging: ft1000-pcmcia: Don't initialise static to 0Catalina Mocanu1-2/+2
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-23staging: ft1000-pcmcia: replace DEBUG macro with netdev_dbgCatalina Mocanu1-12/+6
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-02drivers: staging: ft1000: Fix return is not a function, parentheses are not required errorsGreg Donald2-5/+6
Fix checkpatch.pl return is not a function, parentheses are not required errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: ft1000: remove procfs entriesNicolas Thery9-474/+2
This patch started as a fix to some checkpatch complaints in ft1000 procfs code but Greg suggested to remove the procfs entries altogether: http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2014-July/055594.html Signed-off-by: Nicolas Thery <nthery@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09staging: ft1000-usb: check for errors in card_send_commandAndrey Utkin3-11/+22
kmalloc() result check was lacking. Fixing that required also changing card_send_command() return type from void to int, and checking its return code everywhere. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=78561 Reported-by: Maksymilian Arciemowicz <max@cert.cx> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>