Commit dd67de8c authored by Luc Van Oostenryck's avatar Luc Van Oostenryck Committed by Mark Brown

spi: fsl: add missing __iomem annotation

The field mspi->reg_base is annotated as an __iomem pointer. Good.

However, this field is often assigned to a temporary variable:
before being used. For example:
	struct fsl_spi_reg *reg_base = mspi->reg_base;

But this variable is missing the __iomem annotation.
So, add the missing __iomem and make sparse & the bot happier.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Link: https://lore.kernel.org/r/20200622162611.83694-1-luc.vanoostenryck@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f27b1dc6
...@@ -90,7 +90,7 @@ static void fsl_spi_change_mode(struct spi_device *spi) ...@@ -90,7 +90,7 @@ static void fsl_spi_change_mode(struct spi_device *spi)
{ {
struct mpc8xxx_spi *mspi = spi_master_get_devdata(spi->master); struct mpc8xxx_spi *mspi = spi_master_get_devdata(spi->master);
struct spi_mpc8xxx_cs *cs = spi->controller_state; struct spi_mpc8xxx_cs *cs = spi->controller_state;
struct fsl_spi_reg *reg_base = mspi->reg_base; struct fsl_spi_reg __iomem *reg_base = mspi->reg_base;
__be32 __iomem *mode = &reg_base->mode; __be32 __iomem *mode = &reg_base->mode;
unsigned long flags; unsigned long flags;
...@@ -291,7 +291,7 @@ static int fsl_spi_cpu_bufs(struct mpc8xxx_spi *mspi, ...@@ -291,7 +291,7 @@ static int fsl_spi_cpu_bufs(struct mpc8xxx_spi *mspi,
struct spi_transfer *t, unsigned int len) struct spi_transfer *t, unsigned int len)
{ {
u32 word; u32 word;
struct fsl_spi_reg *reg_base = mspi->reg_base; struct fsl_spi_reg __iomem *reg_base = mspi->reg_base;
mspi->count = len; mspi->count = len;
...@@ -309,7 +309,7 @@ static int fsl_spi_bufs(struct spi_device *spi, struct spi_transfer *t, ...@@ -309,7 +309,7 @@ static int fsl_spi_bufs(struct spi_device *spi, struct spi_transfer *t,
bool is_dma_mapped) bool is_dma_mapped)
{ {
struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master); struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master);
struct fsl_spi_reg *reg_base; struct fsl_spi_reg __iomem *reg_base;
unsigned int len = t->len; unsigned int len = t->len;
u8 bits_per_word; u8 bits_per_word;
int ret; int ret;
...@@ -440,7 +440,7 @@ static int fsl_spi_do_one_msg(struct spi_master *master, ...@@ -440,7 +440,7 @@ static int fsl_spi_do_one_msg(struct spi_master *master,
static int fsl_spi_setup(struct spi_device *spi) static int fsl_spi_setup(struct spi_device *spi)
{ {
struct mpc8xxx_spi *mpc8xxx_spi; struct mpc8xxx_spi *mpc8xxx_spi;
struct fsl_spi_reg *reg_base; struct fsl_spi_reg __iomem *reg_base;
int retval; int retval;
u32 hw_mode; u32 hw_mode;
struct spi_mpc8xxx_cs *cs = spi_get_ctldata(spi); struct spi_mpc8xxx_cs *cs = spi_get_ctldata(spi);
...@@ -495,7 +495,7 @@ static void fsl_spi_cleanup(struct spi_device *spi) ...@@ -495,7 +495,7 @@ static void fsl_spi_cleanup(struct spi_device *spi)
static void fsl_spi_cpu_irq(struct mpc8xxx_spi *mspi, u32 events) static void fsl_spi_cpu_irq(struct mpc8xxx_spi *mspi, u32 events)
{ {
struct fsl_spi_reg *reg_base = mspi->reg_base; struct fsl_spi_reg __iomem *reg_base = mspi->reg_base;
/* We need handle RX first */ /* We need handle RX first */
if (events & SPIE_NE) { if (events & SPIE_NE) {
...@@ -530,7 +530,7 @@ static irqreturn_t fsl_spi_irq(s32 irq, void *context_data) ...@@ -530,7 +530,7 @@ static irqreturn_t fsl_spi_irq(s32 irq, void *context_data)
struct mpc8xxx_spi *mspi = context_data; struct mpc8xxx_spi *mspi = context_data;
irqreturn_t ret = IRQ_NONE; irqreturn_t ret = IRQ_NONE;
u32 events; u32 events;
struct fsl_spi_reg *reg_base = mspi->reg_base; struct fsl_spi_reg __iomem *reg_base = mspi->reg_base;
/* Get interrupt events(tx/rx) */ /* Get interrupt events(tx/rx) */
events = mpc8xxx_spi_read_reg(&reg_base->event); events = mpc8xxx_spi_read_reg(&reg_base->event);
...@@ -550,7 +550,7 @@ static irqreturn_t fsl_spi_irq(s32 irq, void *context_data) ...@@ -550,7 +550,7 @@ static irqreturn_t fsl_spi_irq(s32 irq, void *context_data)
static void fsl_spi_grlib_cs_control(struct spi_device *spi, bool on) static void fsl_spi_grlib_cs_control(struct spi_device *spi, bool on)
{ {
struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master); struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(spi->master);
struct fsl_spi_reg *reg_base = mpc8xxx_spi->reg_base; struct fsl_spi_reg __iomem *reg_base = mpc8xxx_spi->reg_base;
u32 slvsel; u32 slvsel;
u16 cs = spi->chip_select; u16 cs = spi->chip_select;
...@@ -568,7 +568,7 @@ static void fsl_spi_grlib_probe(struct device *dev) ...@@ -568,7 +568,7 @@ static void fsl_spi_grlib_probe(struct device *dev)
struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); struct fsl_spi_platform_data *pdata = dev_get_platdata(dev);
struct spi_master *master = dev_get_drvdata(dev); struct spi_master *master = dev_get_drvdata(dev);
struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(master); struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(master);
struct fsl_spi_reg *reg_base = mpc8xxx_spi->reg_base; struct fsl_spi_reg __iomem *reg_base = mpc8xxx_spi->reg_base;
int mbits; int mbits;
u32 capabilities; u32 capabilities;
...@@ -594,7 +594,7 @@ static struct spi_master *fsl_spi_probe(struct device *dev, ...@@ -594,7 +594,7 @@ static struct spi_master *fsl_spi_probe(struct device *dev,
struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); struct fsl_spi_platform_data *pdata = dev_get_platdata(dev);
struct spi_master *master; struct spi_master *master;
struct mpc8xxx_spi *mpc8xxx_spi; struct mpc8xxx_spi *mpc8xxx_spi;
struct fsl_spi_reg *reg_base; struct fsl_spi_reg __iomem *reg_base;
u32 regval; u32 regval;
int ret = 0; int ret = 0;
......
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