aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/ft1000
AgeCommit message (Collapse)AuthorFilesLines
2015-10-24staging: ft1000: remove obsolete driverDeepa Dinamani19-7575/+0
Remove support for Qleadtek Flash-OFDM modems. Telecom carrier is discontinuing service for the radio technology. See http://www.gtigroup.org/news/ind/2015-08-18/6996.html. Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Deepa Dinamani <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-15staging: ft1000: code style cleanupLucas Georges1-1/+1
There was a stray '*' in a comment block. Signed-off-by: Lucas Georges <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-14Staging: ft1000: use usleep_range()Shraddha Barke1-4/+4
This patch fixes checkpatch.pl warning WARNING : msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt Signed-off-by: Shraddha Barke <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-14Staging: ft1000: ft1000-usb: Use USB API functions rather than constantsShraddha Barke1-6/+2
Introduce the use of the function usb_endpoint_is_bulk_in(). Signed-off-by: Shraddha Barke <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-12staging: ft1000_pcmcia: staticize local functions in ft1000_dnld.cMike Rapoport1-13/+6
Several functions in ft1000_dnld.c are not used outside that file, make them static Signed-off-by: Mike Rapoport <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-08-14staging: ft1000: Remove unnecessary externsJoe Perches2-12/+11
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignment Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-07-16staging: ft1000: ft1000-usb: remove unnecessary out of memory warningCHANG FU CHIAO1-1/+0
fixes "Possible unnecessary 'out of memory' message" Signed-off-by: CHANG FU CHIAO <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-07-14staging: ft1000: convert pack pragma to __packedGiedrius Statkevičius1-2/+1
Convert a Microsoft compiler specific directive "#pragma pack(1)" to a GCC equivalent __packed. Also, by doing this we save ourselves from trouble if any other struct definitions are added after the #pragma because it will be applied to all of the definitions following it. Signed-off-by: Giedrius Statkevičius <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-07-14staging: ft1000-usb: shorten lines to under 80 charactersPeter Karlsson2-11/+22
Wrap function arguments to shorten lines to under 80 characters. Signed-off-by: Peter Karlsson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-07-14staging: ft1000-usb: fixed table alignmentPeter Karlsson1-6/+13
Fixed alignment to 8 bytes per line. Signed-off-by: Peter Karlsson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-06-18staging: ft1000-usb: Removed CVS keyword markerPeter Karlsson1-2/+0
Fix checkpatch warnings about CVS keyword marker. Signed-off-by: Peter Karlsson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-06-17staging: ft1000-usb: Removed global initializationPeter Karlsson1-1/+1
Fix checkpatch error about initialize globals to 0. Signed-off-by: Peter Karlsson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-06-17staging: ft1000-usb: Removed unnecessary parenthesPeter Karlsson1-1/+1
Fix checkpatch warning about unnecessary parenthes. Signed-off-by: Peter Karlsson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-06-17staging: ft1000: ft1000-usb: ft1000_hw.c: fix long linesMichał Kępień1-29/+29
Fix checkpatch.pl warnings about lines longer than 80 characters. Signed-off-by: Michał Kępień <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-05-31staging: ft1000: Remove empty branch from conditionalAlex Dowad1-2/+1
This fixes a checkpatch style warning in ft1000_ioctl. Signed-off-by: Alex Dowad <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>