#
37c56de8 |
|
21-Sep-2021 |
Benjamin Philip <benjamin.philip495@gmail.com> |
staging: rts5208: remove unnecessary parentheses in rtsx_scsi.c This commit removes unnecessary parentheses, that have been flagged by checkpatch.pl in rtsx_scsi.c. Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com> Link: https://lore.kernel.org/r/2d2e57eb448239d3b0105fcda2852137eaee4f5d.1632209460.git.benjamin.philip495@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
cbe34165 |
|
17-Aug-2021 |
Kees Cook <keescook@chromium.org> |
staging: rts5208: Fix get_ms_information() heap buffer size Fix buf allocation size (it needs to be 2 bytes larger). Found when __alloc_size() annotations were added to kmalloc() interfaces. In file included from ./include/linux/string.h:253, from ./include/linux/bitmap.h:10, from ./include/linux/cpumask.h:12, from ./arch/x86/include/asm/paravirt.h:17, from ./arch/x86/include/asm/irqflags.h:63, from ./include/linux/irqflags.h:16, from ./include/linux/rcupdate.h:26, from ./include/linux/rculist.h:11, from ./include/linux/pid.h:5, from ./include/linux/sched.h:14, from ./include/linux/blkdev.h:5, from drivers/staging/rts5208/rtsx_scsi.c:12: In function 'get_ms_information', inlined from 'ms_sp_cmnd' at drivers/staging/rts5208/rtsx_scsi.c:2877:12, inlined from 'rtsx_scsi_handler' at drivers/staging/rts5208/rtsx_scsi.c:3247:12: ./include/linux/fortify-string.h:54:29: warning: '__builtin_memcpy' forming offset [106, 107] is out of the bounds [0, 106] [-Warray-bounds] 54 | #define __underlying_memcpy __builtin_memcpy | ^ ./include/linux/fortify-string.h:417:2: note: in expansion of macro '__underlying_memcpy' 417 | __underlying_##op(p, q, __fortify_size); \ | ^~~~~~~~~~~~~ ./include/linux/fortify-string.h:463:26: note: in expansion of macro '__fortify_memcpy_chk' 463 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ | ^~~~~~~~~~~~~~~~~~~~ drivers/staging/rts5208/rtsx_scsi.c:2851:3: note: in expansion of macro 'memcpy' 2851 | memcpy(buf + i, ms_card->raw_sys_info, 96); | ^~~~~~ Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20210818044252.1533634-1-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
bb1e6779 |
|
22-Oct-2018 |
Kim Bradley <kim.jamie.bradley@gmail.com> |
Staging: rts5208: Add SPDX license tags 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>
|
#
9f902b49 |
|
20-Sep-2018 |
Aymen Qader <qader.aymen@gmail.com> |
staging: rts5208: Remove unnecessary braces {} This patch fixes the checkpatch.pl warning "braces {} are not necessary" in the rts5208 driver. Mostly applies to single-line return/goto if blocks. Signed-off-by: Aymen Qader <qader.aymen@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
c238d7b1 |
|
18-Jun-2018 |
Arnd Bergmann <arnd@arndb.de> |
staging: rtsx: remove rtsx_trace() and related code 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>
|
#
34ff1bf4 |
|
18-Aug-2017 |
Colin Ian King <colin.king@canonical.com> |
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: fa590c222fba ("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>
|
#
88a5b39b |
|
05-Jun-2017 |
Daniel Micay <danielmicay@gmail.com> |
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>
|
#
7314203b |
|
11-Oct-2016 |
Wayne Porter <wporter82@gmail.com> |
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>
|
#
44000fe6 |
|
11-Oct-2016 |
Wayne Porter <wporter82@gmail.com> |
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>
|
#
f4bfffb9 |
|
11-Oct-2016 |
Wayne Porter <wporter82@gmail.com> |
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>
|
#
904af7d5 |
|
11-Oct-2016 |
Wayne Porter <wporter82@gmail.com> |
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>
|
#
33a1b1cd |
|
11-Oct-2016 |
Wayne Porter <wporter82@gmail.com> |
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>
|
#
3b8cd5aa |
|
11-Oct-2016 |
Wayne Porter <wporter82@gmail.com> |
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>
|
#
7fb7a2fc |
|
11-Oct-2016 |
Wayne Porter <wporter82@gmail.com> |
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>
|
#
6c5d28f5 |
|
29-Sep-2016 |
Namrata A Shettar <namrataashettar@gmail.com> |
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>
|
#
6d81bf25 |
|
29-Sep-2016 |
Namrata A Shettar <namrataashettar@gmail.com> |
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>
|
#
10adcce6 |
|
15-Aug-2016 |
Louie Lu <louie.lu@hopebaytech.com> |
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>
|
#
d5b7d2b0 |
|
30-Jul-2016 |
Jonas Rickert <jrickertkc@gmail.com> |
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>
|
#
7586170c |
|
27-Feb-2016 |
Eva Rachel Retuya <eraretuya@gmail.com> |
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>
|
#
fdb78b64 |
|
21-Feb-2016 |
Bhaktipriya Shridhar <bhaktipriya96@gmail.com> |
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>
|
#
8ee0df0d |
|
16-May-2015 |
Akinobu Mita <akinobu.mita@gmail.com> |
staging: rts5208: fix transfer length 0 for 6-byte r/w commands For 6-byte r/w commands, transfer length 0 means 256 blocks of data, not 0 block. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Micky Ching <micky_ching@realsil.com.cn> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-scsi@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
031366ea |
|
25-Mar-2015 |
Joe Perches <joe@perches.com> |
staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros 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>
|
#
11201769 |
|
04-Mar-2015 |
Quentin Lambert <lambert.quentin@gmail.com> |
staging: rts5208: Convert variable from int to bool and propagate the change to function parameters This patch convert local variables declared as int into booleans. It also propagates the conversion when these variables were used as function parameters. Coccinelle was used to generate this patch. Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
de904bf0 |
|
04-Mar-2015 |
Quentin Lambert <lambert.quentin@gmail.com> |
staging: rts5208: Convert non-returned local variable to boolean when relevant This patch was produced using Coccinelle. A simplified version of the semantic patch is: @r exists@ identifier f; local idexpression u8 x; identifier xname; @@ f(...) { ...when any ( x@xname = 1; | x@xname = 0; ) ...when any } @bad exists@ identifier r.f; local idexpression u8 r.x expression e1 != {0, 1}, e2; @@ f(...) { ...when any ( x = e1; | x + e2 ) ...when any } @depends on !bad@ identifier r.f; local idexpression u8 r.x; identifier r.xname; @@ f(...) { ... ++ bool xname; - int xname; <... ( x = - 1 + true | x = - -1 + false ) ...> } Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
24f45523 |
|
17-Feb-2015 |
Haneen Mohammed <hamohammed.sa@gmail.com> |
Staging: rts5208: Remove braces around single if-statement This patch removes unneeded braces around a single if-statement. This problem was found using checkpatch.pl. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
7ba75289 |
|
04-Oct-2014 |
Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> |
staging: rts5208: Delete braces are not necessary Fix checkpatch.pl warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
07f113b5 |
|
02-Oct-2014 |
Roxana Blaj <roxanagabriela10@gmail.com> |
staging: rts5208: remove unnecessary else This fixes the checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: Roxana Blaj <roxanagabriela10@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
bb0f20a7 |
|
29-Sep-2014 |
Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> |
staging: rts5208: Fix missing blank line warning. Fixes "Missing a blank line after declarations" checkpatch.pl warning in rtsx_scsi.c Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
69b8b224 |
|
05-Aug-2014 |
Fabio Falzoi <fabio.falzoi84@gmail.com> |
Staging: rts5208: Use dev_dbg and print_hex_dump_bytes to dump memory Use dev_dbg with %*ph format specifier and print_hex_dump_bytes to dump memory instead of relying on custom macro. Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
bf6c0d11 |
|
29-Jul-2014 |
Fabio Falzoi <fabio.falzoi84@gmail.com> |
Staging: rts5208: Replace custom macro with dev_dbg 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>
|
#
9036b4e9 |
|
29-Jul-2014 |
Fabio Falzoi <fabio.falzoi84@gmail.com> |
Staging: rts5208: Remove useless debug prints Remove all debug printks used just to mark when we enter a function. Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
cd5b8f90 |
|
05-Mar-2014 |
Georgiana Rodica Chelu <georgiana.chelu93@gmail.com> |
staging/rts5208/rtsx_scsi.c: Remove unnecessary parentheses Remove unnecessary parentheses from staging/rts5208/rtsx_scsi.c Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
fa590c22 |
|
12-Nov-2013 |
Micky Ching <micky_ching@realsil.com.cn> |
staging: rts5208: add support for rts5208 and rts5288 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>
|