Commit graph

248 commits

Author SHA1 Message Date
Hannes Reinecke
13beb929ab scsi: rtsx: drop bus reset function
Function is a stub, so can as well be dropped.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-25 17:21:11 -04:00
Colin Ian King
34ff1bf492 staging/rts5208: fix incorrect shift to extract upper nybble
The mask of sns_key_info1 suggests the upper nybble is being extracted
however the following shift of 8 bits is too large and always results in
0.  Fix this by shifting only by 4 bits to correctly get the upper nybble.

Detected by CoverityScan, CID#142891 ("Operands don't affect result")

Fixes: fa590c222f ("staging: rts5208: add support for rts5208 and rts5288")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-20 11:08:41 -07:00
Gaurav Pathak
2d77259135 staging: rts5208: Change fixed function names with "%s: ", __func__
staging: rts5208: Fix coding style issue caught by checkpatch.pl related to
function name in debug print

Signed-off-by: Gaurav Pathak <gauravpathak129@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30 08:29:31 -07:00
Daniel Micay
88a5b39b69 staging/rts5208: Fix read overflow in memcpy
Noticed by FORTIFY_SOURCE, this swaps memcpy() for strncpy() to zero-value
fill the end of the buffer instead of over-reading a string from .rodata.

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
[kees: wrote commit log]
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:16:10 +02:00
Jia-Ju Bai
498c4b4e9c staging: rt5208: Fix a sleep-in-atomic bug in xd_copy_page
The driver may sleep under a spin lock, and the function call path is:
rtsx_exclusive_enter_ss (acquire the lock by spin_lock)
  rtsx_enter_ss
    rtsx_power_off_card
      xd_cleanup_work
        xd_delay_write
          xd_finish_write
            xd_copy_page
              wait_timeout
                schedule_timeout --> may sleep

To fix it, "wait_timeout" is replaced with mdelay in xd_copy_page.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:16:10 +02:00
Jia-Ju Bai
ed99f0141b rts5208: Fix a sleep-in-atomic bug in rtsx_exclusive_enter_ss
The driver may sleep under a spin lock, and the function call path is:
rtsx_exclusive_enter_ss (acquire the lock by spin_lock)
  rtsx_enter_ss
    rtsx_power_off_card
      sd_cleanup_work
        sd_stop_seq_mode
          sd_switch_clock
            sd_ddr_tuning
              sd_ddr_pre_tuning_tx
                sd_change_phase
                  wait_timeout
                    schedule_timeout --> may sleep

To fix it, "wait_timeout" is replaced with mdelay in sd_change_phase.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:52:00 +09:00
Jia-Ju Bai
385cab7c71 rts5208: Fix a sleep-in-atomic bug in sd_power_off_card3v3
The driver may sleep under a spin lock, and the function call path is:
rtsx_exclusive_enter_ss (acquire the lock by spin_lock)
  rtsx_enter_ss
    rtsx_power_off_card
      sd_power_off_card3v3
        wait_timeout
          schedule_timeout --> may sleep

To fix it, "wait_timeout" is replaced with mdelay in sd_power_off_card3v3.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 17:52:00 +09:00
Andrea della Porta
1bb90b68ab staging: rts5208: ms.c fixed checkpatch warning - using __func__ instead of hardcoded name
staging: rts5208: ms.c Fixed checkpatch warning:
WARNING: Prefer using "%s", __func__ to embedded function names
#2597: FILE: rts5208/ms.c:2597:
+       dev_dbg(rtsx_dev(chip), "ms_build_l2p_tbl: %d\n", seg_no);

Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 17:05:59 +02:00
Arushi Singhal
4f8f316be6 staging: rts5208: Replace a bit shift by a use of BIT.
This patch replaces bit shifting on 1 with the BIT(x) macro.
This was done with coccinelle:
@@
constant c;
@@

-1 << c
+BIT(c)

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:25:33 +01:00
simran singhal
e5619b1350 staging: rts5208: Remove unnecessary cast on void pointer
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|
- (T*)
  e
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 18:50:05 +01:00
Colin Ian King
de9a009b93 staging: rts5208: remove unncessary result set and check, just return SUCCESS
Minor clean up, there is no need to assign result to zero, then
check if it is less than zero. Just return SUCCESS.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03 13:01:36 +01:00
Colin Ian King
041b67b389 staging: rts5208: remove redundant retval status check
The retval status checks in the proceeding do loop return out
of function ms_read_attritbute_info if there is an error
condition,  thus we never reach the end of the loop with
retval failed status.  Therefore, the retval status check
at end of the do loop is redundant and can be removed.

Detected with CoverityScan, CID#143000 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03 13:01:36 +01:00
Omri Arad
3331f9cbdd drivers: staging: rts5208: fix endianness handling
'cb' and 'sgb' were assigned __le values but were not marked as such,
this fixes the following sparse warnings:

drivers/staging/rts5208/rtsx_transport.c:220:34: warning: incorrect type in assignment (different base types)
drivers/staging/rts5208/rtsx_transport.c:220:34:    expected unsigned int [unsigned] [usertype] <noident>
drivers/staging/rts5208/rtsx_transport.c:220:34:    got restricted __le32 [usertype] <noident>
drivers/staging/rts5208/rtsx_transport.c:319:44: warning: incorrect type in assignment (different base types)
drivers/staging/rts5208/rtsx_transport.c:319:44:    expected unsigned long long [unsigned] [long] [long long] [usertype] <noident>
drivers/staging/rts5208/rtsx_transport.c:319:44:    got restricted __le64 [usertype] <noident>
drivers/staging/rts5208/rtsx_transport.c:319:44: warning: incorrect type in assignment (different base types)
drivers/staging/rts5208/rtsx_transport.c:319:44:    expected unsigned long long [unsigned] [long] [long long] [usertype] <noident>
drivers/staging/rts5208/rtsx_transport.c:319:44:    got restricted __le64 [usertype] <noident>

Signed-off-by: Omri Arad <omriarad3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-16 18:08:57 +01:00
Wei Yongjun
ef5aa934cf staging: rts5208: rtsx.c: Fix invalid use of sizeof in rtsx_probe()
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.

Fixes: 2eb9d8cbb3 ("staging: rts5208: rtsx.c: Alloc sizeof struct")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 09:59:48 +02:00
Wayne Porter
b41514b1de staging: rts5208: rtsx.c: Alignment fix
Line goes too long when aligned with parenthesis, so moved to 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:20 +02:00
Wayne Porter
88936fe853 staging: rts5208: rtsx_chip.c: Long lines
Fix lines that go over 80 characters to stop warnings from checkpatch

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:19 +02:00
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