soc: fsl: cpm1: qmc: Fix __iomem addresses declaration
commit a5ec3a21220da06bdda2e686012ca64fdb6c513d upstream.
Running sparse (make C=1) on qmc.c raises a lot of warning such as:
...
warning: incorrect type in assignment (different address spaces)
expected struct cpm_buf_desc [usertype] *[noderef] __iomem bd
got struct cpm_buf_desc [noderef] [usertype] __iomem *txbd_free
...
Indeed, some variable were declared 'type *__iomem var' instead of
'type __iomem *var'.
Use the correct declaration to remove these warnings.
Fixes: 3178d58e0b
("soc: fsl: cpm1: Add support for QMC")
Cc: stable@vger.kernel.org
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20231205152116.122512-3-herve.codina@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d0160e74e9
commit
07d45e9125
|
@ -175,7 +175,7 @@ struct qmc_chan {
|
|||
struct list_head list;
|
||||
unsigned int id;
|
||||
struct qmc *qmc;
|
||||
void *__iomem s_param;
|
||||
void __iomem *s_param;
|
||||
enum qmc_mode mode;
|
||||
u64 tx_ts_mask;
|
||||
u64 rx_ts_mask;
|
||||
|
@ -203,9 +203,9 @@ struct qmc_chan {
|
|||
struct qmc {
|
||||
struct device *dev;
|
||||
struct tsa_serial *tsa_serial;
|
||||
void *__iomem scc_regs;
|
||||
void *__iomem scc_pram;
|
||||
void *__iomem dpram;
|
||||
void __iomem *scc_regs;
|
||||
void __iomem *scc_pram;
|
||||
void __iomem *dpram;
|
||||
u16 scc_pram_offset;
|
||||
cbd_t __iomem *bd_table;
|
||||
dma_addr_t bd_dma_addr;
|
||||
|
@ -218,37 +218,37 @@ struct qmc {
|
|||
struct qmc_chan *chans[64];
|
||||
};
|
||||
|
||||
static inline void qmc_write16(void *__iomem addr, u16 val)
|
||||
static inline void qmc_write16(void __iomem *addr, u16 val)
|
||||
{
|
||||
iowrite16be(val, addr);
|
||||
}
|
||||
|
||||
static inline u16 qmc_read16(void *__iomem addr)
|
||||
static inline u16 qmc_read16(void __iomem *addr)
|
||||
{
|
||||
return ioread16be(addr);
|
||||
}
|
||||
|
||||
static inline void qmc_setbits16(void *__iomem addr, u16 set)
|
||||
static inline void qmc_setbits16(void __iomem *addr, u16 set)
|
||||
{
|
||||
qmc_write16(addr, qmc_read16(addr) | set);
|
||||
}
|
||||
|
||||
static inline void qmc_clrbits16(void *__iomem addr, u16 clr)
|
||||
static inline void qmc_clrbits16(void __iomem *addr, u16 clr)
|
||||
{
|
||||
qmc_write16(addr, qmc_read16(addr) & ~clr);
|
||||
}
|
||||
|
||||
static inline void qmc_write32(void *__iomem addr, u32 val)
|
||||
static inline void qmc_write32(void __iomem *addr, u32 val)
|
||||
{
|
||||
iowrite32be(val, addr);
|
||||
}
|
||||
|
||||
static inline u32 qmc_read32(void *__iomem addr)
|
||||
static inline u32 qmc_read32(void __iomem *addr)
|
||||
{
|
||||
return ioread32be(addr);
|
||||
}
|
||||
|
||||
static inline void qmc_setbits32(void *__iomem addr, u32 set)
|
||||
static inline void qmc_setbits32(void __iomem *addr, u32 set)
|
||||
{
|
||||
qmc_write32(addr, qmc_read32(addr) | set);
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ int qmc_chan_write_submit(struct qmc_chan *chan, dma_addr_t addr, size_t length,
|
|||
{
|
||||
struct qmc_xfer_desc *xfer_desc;
|
||||
unsigned long flags;
|
||||
cbd_t *__iomem bd;
|
||||
cbd_t __iomem *bd;
|
||||
u16 ctrl;
|
||||
int ret;
|
||||
|
||||
|
@ -374,7 +374,7 @@ static void qmc_chan_write_done(struct qmc_chan *chan)
|
|||
void (*complete)(void *context);
|
||||
unsigned long flags;
|
||||
void *context;
|
||||
cbd_t *__iomem bd;
|
||||
cbd_t __iomem *bd;
|
||||
u16 ctrl;
|
||||
|
||||
/*
|
||||
|
@ -425,7 +425,7 @@ int qmc_chan_read_submit(struct qmc_chan *chan, dma_addr_t addr, size_t length,
|
|||
{
|
||||
struct qmc_xfer_desc *xfer_desc;
|
||||
unsigned long flags;
|
||||
cbd_t *__iomem bd;
|
||||
cbd_t __iomem *bd;
|
||||
u16 ctrl;
|
||||
int ret;
|
||||
|
||||
|
@ -488,7 +488,7 @@ static void qmc_chan_read_done(struct qmc_chan *chan)
|
|||
void (*complete)(void *context, size_t size);
|
||||
struct qmc_xfer_desc *xfer_desc;
|
||||
unsigned long flags;
|
||||
cbd_t *__iomem bd;
|
||||
cbd_t __iomem *bd;
|
||||
void *context;
|
||||
u16 datalen;
|
||||
u16 ctrl;
|
||||
|
@ -663,7 +663,7 @@ static void qmc_chan_reset_rx(struct qmc_chan *chan)
|
|||
{
|
||||
struct qmc_xfer_desc *xfer_desc;
|
||||
unsigned long flags;
|
||||
cbd_t *__iomem bd;
|
||||
cbd_t __iomem *bd;
|
||||
u16 ctrl;
|
||||
|
||||
spin_lock_irqsave(&chan->rx_lock, flags);
|
||||
|
@ -694,7 +694,7 @@ static void qmc_chan_reset_tx(struct qmc_chan *chan)
|
|||
{
|
||||
struct qmc_xfer_desc *xfer_desc;
|
||||
unsigned long flags;
|
||||
cbd_t *__iomem bd;
|
||||
cbd_t __iomem *bd;
|
||||
u16 ctrl;
|
||||
|
||||
spin_lock_irqsave(&chan->tx_lock, flags);
|
||||
|
|
Loading…
Reference in New Issue