Commit fc0c6415 authored by Herve Codina's avatar Herve Codina

soc: fsl: cpm1: tsa: Fix __iomem addresses declaration

Running sparse (make C=1) on tsa.c raises a lot of warning such as:
  --- 8< ---
  warning: incorrect type in assignment (different address spaces)
     expected void *[noderef] si_regs
     got void [noderef] __iomem *
  --- 8< ---

Indeed, some variable were declared 'type *__iomem var' instead of
'type __iomem *var'.

Use the correct declaration to remove these warnings.

Fixes: 1d4ba0b8 ("soc: fsl: cpm1: Add support for TSA")
Cc: stable@vger.kernel.org
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312051959.9YdRIYbg-lkp@intel.com/Signed-off-by: default avatarHerve Codina <herve.codina@bootlin.com>
Reviewed-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/20231205152116.122512-2-herve.codina@bootlin.com
parent 2cc14f52
...@@ -98,9 +98,9 @@ ...@@ -98,9 +98,9 @@
#define TSA_SIRP 0x10 #define TSA_SIRP 0x10
struct tsa_entries_area { struct tsa_entries_area {
void *__iomem entries_start; void __iomem *entries_start;
void *__iomem entries_next; void __iomem *entries_next;
void *__iomem last_entry; void __iomem *last_entry;
}; };
struct tsa_tdm { struct tsa_tdm {
...@@ -117,8 +117,8 @@ struct tsa_tdm { ...@@ -117,8 +117,8 @@ struct tsa_tdm {
struct tsa { struct tsa {
struct device *dev; struct device *dev;
void *__iomem si_regs; void __iomem *si_regs;
void *__iomem si_ram; void __iomem *si_ram;
resource_size_t si_ram_sz; resource_size_t si_ram_sz;
spinlock_t lock; spinlock_t lock;
int tdms; /* TSA_TDMx ORed */ int tdms; /* TSA_TDMx ORed */
...@@ -135,27 +135,27 @@ static inline struct tsa *tsa_serial_get_tsa(struct tsa_serial *tsa_serial) ...@@ -135,27 +135,27 @@ static inline struct tsa *tsa_serial_get_tsa(struct tsa_serial *tsa_serial)
return container_of(tsa_serial, struct tsa, serials[tsa_serial->id]); return container_of(tsa_serial, struct tsa, serials[tsa_serial->id]);
} }
static inline void tsa_write32(void *__iomem addr, u32 val) static inline void tsa_write32(void __iomem *addr, u32 val)
{ {
iowrite32be(val, addr); iowrite32be(val, addr);
} }
static inline void tsa_write8(void *__iomem addr, u32 val) static inline void tsa_write8(void __iomem *addr, u32 val)
{ {
iowrite8(val, addr); iowrite8(val, addr);
} }
static inline u32 tsa_read32(void *__iomem addr) static inline u32 tsa_read32(void __iomem *addr)
{ {
return ioread32be(addr); return ioread32be(addr);
} }
static inline void tsa_clrbits32(void *__iomem addr, u32 clr) static inline void tsa_clrbits32(void __iomem *addr, u32 clr)
{ {
tsa_write32(addr, tsa_read32(addr) & ~clr); tsa_write32(addr, tsa_read32(addr) & ~clr);
} }
static inline void tsa_clrsetbits32(void *__iomem addr, u32 clr, u32 set) static inline void tsa_clrsetbits32(void __iomem *addr, u32 clr, u32 set)
{ {
tsa_write32(addr, (tsa_read32(addr) & ~clr) | set); tsa_write32(addr, (tsa_read32(addr) & ~clr) | set);
} }
...@@ -313,7 +313,7 @@ static u32 tsa_serial_id2csel(struct tsa *tsa, u32 serial_id) ...@@ -313,7 +313,7 @@ static u32 tsa_serial_id2csel(struct tsa *tsa, u32 serial_id)
static int tsa_add_entry(struct tsa *tsa, struct tsa_entries_area *area, static int tsa_add_entry(struct tsa *tsa, struct tsa_entries_area *area,
u32 count, u32 serial_id) u32 count, u32 serial_id)
{ {
void *__iomem addr; void __iomem *addr;
u32 left; u32 left;
u32 val; u32 val;
u32 cnt; u32 cnt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment