1
0
Fork 0
Commit Graph

232 Commits (redonkable)

Author SHA1 Message Date
Wayne Porter 7b468a297d staging: rts5208: rtxs_chip.h: Long lines
Move comments above long definitions so they don't go over 80 characters

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:18 +02:00
Wayne Porter 7314203b38 staging: rts5208: rtsx_scsi.h: Long lines
Aligning with parenthesis causes lines to go too long, so the
parenthesis are on a new line

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:17 +02:00
Wayne Porter d264ceb779 staging: rts5208: CamelCase fix
Change label to not use camel case per checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:16 +02:00
Wayne Porter a3e7c0928b staging: rts5208: ms.c: Braces fix
Add braces to all arms of if statement

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:14 +02:00
Wayne Porter 36e32ee542 staging: rts5208: ms.c: Multiple assignments
Fix check found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:13 +02:00
Wayne Porter 25ccf0b0a7 staging: rts5208: ms.c: Long Lines
Fix long lines detected by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:12 +02:00
Wayne Porter 9c378f1488 staging: rts5208: ms.c: Parenthesis alignment
Fix checkpatch messages: Alignment should match open parenthesis

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:11 +02:00
Wayne Porter 8473e5bb5c staging: rts5208: ms.h: Parenthesis alignment
Fix alignment to match open parenthesis

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:10 +02:00
Wayne Porter 2eb9d8cbb3 staging: rts5208: rtsx.c: Alloc sizeof struct
Satisfy checkpatch message:  Prefer kzalloc(sizeof(*dev->chip)...) over
kzalloc(sizeof(struct rtsx_chip)...)

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:09 +02:00
Wayne Porter 8149b9ab57 staging: rts5208: rtsx.c: Spacing
Remove blank line after opening {

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:08 +02:00
Wayne Porter cd4b77586b staging: rts5208: rtsx.c: CamelCase
Make camel case labels all lowercase

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:07 +02:00
Wayne Porter 7e0ea476ed staging: rts5208: rtsx.c: Spacing
Add spaces around operator for readability

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:06 +02:00
Wayne Porter cd5491af0d staging: rts5208: rtsx.c: Multiple assignments
Fix multiple assignments found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:05 +02:00
Wayne Porter c8b07957c4 staging: rts5208: rtsx.c: Alignment
Fix to match open parenthesis in order to satisfy checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:04 +02:00
Wayne Porter 379dfd3269 staging: rts5208: rtsx.c: Unnecessary parentheses
Remove parentheses found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:03 +02:00
Wayne Porter a38e369b31 staging: rts5208: Comparison to NULL
Fix to resolve checkpatch message

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:02 +02:00
Wayne Porter 911e84a09a staging: rts5208: Spacing
Adding space around operator for better readability and to stop
checkpatch check messages

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:01 +02:00
Wayne Porter 117b6038b2 staging: rts5208: Unnecessary parentheses
Remove parentheses found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:00 +02:00
Wayne Porter e379c79bae staging: rts5208: Parenthesis alignment
Fix alignment to stop checkpath check messages

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:59 +02:00
Wayne Porter f5becff728 staging: rts5208: Unecessary parantheses
Remove parentheses to stop checkpatch check message

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:58 +02:00
Wayne Porter 5d2de0d9b7 staging: rts5208: Parenthesis alignment
Matching open parenthesis

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:57 +02:00
Wayne Porter 2c6b3b9347 staging: rts5208: Prefer using BIT macro
Replace all instances of (1 << x) with BIT(x) to satisfy checkpatch
check messages

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:56 +02:00
Wayne Porter 15794518d7 staging: rts5208: Long lines fixes
Break up long lines in rtsx_chip.h

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:55 +02:00
Wayne Porter 33f28123af staging: rts5208: Alignment fixes
Fix alignment issues that checkpatch found

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:54 +02:00
Wayne Porter 3f19de3681 staging: rts5208: Add space around operator
Spaces are preferred around operators for readability

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:53 +02:00
Wayne Porter 44000fe6f1 staging: rts5208: Add braces to if()
Braces should be around every part of the if block and not just the else
if

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:52 +02:00
Wayne Porter f4bfffb959 staging: rts5208: Remove multiple assignment
Assign values to variables on their own lines instead of using multiple
assignment

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:51 +02:00
Wayne Porter 904af7d5b5 staging: rts5208: CamelCase fixes
Change camel case variables found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:50 +02:00
Wayne Porter 33a1b1cd2e staging: rts5208: Remove parentheses
Unnecessary parentheses found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:49 +02:00
Wayne Porter 3b8cd5aa17 staging: rts5208: Alignment fixes
Align to match open parenthesis, found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:48 +02:00
Wayne Porter 7fb7a2fc40 staging: rts5208: Fix typo in function name
Searched the entire kernel for any references to this function and it
appears safe to fix the typo

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:47 +02:00
Wayne Porter ea2030d5ae staging: rts5208: Alignment fix
Fix issue found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:46 +02:00
Wayne Porter c3cca2d1b4 staging: rts5208: Unnecessary parentheses cleanup
Remove parentheses found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:45 +02:00
Wayne Porter 5426c164ff staging: rts5208: Alignment fixes
Cleaning up checkpatch issues

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:44 +02:00
Wayne Porter fe421a75ec staging: rts5208: sd.c: Spacing cleanup
Add/remove spaces to make things more readable

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:43 +02:00
Wayne Porter 3c3776441f staging: rts5208: sd.c: Fix logical continuations
Checkpatch detected && at the beginning of new lines

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:42 +02:00
Wayne Porter 57a3fcfa6b staging: rts5208: sd.c: CamelCase fixes
Convert camel case lables to all lowercase

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:41 +02:00
Wayne Porter 7fbe04f1ce staging: rts5208: sd.c: Long line fixes
Break up lines over 80 characters

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:40 +02:00
Wayne Porter 20390dc72e staging: rts5208: sd.c: Alignment fixes
Lining up with open parenthesis found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:39 +02:00
Wayne Porter 33f2b12165 staging: rts5208: sd.c: Remove unnecessary parentheses
Cleanup of &(chip->sd_card) to remove parentheses where they are not
needed

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:37 +02:00
Wayne Porter e78bff3266 staging: rts5208: sd.h: Alignment fixes
Lining up code with open parenthses found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:36 +02:00
Wayne Porter 8c3c144bff staging: rts5208: spi.c: Alignment fixes
Lining up code with open parantheses found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:35 +02:00
Wayne Porter 4669f6e275 staging: rts5208: spi.c: Remove unnecessary parenthesis
Style warnings found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:34 +02:00
Dilek Uzulmez 673ec4e05e Staging: rts5208: Remove unnecessary parentheses
Problem found using checkpatch.pl
CHECK: Unnecessary parentheses around dev->dev_mutex

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:07 +02:00
Wayne Porter 6d2117f1a5 staging: rts5208: xd.c: Remove multiple assignments
Checkpatch found multiple assignments on one line so move
them to their own lines.

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:05 +02:00
Wayne Porter 40eeb86243 staging: rts5208: xd.c: Fix CamelCase
Covert CamelCase as checkpatch suggests

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:04 +02:00
Wayne Porter daaca111db staging: rts5208: xd.c: Clean up comparison to NULL
Checkpatch recommended changes

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:04 +02:00
Wayne Porter 14c42c79fe staging: rts5208: xd.c: Remove unnecessary parentheses
Issues found with checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:03 +02:00
Wayne Porter d554972076 staging: rts5208: Logical continuation fixes
Checkpatch detected multiple instances of logical continuation warnings

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:03 +02:00
Wayne Porter dd67ec8111 staging: rts5208: Alignment fix
Coding style checks found by checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:02 +02:00
Wayne Porter b32e807d26 staging: rts5208: xd.h: Alignment fix
Change alignment to match open parenthesis

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:01 +02:00
Wayne Porter 259334ed30 Staging: rts5208: Fix indentation warnings
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-02 17:14:03 +02:00
Namrata A Shettar 6c5d28f523 staging: rts5208: Replace explicit NULL comparison
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-02 17:14:03 +02:00
Namrata A Shettar 6d81bf2550 staging: rts5208: Add space around binary operators
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-10-02 17:14:03 +02:00
Sergio Paracuellos e453eecbe6 staging: rts5208: fix style warnings in xd.c
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-25 12:40:30 +02:00
Sergio Paracuellos e040b62683 staging: rts5208: fix style warnings in sd.c
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-25 12:40:30 +02:00
Sergio Paracuellos 9afccdfe48 staging: rts5208: fix line style warnings in spi.c
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-25 12:40:30 +02:00
Sergio Paracuellos aeb92aef03 staging: rts5208: remove not used typedef in rtsx_sys.h
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-25 12:40:30 +02:00
Sergio Paracuellos 55e94ccb43 staging: rts5208: fix comment blocks style in rtsx.h
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-25 12:40:30 +02:00
Sergio Paracuellos e89ac165a5 staging: rts5208: fix comment blocks style in rtsx_chip.h
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-25 12:40:30 +02:00
Sergio Paracuellos 20807e6ec4 staging: rts5208: avoid symbolic permissions in rtsx.c
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-25 12:40:30 +02:00
Sergio Paracuellos 8e7e0a9692 staging: rts5208: avoid new typedef in rtsx.h: rtsx_dev_t
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-25 12:40:30 +02:00
Rehas Sachdeva 7c7f236145 staging: rts5208: Remove space after cast
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-20 14:03:04 +02:00
Rehas Sachdeva eceef9a3f4 staging: rts5208: Use BIT(x) macro
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-20 14:03:04 +02:00
Rehas Sachdeva 0328217969 staging: rts5208: Put constant on right side of comparison
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-20 14:03:04 +02:00
Rehas Sachdeva bd778ef093 staging: rts5208: Fix indentation
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-20 14:03:04 +02:00
Rehas Sachdeva 50024433d4 staging: rts5208: Add spaces around operators
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-20 14:03:00 +02:00
Rehas Sachdeva c86bdd474a staging: rts5208: Remove unnecessary parentheses
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-20 14:02:59 +02:00
Sandhya Bankar 5173abfc05 Staging: rts5208: Add space around operator.
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-20 13:57:19 +02:00
Sandhya Bankar 8bee668de5 Staging: rts5208: rtsx: Use x instead of x != NULL.
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-20 13:57:19 +02:00
Sandhya Bankar f432bc8141 Staging: rts5208: ms: Use x instead of x != NULL.
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-20 13:57:19 +02:00
Cathal Mullaney e29cebe901 Staging: rts5208: rtsx_card.c: Fixed brace style issues
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-20 13:57:19 +02:00
Namrata A Shettar 2296f5215f staging: rts5208: rtsx_chip: Add space around binary operators
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-17 23:36:52 +02:00
Sergio Paracuellos 132aba090d staging: rts5208: make some vars to lower case to keep the style consistent
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-16 10:22:35 +02:00
MingChia Chung 228fc25904 staging: rts5208: Add two blank lines in comments.
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-09-01 17:44:01 +02:00
Louie Lu 10adcce696 staging: rts5208: Change data type to unsigned int.
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-21 18:37:36 +02:00
Quentin Lambert 0b25e9fa01 staging: rts5208/ms.c: add missing releases in mg_get_local_EKB and mg_get_ICV
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-21 18:37:36 +02:00
Quentin Lambert 541e4d2d1d staging: rts5208/ms.c: change the label name to respect the coding style
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-21 18:37:36 +02:00
Jonas Rickert d5b7d2b02c Staging: rts5208: fix double blank line coding style issues
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-08-21 18:37:36 +02:00
Manav Batra e0ab2c8ef5 staging: rts5208: alignment to match open paranthesis
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-29 17:58:02 -07:00
Nicholas Sim 649b55b426 staging: rts5208: ensure braces on all arms of if stmt
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-04-29 17:58:02 -07:00
Bhumika Goyal 143b3bf6d3 Staging: rts5208: rtsx_card.c: Remove unused function
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-29 12:45:23 -07:00
Bhumika Goyal 3cb61bdf14 Staging: rts5208: Remove unused functions
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-29 12:45:23 -07:00
Dilek Uzulmez de40f2ab97 Staging: rts5208: Add space around '+'
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-28 07:30:36 -07:00
Amitoj Kaur Chawla 80f10bcc7f staging: rts5208: Replace pci_enable_device with pcim_enable_device
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-11 22:09:09 -08:00
Bhaktipriya Shridhar e6e1d57e08 staging: rts5208: Change form of NULL comparisons
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-11 22:09:09 -08:00
Bhaktipriya Shridhar b242d05fa3 staging: rts5208: Remove NULL test before vfree
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-11 22:09:09 -08:00
Eva Rachel Retuya 7586170c84 staging: rts5208: simplify NULL tests
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-11 22:09:09 -08:00
Bhumika Goyal eff8bf8243 Staging: rts5208: Use min instead of ternary operator
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-11 22:09:09 -08:00
Janani Ravichandran 51a4731133 staging: rts5208: rtsx_transport.c: Drop void pointer cast
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-11 22:09:09 -08:00
Janani Ravichandran 86790d33da staging: rts5208: rtsx.c: Drop unneeded void pointer cast
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-11 22:09:09 -08:00
Amitoj Kaur Chawla b7a22f8d0a staging: rts5208: Remove unnecessary pci_set_drvdata()
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-11 22:09:09 -08:00
Dilek Uzulmez d1af6476e6 Staging: rts5208: Remove unnecessary parentheses
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-11 22:09:09 -08:00
Bhaktipriya Shridhar 040fa2217c staging: rts5208: Prefer using BIT macro
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-11 22:09:09 -08:00
Bhaktipriya Shridhar fdb78b64a7 staging: rts5208: Removed unnecessary return variable
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-03-11 22:09:09 -08:00
Shaun Ren 50dcad2a2c Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL
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-20 15:35:42 -08:00
Shaun Ren 69e3bc543c Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses
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-20 15:35:42 -08:00
Shaun Ren c1a018eee3 Staging: rts5208: rtsx_transport.c: Fix label naming convention
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-20 15:35:42 -08:00
Shaun Ren 4961c44e4b Staging: rts5208: rtsx_transport.c: Remove extra newlines
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-20 15:35:42 -08:00
Shaun Ren 010c7d2ffb Staging: rts5208: rtsx_transport.c: Add spaces around -
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-20 15:35:42 -08:00