summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rts5208/rtsx_transport.c
AgeCommit message (Collapse)AuthorFilesLines
2020-09-13staging: rts5208: rtsx_transport.c: Fix lines ending with parenthesesSebastian Fuentes1-12/+12
Addresses checkpatch.pl check "Lines should not end with '('" Signed-off-by: Sebastian Fuentes <sefu1789@gmail.com> Link: https://lore.kernel.org/r/20200912060741.GA6274@ubuntu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-02staging: rts5208: clear alignment style issuesTomer Samara1-1/+1
Clear checkpatch alignment style issues in rtsx_transport.c. CHECK: Alignment should match open parenthesis Signed-off-by: Tomer Samara <tomersamara98@gmail.com> Link: https://lore.kernel.org/r/20200801210056.GA305272@tsnow Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-29staging: rts5208: Fix alignment and a line ending with a '('Frank A. Cancio Bello1-2/+2
checkpatch messaages: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com> Link: https://lore.kernel.org/r/20191028161401.sjhp6qivm6huxpxm@linux-kernel-dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-03staging: rts5208: Fix checkpath warningP SAI PRASANTH1-3/+2
This patch fixes the following checkpath warning in the file drivers/staging/rts5208/rtsx_transport.c:546 WARNING: line over 80 characters + option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA; Signed-off-by: P SAI PRASANTH <saip2823@gmail.com> Link: https://lore.kernel.org/r/20190831034926.GA17810@dell-inspiron Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-03staging: rts5208: Fixed checkpath warning.Prakhar Sinha1-4/+3
This patch solves the following checkpatch.pl's message in drivers/staging/rts5208/rtsx_transport.c:397. WARNING: line over 80 characters + option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA; Signed-off-by: Prakhar Sinha <prakharsinha2808@gmail.com> Link: https://lore.kernel.org/r/20190830121656.GA2740@MeraComputer Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-05Staging: rts5208: Add SPDX license tagsKim Bradley1-13/+1
Add SPDX license tags to remove checkpatch SPDX warnings. Signed-off-by: Kim Bradley <kim.jamie.bradley@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28staging: rtsx: remove rtsx_trace() and related codeArnd Bergmann1-1/+0
The driver has rather excessive amount of tracing code, which would be better done using ftrace. This is obviously not a main feature of the driver, and it should work just as well without it. Removing it saves over 1300 lines of code and likely makes the driver a bit faster by avoiding lots of calls into the timekeeping code. I came across this while cleaning up the last users of the deprecated getnstimeofday64() function, of which there is one in the now-removed get_current_time() function of the rtsx driver that was only used for tracing. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-01staging: rts5208: rename SG_END macroArnd Bergmann1-5/+5
A change to the generic scatterlist code caused a conflict with the rtsx card reader driver: In file included from drivers/staging/rts5208/rtsx.h:180, from drivers/staging/rts5208/rtsx.c:28: drivers/staging/rts5208/rtsx_chip.h:343: error: "SG_END" redefined [-Werror] This changes one instance of the driver to prefix SG_END and related constants. Fixes: 723fbf563a6a ("lib/scatterlist: Add SG_CHAIN and SG_END macros for LSB encodings") Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-03-09staging: rts5208: Remove unnecessary cast on void pointersimran singhal1-2/+1
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-01-16drivers: staging: rts5208: fix endianness handlingOmri Arad1-2/+2
'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>
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: 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-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>
2016-02-20Staging: rts5208: rtsx_transport.c: Align to open parenthesisShaun Ren1-28/+41
This patch fixes the alignment issue reported by checkpatch.pl: CHECK: Alignment should match open parenthesis Add a unsigned char *sgbuffer in rtsx_stor_access_xfer_buffer to make the following memcpy logic easier to read. Add a struct scatterlist *sg in the use_sg branch of rtsx_transfer_data_partial to make the parameters of the rtsx_transfer_sglist_adma_partial call fit in 80 character lines after aligning them to the open parenthesis. Refactor memcpy logic in rtsx_stor_access_xfer_buf to make it more legible. 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: Cleanup commentsShaun Ren1-26/+27
This patch fixes all multiline comments to conform to the coding style, which states that multiline comments should start with "/*" and end with "*/" on a separate line. Also cleans up some comments to make them more clear and/or reflect what the code is doing. Signed-off-by: Shaun Ren <shaun.ren@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-09Staging: rts5208: remove unnecessary paranthesesHaneen Mohammed1-1/+1
This patch removes unnecessary parantheses around rtsx->pci->dev. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-09Staging: rts5208: fix check for dma mapping errorHaneen Mohammed1-1/+1
use dma_mapping_error() instead of comparing the returned address with zero after dma_map_single(). Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26staging: rts5208: Remove TRACE_RET and TRACE_GOTO macrosJoe Perches1-5/+2
Remove these flow hiding macros. Miscellanea: o Add a macro and function to replace a large inline o Simplify #includes o Add trace.c and update Makefile o Remove static inline filename function and use kbasename instead This reduces object size quite a lot: ~350KB (x86-64 allyesconfig) $ size drivers/staging/rts5208/built-in.o* text data bss dec hex filename 248385 36728 77888 363001 589f9 drivers/staging/rts5208/built-in.o.new 506691 83352 115896 705939 ac593 drivers/staging/rts5208/built-in.o.old Done via coccinelle script and some typing. @@ expression chip; expression ret; @@ - TRACE_RET(chip, ret); + rtsx_trace(chip); + return ret; @@ expression chip; identifier label; @@ - TRACE_GOTO(chip, label); + rtsx_trace(chip); + goto label; Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06staging: rts5208: remove extra parentheses around left bit shift operationAya Mahfouz1-1/+1
Removes extra parentheses around bitwise left shift operations. The case handled is when resultant value is assigned to a variable. The issue was detected and resolved using the following coccinelle script: @@ expression e, e1; constant c; @@ e = -(e1 +e1 << -c); +c; @@ identifier i; constant c; type t; expression e; @@ t i = -(e +e << -c); +c; @@ expression e, e1; identifier f; constant c; @@ e1 = f(..., -(e +e << -c) +c ,...); Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: rts5208: use msecs_to_jiffies for timeoutsNicholas Mc Guire1-6/+6
This is only an API consolidation and should make things more readable Converting milliseconds to jiffies by val * HZ / 1000 is technically not wrong but msecs_to_jiffies(val) is the cleaner solution and handles corner cases correctly. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28Staging: rts5028: rtsx_transport.c: fixed a brace coding style issue.Surya Seetharaman1-4/+2
Removed unwanted braces using checkpatch.pl tool. Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28Staging: rts5208: Removed unnecessary parenthesesTina Johnson1-1/+1
Unnecessary parentheses around the right hand side of an assignment is removed using the following semantic patch: @@ identifier x,f; constant C; @@ ( -x = (f / C ); +x = f / C ; | -x = (f % C ); +x = f % C ; ) Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30Staging: rts5208: Replace custom macro with dev_dbgFabio Falzoi1-22/+33
Use dev_dbg macro to control tracing verbosity through dynamic debug facility. Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: rts5208: Fixed line over 80 characters.Keerthimai Janarthanan1-2/+2
Fixes the following checkpatch warning: WARNING: line over 80 characters. Signed-off-by: Keerthimai Janarthanan <keerthimaipb@gmail.com> Reviewed-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25staging: rts5208: add support for rts5208 and rts5288Micky Ching1-0/+769
There are still many rts5208/5288 card readers being used, but no drivers are supported them in kernel now. This driver can make a great convenience for people who use them. Many other rts-series card reader are supported by mfd driver, but due to much difference with others, rts5208/5288 can not add into mfd driver pretty now, so we provide a separated driver here to support the device. Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>