Skip to content

Commit

Permalink
dmaengine: dw-edma: Drop unnecessary debugfs reg casts
Browse files Browse the repository at this point in the history
The debugfs_entries structure declared in dw-edma-v0-debugfs.c contains the
debugfs node register address. The address is declared as dma_addr_t type,
but is cast to "void *".

Change the type to "void __iomem *" and drop the unnecessary casts.

Link: https://lore.kernel.org/r/[email protected]
Fixes: 305aebe ("dmaengine: Add Synopsys eDMA IP version 0 debugfs support")
Tested-by: Manivannan Sadhasivam <[email protected]>
Signed-off-by: Serge Semin <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Acked-by: Vinod Koul <[email protected]>
  • Loading branch information
fancer authored and Lorenzo Pieralisi committed Jan 27, 2023
1 parent 2271216 commit 7ca9f02
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/dma/dw-edma/dw-edma-v0-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "dw-edma-core.h"

#define REGS_ADDR(name) \
((void __force *)&regs->name)
((void __iomem *)&regs->name)
#define REGISTER(name) \
{ #name, REGS_ADDR(name) }

Expand Down Expand Up @@ -48,12 +48,13 @@ static struct {

struct debugfs_entries {
const char *name;
dma_addr_t *reg;
void __iomem *reg;
};

static int dw_edma_debugfs_u32_get(void *data, u64 *val)
{
void __iomem *reg = (void __force __iomem *)data;
void __iomem *reg = data;

if (dw->chip->mf == EDMA_MF_EDMA_LEGACY &&
reg >= (void __iomem *)&regs->type.legacy.ch) {
void __iomem *ptr = &regs->type.legacy.ch;
Expand Down

0 comments on commit 7ca9f02

Please sign in to comment.