summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rts5208/rtsx_transport.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: rts5208: rtsx_transport.c: Drop void pointer castJanani Ravichandran2016-03-111-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>
* staging: rts5208: Prefer using BIT macroBhaktipriya Shridhar2016-03-111-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>
* Staging: rts5208: rtsx_transport.c: Fix comparisons to NULLShaun Ren2016-02-201-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>
* Staging: rts5208: rtsx_transport.c: Remove unnecessary parenthesesShaun Ren2016-02-201-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>
* Staging: rts5208: rtsx_transport.c: Fix label naming conventionShaun Ren2016-02-201-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>
* Staging: rts5208: rtsx_transport.c: Remove extra newlinesShaun Ren2016-02-201-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>
* Staging: rts5208: rtsx_transport.c: Add spaces around -Shaun Ren2016-02-201-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>
* Staging: rts5208: rtsx_transport.c: Remove spaces after castsShaun Ren2016-02-201-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>
* Staging: rts5208: rtsx_transport.c: Align to open parenthesisShaun Ren2016-02-201-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>
* Staging: rts5208: rtsx_transport.c: Cleanup commentsShaun Ren2016-02-201-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>
* Staging: rts5208: remove unnecessary paranthesesHaneen Mohammed2016-02-091-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>
* Staging: rts5208: fix check for dma mapping errorHaneen Mohammed2016-02-091-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>
* staging: rts5208: Remove TRACE_RET and TRACE_GOTO macrosJoe Perches2015-03-261-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>
* staging: rts5208: remove extra parentheses around left bit shift operationAya Mahfouz2015-03-061-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>
* staging: rts5208: use msecs_to_jiffies for timeoutsNicholas Mc Guire2015-01-251-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>
* Staging: rts5028: rtsx_transport.c: fixed a brace coding style issue.Surya Seetharaman2014-10-281-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>
* Staging: rts5208: Removed unnecessary parenthesesTina Johnson2014-10-281-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>
* Staging: rts5208: Replace custom macro with dev_dbgFabio Falzoi2014-07-301-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>
* staging: rts5208: Fixed line over 80 characters.Keerthimai Janarthanan2014-03-081-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>
* staging: rts5208: add support for rts5208 and rts5288Micky Ching2013-11-251-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>
OpenPOWER on IntegriCloud