summaryrefslogtreecommitdiffstats
path: root/drivers/staging/mt7621-mmc/dbg.c
AgeCommit message (Collapse)Author
2019-04-03staging: m57621-mmc: delete driver from the tree.Greg Kroah-Hartman
The license text in this driver is "interesting" and not really obvious that it is supposed to be able to be distributed in the kernel source tree. Yes, the MODULE_LICENSE() text says GPL, so it's probably ok, but to be safe, I am deleting this driver. I will be glad to add it back if the license is properly sorted out, but for now, this isn't worth the potential risk, I should have never taken it in the first place. Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: NeilBrown <neil@brown.name> Cc: George Hilliard <thirtythreeforty@gmail.com> Cc: "Christian Lütke-Stetzkamp" <christian@lkamp.de> Cc: Nishad Kamdar <nishadkamdar@gmail.com> Cc: Sergej Perschin <ser.perschin@gmail.com> Cc: John Crispin <blogic@openwrt.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-22staging: mt7621-mmc: Fix warning when reloading module with debug msgs enabledGeorge Hilliard
The kernel complained: [ 510.277151] WARNING: CPU: 0 PID: 395 at fs/proc/generic.c:360 proc_register+0xf0/0x108 [ 510.292891] proc_dir_entry '/proc/msdc_debug' already registered when doing a modprobe/rmmod/modprobe of this module if debug messages are compiled in. Fix this by removing the proc entry when the module is unloaded. Signed-off-by: George Hilliard <thirtythreeforty@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-20staging: mt7621-mmc: fix unused variable compiler warningGeorge Hilliard
The compiler complains: drivers/staging/mt7621-mmc/dbg.c: In function ‘msdc_debug_proc_write’: drivers/staging/mt7621-mmc/dbg.c:237:12: warning: unused variable ‘size’ [-Wunused-variable] int mode, size; ^~~~ drivers/staging/mt7621-mmc/dbg.c:237:6: warning: unused variable ‘mode’ [-Wunused-variable] int mode, size; ^~~~ Remove these declarations. Signed-off-by: George Hilliard <thirtythreeforty@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: mt7621-mmc: delele extra blank linesWentao Cai
Delete extra blank lines to mute checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Wentao Cai <etsai042@gmail.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-mmc: Remove unused including <linux/version.h>YueHaibing
Remove including <linux/version.h> that don't need it. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: mt7621-mmc: fix compile warnging: cmd_bufNeilBrown
cmd_buf is only used when MT6575_SD_DEBUG is defined. So only declare it in that case. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14staging: mt7621-mmc: Fix lines over 80 characters in dbg.cNishad Kamdar
This patch fixes lines over 80 characters in dbg.c. Issue found by checkpatch. Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-09staging: mt7621-mmc: Remove #if 0 blocks in dbg.cNishad Kamdar
This patch removes #if 0 code blocks and usages of functions defined in the #if 0 blocks in dbg.c Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27staging: mt7621-mmc: place a check for sscanfSumit Pundir
Placed a check for the return value of sscanf. -EINVAL is returned if the value is anything other than expected. Reported by checkpatch.pl Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06staging: mt7621-mmc: Fix printk() facility levelSergej Perschin
The patch fixes the following issue: WARNING: printk() should include KERN_<LEVEL> facility level Signed-off-by: Sergej Perschin <ser.perschin@gmail.com> Signed-off-by: Marcel Budoj <marcel.budoj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-01staging: mt7621-mmc: Fix line size exceeding 80 columnsSankalp Negi
This patch fixes checkpatch.pl warning and check: WARNING: line over 80 characters CHECK: Alignment should match open parenthesis Signed-off-by: Sankalp Negi <sankalpnegi2310@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: mt7621-mmc: Remove unused global dma_sizeChristian Lütke-Stetzkamp
The global variable dma_size was previously used to select DMA or non-DMA transfer mode based on the size of the data that should be transferred. This option was removed preivously, so the variable is not used any more and can be removed. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: mt7621-mmc: Remove transfer mode setting variableChristian Lütke-Stetzkamp
Currently the transfer mode can be chosen between DMA, a size dependent mode and non-DMA by writing to a proc file. The upstream driver mtk-sd uses DMA all times. The previous patch removed the ability to set that option. Now the remaining uses of the transfer mode setting variable are cleaned up, because it cannot be changed any more. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: mt7621-mmc: Remove transfer mode setting from procChristian Lütke-Stetzkamp
Currently the transfer mode can be chosen between DMA, a size dependent mode and non-DMA by writing to a proc file. The upstream driver mtk-sd uses DMA all times. There is no apparent reason why somebody would like to change the transfer mode and the position of the setting in the debug part of the driver also indicates, that the option was used for debugging purposes. So it is removed to clean up the driver and bring it more in line with the upstream one. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Change default transfer mode to DMAChristian Lütke-Stetzkamp
The current default transfer is to use DMA or not depending on the size of the data. The upstream driver mtk-sd uses DMA all times, change the standard mode here to DMA for testing, if there are any performance problems with DMA for small data sizes. If not, the option for transfer mode should be removed in the future, Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Fix: copy_from_user() returns a positive valueChristian Lütke-Stetzkamp
copy_from_user() returns a positive value in case of an error, to fix this the check is turned around, also a better return value is chosen. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Fix debug file world writableChristian Lütke-Stetzkamp
Currently the debug file in proc fs is world writable, remove the access for other. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Remove error message in debugChristian Lütke-Stetzkamp
If the debug file in proc fs is not successfully created current code prints an error message, this is removed. de is also not an error pointer, so the IS_ERR() call leads to a static checker warning. The unused return value of the msdc_debug_proc_init function is also removed. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Replace seq_printf with seq_puts where possibleChristian Lütke-Stetzkamp
Replace seq_printf with seq_puts when the string is const. Fix checkpatch warning: PREFER_SEQ_PUTS Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Fix style of bracesChristian Lütke-Stetzkamp
Fix checkpatch errors, warnings, checks about braces: BRACES, ELSE_AFTER_BRACE, OPEN_BRACE Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Remove global initialise to 0Christian Lütke-Stetzkamp
Fix checkpatch error: GLOBAL_INITIALISERS Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Fix trailing statementsChristian Lütke-Stetzkamp
Fix checkpatch error: TRAILING_STATEMENTS Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Remove unnecessary typedefsChristian Lütke-Stetzkamp
Fixes checkpatch warning: NEW_TYPEDEFS Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Fix Pointer LocationChristian Lütke-Stetzkamp
Fix checkpatch error: POINTER_LOCATION Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Fix spacingChristian Lütke-Stetzkamp
Fixes checkpatch errors, warnings, checks: SPACING, LEADING_SPACE, LINE_SPACING Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Fix indent for dbg.cChristian Lütke-Stetzkamp
This fixes the indentaions in the file dbg.c Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: mt7621-mmc: Remove whitespace errors in dbg.cChristian Lütke-Stetzkamp
The whitespace errors in the file dbg.c are fixed by using the cleanfile script. Indentations with whitespaces are not changed in this patch. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-19staging: mt7621-mmc: MIPS: ralink: add sdhci for mt7620a SoCJohn Crispin
NeilBrown: Added range-check on pdev->id before assigning ot host->id of_dma_configure() sets a default ->dma_mask of DMA_BIT_MASK(32), claiming devices can DMA from the full 32bit address space. The mtk-mmc driver does not support access to highmem pages, so it is really limited to the bottom 512M (actually 448M due to 64M of IO space). Setting ->dma_mask to NULL causes mmc_setup_queue() to fall-back to using BLK_BOUNCE_HIGH to tell the block layer to use a bounce-buffer for any highmem pages requiring IO. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>