In the msdc_drv_pm function the variable mmc is dereferenced before
checked. Reordering fixes that.
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
Reviewed-by: NeilBrown <n...@brown.name>
---
drivers/staging/m
The card_workqueue field of msdc_host is already if 0'd out and there
are no references to it in the code (not even in unused code), so
remove it.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
Reviewed-by: NeilBrown <n...@brown.com>
---
drivers/staging/mt7621-mmc/mt6
. The use of the raw access functions is changed to use the
non-raw ones.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
Reviewed-by: NeilBrown <n...@brown.com>
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 33 +++-
drivers/staging/mt7621-mmc/sd.c
In the current code there are '#if 0' out references on using a
tasklet instead of delayed_work. Removing these improves readability.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
Reviewed-by: NeilBrown <n...@brown.com>
---
drivers/staging/mt7621-mmc/mt6575_sd.h |
The functions msdc_command_resp and msdc_do_request are always called
with the host->lock lock held. By adding annotations, sparse is
informed about that.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
Reviewed-by: NeilBrown <n...@brown.com>
---
drivers/staging/mt76
This series contains the patches from previous series which hasn't
been applied. Most of them are just rebased. Only the commit messages
of 2 and 3 have been corrected as suggested by reviewers.
Christian Lütke-Stetzkamp (8):
staging: mt7621-mmc: Fix dereference before check in msdc_drv_pm
Currently the dma direction is manually determined by the read status,
there is a more portable function for it, mmc_get_dma_dir, use it.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
Reviewed-by: NeilBrown <n...@brown.com>
---
drivers/staging/mt7621-mmc/sd.c | 9
.name>
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index ae70f9d0b346..a003f8324088 100644
--- a/driv
On Wed, Apr 25, 2018 at 01:02:31PM +1000, NeilBrown wrote:
> On Wed, Apr 18 2018, Christian Lütke-Stetzkamp wrote:
>
> > The msdc_init_gpd_bd function is currently hard to read, because of
> > old, commented out code and a while loop, where a for loop is much
> >
On Mon, Apr 02, 2018 at 01:41:33PM +1000, NeilBrown wrote:
> On Mon, Apr 02 2018, Sean Wang wrote:
> > Hi, Neil
> >
> > Forgive me I cannot find the cover letter in the original series in my
> > mailbox to make a reply, so I rudely made here just letting you know
> > something good to the growth
Remove the owner assignment form the platform driver as
platform_driver_register() already initializes the owner.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/mt7621-mmc/
In case of dma_alloc_coherent failing the current code just called
BUG_ON. By adding error handling for that case this can be avoided.
This also fixes a memory leek in case of a fail later on in the probe
function.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/s
If the base address is not successfully obtained in the probe
function, then the mmc_host struct is not freed. Adding an exit for
that case fixes the bug.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 7 +--
1 file changed, 5 inse
In the probe function, pdev->dev.platform_data is set to _hw,
but the only get access to that is also in the probe function. So that
assignment is removed. The msdc0_hw structure is still available to the
driver as part of the msdc_host structure.
Signed-off-by: Christian Lütke-Stetzkamp <
Fixes checkpatch warning: NEW_TYPEDEFS
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/dbg.c | 2 +-
drivers/staging/mt7621-mmc/dbg.h | 11 +-
drivers/staging/mt7621-mmc/mt6575_sd.h | 305 +++--
d
Cleanup the mt_msdc_init function, remove excceding printk.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
This fixes the indentaions in the file dbg.c
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/dbg.c | 258 +++
1 file changed, 129 insertions(+), 129 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/d
Fix checkpatch error: TRAILING_STATEMENTS
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/dbg.c | 25 ++---
drivers/staging/mt7621-mmc/dbg.h | 3 ++-
drivers/staging/mt7621-mmc/sd.c | 39 ++--
Current code calls release_mem_regin on driver remove without
requesting it explicit first. The region is only requested via
devm_ioremap_resource and that releases it automatically. Removing the
release_mem_region calls fixes this.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp
The dma_alloc_coherent (and also dma_free_coherent) should get the
device, the dma memory is allocated for as the first parameter.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 18 --
1 file changed, 12 insertions
The whitespace errors in the file board.h are fixed by using the
cleanfile script. Indentations with whitespaces are not changed
in this patch.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/board.h | 7 +++
1 file changed, 3 insertions
Fix checkpatch errors, warnings, checks about braces:
BRACES, ELSE_AFTER_BRACE, OPEN_BRACE
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/dbg.c | 31 +++
drivers/staging/mt7621-mmc/mt6575_sd.h | 3 +-
drivers/staging/mt7621-mm
-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 25 -
1 file changed, 4 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index e28635ab556a..552bf0824d31 100644
--- a/d
The request of the irq line is not correctly handled by the current
code, platform_get_irq may fail and if the irq is requested via
devm_request_irq, its release is automatically done.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.
Remove a piece of code that is guarded by a config option, that is
nonexistent, the function it calls is also nonexistent.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/s
Replace seq_printf with seq_puts when the string is const.
Fix checkpatch warning: PREFER_SEQ_PUTS
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/dbg.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/d
This fixes the indentaions in the file dbg.h
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/dbg.h | 60
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/d
Remove defines that are both in board.h and sd.c from sd.c, this file
already includes board.h
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/d
Remove code, that is checking for old kernel versions, leaving only
the case for current versions.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/mt76
Fix checkpatch error: POINTER_LOCATION
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/board.h | 2 +-
drivers/staging/mt7621-mmc/dbg.c | 8 +++---
drivers/staging/mt7621-mmc/sd.c| 56 +++---
3 files chang
The whitespace errors in the file dbg.h are fixed by using the
cleanfile script. Indentations with whitespaces are not changed
in this patch.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/dbg.h | 38 +++---
This fixes the indentaions in the file mt7621_sd.h
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 820 -
1 file changed, 410 insertions(+), 410 deletions(-)
diff --git a/drivers/staging/mt76
Fixes checkpatch errors, warnings, checks:
SPACING, LEADING_SPACE, LINE_SPACING
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/board.h | 3 +-
drivers/staging/mt7621-mmc/dbg.c | 67 -
drivers/staging/mt7621-mmc/dbg.h
Refactor msdc_drv_{suspend, resume} by adding a new function
msdc_drv_pm, that cleans up the code and removes double code.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 26 +++---
1 file changed, 11 insertions(
This fixes the indentaions in the file board.h
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/board.h | 68 +++---
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/boar
Current code saves the need for polling in a global variable, that
leeds to problems, when the driver should handle multiple devices with
different capabilities. By looking up the capability in the mmc_host
capabilities, they now have per device scope.
Signed-off-by: Christian Lütke-Stetzkamp
Fix checkpatch error: GLOBAL_INITIALISERS
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/dbg.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/dbg.c b/drivers/staging/mt7621-mmc/dbg.c
The whitespace errors in the file sd.c are fixed by using the
cleanfile script. Indentations with whitespaces are not changed
in this patch.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 1142 +++
The probe function contains lots of code, that is never used, because
the fields it checks for in the msdc_hw structure are never
initialized. Removing them should be safe.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.
This patch series does the first cleanups in this driver. At some
points I already tried to get the code of this driver as near as
possible to the mk-sd driver in mainline.
Christian Lütke-Stetzkamp (34):
staging: mt7621-mmc: Remove whitespace errors in board.h
staging: mt7621-mmc: Remove
The whitespace errors in the file mt6575_sd.h are fixed by using the
cleanfile script. Indentations with whitespaces are not changed
in this patch.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/mt6575_sd.h | 49 +--
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 <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/dbg.c | 190 +++
Remove the unnecessary field data_pins from msdc_hw, later this
information should be taken from the device tree.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/board.h | 1 -
drivers/staging/mt7621-mmc/sd.c| 10 --
2 files chan
Remove unused datastructures and comments referring to their former use.
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 23 ---
1 file changed, 23 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/s
On Tue, Apr 03, 2018 at 05:58:31PM +1000, NeilBrown wrote:
> Thanks for these.
> When I addressed the various problems that I've mentioned separately
> the code compiles and boots and can access the sd card!
Thanks for your and Dan's quick reviews! Dan, I have tried your
script, it makes the
Fixes checkpatch error: ASSIGN_IN_IF by defining a new variable before if
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-dma/ralink-gdma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-dma/ralink-gdm
Fixes checkpatch warning: BRACES
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-dma/mtk-hsdma.c | 4 ++--
drivers/staging/mt7621-dma/ralink-gdma.c | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/mt7621-d
Fixes checkpatch check: PARENTHESIS_ALIGNMENT
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-dma/mtk-hsdma.c | 29 +
drivers/staging/mt7621-dma/ralink-gdma.c | 55
2 files changed, 43 insertions(
Fixes checkpatch error: CODE_IDENT
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-dma/ralink-gdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-dma/ralink-gdma.c
b/drivers/staging/mt7621-dma/ralink-
This patchset fiexes errors, warnings and checks found by checkpatch.
Christian Lütke-Stetzkamp (7):
staging: mt7621-dma: Fix Pointer Location
staging: mt7621-dma: Fix Spacing
staging: mt7621-dma: Fix open brace position
staging: mt7621-dma: Remove assignment in if
staging: mt7621-dma
Fixes checkpatch error: POINTER_LOCATION
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +-
drivers/staging/mt7621-dma/ralink-gdma.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/mt76
Fixes checkpatch error: OPEN_BRACE
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-dma/ralink-gdma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/mt7621-dma/ralink-gdma.c
b/drivers/staging/mt7621-dma/ralink-
Fixes checkpatch error: SPACING
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-dma/mtk-hsdma.c
b/drivers/staging/mt7621-dma/mtk-hsdma.c
On Wed, Mar 21, 2018 at 09:21:55AM +1100, NeilBrown wrote:
> I don't like this change. We now call vchan_find_desc() in situations
> where we didn't before. It isn't a very expensive function so that
> doesn't matter a lot, but I think it is best not to do this.
> If you want to remove the
This patchset fiexes errors, warnings and checks found by checkpatch.
Changes in v2:
* Added reviewd by tags
* Reworked patch "Remove assignment in if" by adding an inner if
Christian Lütke-Stetzkamp (7):
staging: mt7621-dma: Fix Pointer Location
staging: mt7621-dma: Fix Spacing
Fixes checkpatch error: POINTER_LOCATION
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
Reviewed-by: NeilBrown <n...@brown.name>
---
drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +-
drivers/staging/mt7621-dma/ralink-gdma.c | 2 +-
2 files changed, 2 insertions(+),
Fixes checkpatch error: OPEN_BRACE
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
Reviewed-by: NeilBrown <n...@brown.name>
---
drivers/staging/mt7621-dma/ralink-gdma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/mt7621-dma/rali
Fixes checkpatch check: PARENTHESIS_ALIGNMENT
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
Reviewed-by: NeilBrown <n...@brown.name>
---
drivers/staging/mt7621-dma/mtk-hsdma.c | 29 +
drivers/staging/mt7621-dma/ralink
Fixes checkpatch error: CODE_IDENT
Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
Reviewed-by: NeilBrown <n...@brown.name>
---
drivers/staging/mt7621-dma/ralink-gdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/mt7621-dma/rali
On Wed, Apr 03, 2019 at 06:51:49AM +1100, NeilBrown wrote:
> People keep telling me that drivers/mmc/host/mtk-sd.c should be able to
> handle the same hardware as this driver, with a little bit of work.
> Unfortunately they haven't told me what the little bit of work involves.
>
> Have you
201 - 260 of 260 matches
Mail list logo