aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rts5208 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-10-02Staging: rts5208: Fix indentation warningsWayne Porter1-13/+13
Fix code indentation warnings detected by checkpatch.pl Signed-off-by: Wayne Porter <wporter82@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02staging: rts5208: Replace explicit NULL comparisonNamrata A Shettar1-1/+1
Replace explicit NULL comparison to resolve checkpatch issues. Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02staging: rts5208: Add space around binary operatorsNamrata A Shettar1-10/+10
Add space around binary operators to resolve checkpatch issue. Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25staging: rts5208: fix style warnings in xd.cSergio Paracuellos1-24/+14
This patch fixes the following checkpatch.pl warning in xd.c: WARNING: else is not generally useful after a break or return It also makes code more uniform with the new changes Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25staging: rts5208: fix style warnings in sd.cSergio Paracuellos1-112/+61
This patch fixes the following checkpatch.pl warning in sd.c: WARNING: else is not generally useful after a break or return It also makes code more uniform with the new changes Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25staging: rts5208: fix line style warnings in spi.cSergio Paracuellos1-1/+2
This patch fixes the following checkpatch.pl warning in spi.c: WARNING: line over 80 characters Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25staging: rts5208: remove not used typedef in rtsx_sys.hSergio Paracuellos1-2/+0
This patch fixes the following checkpatch.pl warning in rtsx_sys.h: WARNING: do not add new typedefs Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25staging: rts5208: fix comment blocks style in rtsx.hSergio Paracuellos1-2/+4
This patch fixes the following checkpatch.pl warning in rtsx.h: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25staging: rts5208: fix comment blocks style in rtsx_chip.hSergio Paracuellos1-25/+27
This patch fixes the following checkpatch.pl warning in rtsx_chip.h: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25staging: rts5208: avoid symbolic permissions in rtsx.cSergio Paracuellos1-6/+6
This patch fixes the following checkpatch.pl warning in rtsx.c: WARNING: Symbolic permissions are not preferred. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25staging: rts5208: avoid new typedef in rtsx.h: rtsx_dev_tSergio Paracuellos2-5/+1
This patch fixes the following checkpatch.pl warning in rtsx.h: WARNING: do not add new typedefs It also remove DELAY_PARA_T because code is not using it. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: rts5208: Remove space after castRehas Sachdeva2-3/+3
Removes unnecessary space after a cast. Issue found by checkpatch. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: rts5208: Use BIT(x) macroRehas Sachdeva1-15/+15
Replaces left shift operation (1 << x) by BIT(x). Issue found by checkpatch. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: rts5208: Put constant on right side of comparisonRehas Sachdeva1-3/+3
Replaces position of constant from left to right side of a comparison. Additionally, modifies logical continuations to be on the previous line and fixes alignment to match open parenthesis. Issues found by checkpatch. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: rts5208: Fix indentationRehas Sachdeva1-4/+4
Fixes indentation by removing unnecessary TAB. Issue found by checkpatch. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: rts5208: Add spaces around operatorsRehas Sachdeva1-4/+4
Adds spaces on either side of arithmetic and relational operators like '-', '<' and '*'. Issue found by checkpatch. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: rts5208: Remove unnecessary parenthesesRehas Sachdeva1-10/+10
Removes unnecessary parentheses from an expression of the form &(x). Issue found by checkpatch. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20Staging: rts5208: Add space around operator.Sandhya Bankar1-4/+4
Add space around operator. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20Staging: rts5208: rtsx: Use x instead of x != NULL.Sandhya Bankar1-1/+1
Use x instead of x != NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20Staging: rts5208: ms: Use x instead of x != NULL.Sandhya Bankar1-1/+1
Use x instead of x != NULL. This patch was found by checkpatch. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20Staging: rts5208: rtsx_card.c: Fixed brace style issuesCathal Mullaney1-13/+13
Fixed several minor brace coding style issues. Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-17staging: rts5208: rtsx_chip: Add space around binary operatorsNamrata A Shettar1-5/+5
Add space around binary operators to resolve checkpatch issue. Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: rts5208: make some vars to lower case to keep the style consistentSergio Paracuellos1-9/+9
This patch fixes the checkpatch.pl warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01staging: rts5208: Add two blank lines in comments.MingChia Chung1-14/+28
This patch fixes a minor checkpatch warnings: "WARNING: Block comments use a trailing */ on a separate line" Signed-off-by: Ming-Chia Chung <Quexint@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging: rts5208: Change data type to unsigned int.Louie Lu1-1/+1
This patch fixes a minor checkpatch warning: "WARNING: Prefer 'unsigned int' to bare use of 'unsigned'" Signed-off-by: Louie Lu <louie.lu@hopebaytech.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging: rts5208/ms.c: add missing releases in mg_get_local_EKB and mg_get_ICVQuentin Lambert1-2/+4
mg_get_local_EKB and mg_get_ICV used to return with an error code before releasing all resources. This patch add a jump to the appropriate label ensuring that the resources are properly released before returning. This issue was found with Hector. Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging: rts5208/ms.c: change the label name to respect the coding styleQuentin Lambert1-6/+6
This patch changes label names using camel case to snake case as well as giving a new name representing what will be done after the label. Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21Staging: rts5208: fix double blank line coding style issuesJonas Rickert11-41/+1
This is a patch for double blank lines and a missing blank line reported by checkpatch.pl Signed-off-by: Jonas Rickert <jrickertkc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging: rts5208: alignment to match open paranthesisManav Batra1-1/+1
Fixes CHECK: Alignment should match open parenthesis Signed-off-by: Manav Batra <batmanav10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging: rts5208: ensure braces on all arms of if stmtNicholas Sim1-8/+8
Added braces on if arm of if statement where else arm already needs braces as suggested for clarity in Documentation/CodingStyle (several) Signed-off-by: Nicholas Sim <nicholassimws@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29Staging: rts5208: rtsx_card.c: Remove unused functionBhumika Goyal2-23/+0
The functions double_depth, check_card_fail, check_card_ejected are not used anywhere in the kernel. So, remove their prototype and definition. Grepped to find occurences. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29Staging: rts5208: Remove unused functionsBhumika Goyal2-38/+0
The functions rtsx_disable_card_int, rtsx_undo_delink, rtsx_check_link_ready are not used anywhere in the kernel. So,remove their definition and prototype. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28Staging: rts5208: Add space around '+'Dilek Uzulmez1-7/+7
Add space around operator '+'. Problem found using checkpatch.pl CHECK: spaces preferred around that '+' (ctx:VxV) Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rts5208: Replace pci_enable_device with pcim_enable_deviceAmitoj Kaur Chawla1-7/+1
Devm_ functions allocate memory that is automatically freed when a driver detaches. Replace pci_enable_device with pcim_enable_device. Remove unnecessary pci_disable_device and pci_release_regions from probe and remove functions in rts5208 driver since pcim_enable_device contains a call to pcim_release which contains calls to both pci_disable_device and pci_release_regions. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rts5208: Change form of NULL comparisonsBhaktipriya Shridhar1-5/+5
Change null comparisons of the form x == NULL to !x. This was done using Coccinelle. @@ expression e; @@ - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rts5208: Remove NULL test before vfreeBhaktipriya Shridhar2-44/+22
vfree frees the virtually continuous memory area starting at addr. If addr is NULL, no operation is performed. So NULL test is not needed before vfree. This was done using Coccinelle: @@ expression x; @@ -if (x != NULL) vfree(x); @@ expression x; @@ -if (x != NULL) { vfree(x); x = NULL; -} Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rts5208: simplify NULL testsEva Rachel Retuya6-23/+23
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11Staging: rts5208: Use min instead of ternary operatorBhumika Goyal1-2/+2
This patch replaces ternary operator with macro min as it shorter and thus increases code readability. Macro min returns the minimum of the two compared values. Made a semantic patch for changes: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rts5208: rtsx_transport.c: Drop void pointer castJanani Ravichandran1-1/+1
Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rts5208: rtsx.c: Drop unneeded void pointer castJanani Ravichandran1-1/+1
Void pointers need not be cast to other pointer types. Semantic patch used: @r@ expression x; void *e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rts5208: Remove unnecessary pci_set_drvdata()Amitoj Kaur Chawla1-2/+0
Unnecessary pci_set_drvdata() has been removed since the driver core clears the driver data to NULL after device release or on probe failure. There is no need to manually clear the device driver data to NULL. The Coccinelle semantic patch used to make this change is as follows: //<smpl> @@ struct pci_dev *pci; @@ - pci_set_drvdata(pci, NULL); //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11Staging: rts5208: Remove unnecessary parenthesesDilek Uzulmez1-46/+46
Problem found using checkpatch.pl CHECK: Unnecessary parentheses around chip->ms_card Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rts5208: Prefer using BIT macroBhaktipriya Shridhar1-3/+3
Replace all instances of bit shifting on 1 with the BIT(x) macro. This was done using Coccinelle. @@ int c; @@ - (1 << c) + BIT(c) Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: rts5208: Removed unnecessary return variableBhaktipriya Shridhar1-7/+2
This patch removes unnecessary return variables in switch statements. This was done with Coccinelle: @@ local idexpression ret; expression e1,e2; identifier label; @@ switch ( ... ) { case label : ... - ret = e1; - break; + return e1; ... default: ... - ret = e2; + return e2; ... } ... when != ret - return ret; @@ type T; identifier x; @@ - T x; ... when != x Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20Staging: rts5208: rtsx_transport.c: Fix comparisons to NULLShaun Ren1-3/+3
This patch changes all comparsions to NULL with !..., as reported by checkpatch.pl. Signed-off-by: Shaun Ren <shaun.ren@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20Staging: rts5208: rtsx_transport.c: Remove unnecessary parenthesesShaun Ren1-6/+6
This patch removes all unnecessary parentheses found by checkpatch.pl. Signed-off-by: Shaun Ren <shaun.ren@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20Staging: rts5208: rtsx_transport.c: Fix label naming conventionShaun Ren1-3/+3
This patch fixes the following naming convention issue in rtsx_transport.c, as reported by checkpatch.pl: CHECK: Avoid CamelCase: <Handle_Errors> Signed-off-by: Shaun Ren <shaun.ren@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20Staging: rts5208: rtsx_transport.c: Remove extra newlinesShaun Ren1-3/+0
This patch fixes the following issues in rtsx_transport.c as reported by checkpatch.pl: CHECK: Blank lines aren't necessary after an open brace '{' CHECK: Please don't use multiple blank lines Signed-off-by: Shaun Ren <shaun.ren@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20Staging: rts5208: rtsx_transport.c: Add spaces around -Shaun Ren1-2/+2
This patch fixes the following styling issue in rtsx_transport.c as reported by checkpatch.pl: CHECK: spaces preferred around that '-' (ctx:VxV) Signed-off-by: Shaun Ren <shaun.ren@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20Staging: rts5208: rtsx_transport.c: Remove spaces after castsShaun Ren1-1/+1
This patch removes all spaces after casts in rtsx_transport.c, as reported by checkpatch.pl: CHECK: No space is necessary after a cast Signed-off-by: Shaun Ren <shaun.ren@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>