* [PATCH 1/2] bus: mvebu-mbus: fix __iomem on register pointers
@ 2016-06-21 15:16 Ben Dooks
2016-06-21 15:16 ` [PATCH 2/2] bus: mvebu-mbus: make mvebu_mbus_syscore_ops static Ben Dooks
0 siblings, 1 reply; 4+ messages in thread
From: Ben Dooks @ 2016-06-21 15:16 UTC (permalink / raw)
To: linux-arm-kernel
The save_cpu_target functions should take "u32 __iomem *", not a
plain "u32 *" as it is passed to register access functions. Fix
the following warnings by adding the annotation:
drivers/bus/mvebu-mbus.c:739:17: warning: incorrect type in argument 2 (different address spaces)
drivers/bus/mvebu-mbus.c:739:17: expected void volatile [noderef] <asn:2>*addr
drivers/bus/mvebu-mbus.c:739:17: got unsigned int [usertype] *
drivers/bus/mvebu-mbus.c:741:17: warning: incorrect type in argument 2 (different address spaces)
drivers/bus/mvebu-mbus.c:741:17: expected void volatile [noderef] <asn:2>*addr
drivers/bus/mvebu-mbus.c:741:17: got unsigned int [usertype] *
drivers/bus/mvebu-mbus.c:742:17: warning: incorrect type in argument 2 (different address spaces)
drivers/bus/mvebu-mbus.c:742:17: expected void volatile [noderef] <asn:2>*addr
drivers/bus/mvebu-mbus.c:742:17: got unsigned int [usertype] *
drivers/bus/mvebu-mbus.c:744:17: warning: incorrect type in argument 2 (different address spaces)
drivers/bus/mvebu-mbus.c:744:17: expected void volatile [noderef] <asn:2>*addr
drivers/bus/mvebu-mbus.c:744:17: got unsigned int [usertype] *
drivers/bus/mvebu-mbus.c:790:17: warning: incorrect type in argument 2 (different address spaces)
drivers/bus/mvebu-mbus.c:790:17: expected void volatile [noderef] <asn:2>*addr
drivers/bus/mvebu-mbus.c:790:17: got unsigned int [usertype] *
drivers/bus/mvebu-mbus.c:792:17: warning: incorrect type in argument 2 (different address spaces)
drivers/bus/mvebu-mbus.c:792:17: expected void volatile [noderef] <asn:2>*addr
drivers/bus/mvebu-mbus.c:792:17: got unsigned int [usertype] *
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Evan Wang <xswang@marvell.com>
Cc: linux-kernel at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
---
drivers/bus/mvebu-mbus.c | 8 ++++----
include/linux/mbus.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
index ce54a01..8cac3b8 100644
--- a/drivers/bus/mvebu-mbus.c
+++ b/drivers/bus/mvebu-mbus.c
@@ -117,7 +117,7 @@ struct mvebu_mbus_soc_data {
unsigned int (*win_remap_offset)(const int win);
void (*setup_cpu_target)(struct mvebu_mbus_state *s);
int (*save_cpu_target)(struct mvebu_mbus_state *s,
- u32 *store_addr);
+ u32 __iomem *store_addr);
int (*show_cpu_target)(struct mvebu_mbus_state *s,
struct seq_file *seq, void *v);
};
@@ -728,7 +728,7 @@ mvebu_mbus_default_setup_cpu_target(struct mvebu_mbus_state *mbus)
static int
mvebu_mbus_default_save_cpu_target(struct mvebu_mbus_state *mbus,
- u32 *store_addr)
+ u32 __iomem *store_addr)
{
int i;
@@ -780,7 +780,7 @@ mvebu_mbus_dove_setup_cpu_target(struct mvebu_mbus_state *mbus)
static int
mvebu_mbus_dove_save_cpu_target(struct mvebu_mbus_state *mbus,
- u32 *store_addr)
+ u32 __iomem *store_addr)
{
int i;
@@ -796,7 +796,7 @@ mvebu_mbus_dove_save_cpu_target(struct mvebu_mbus_state *mbus,
return 4;
}
-int mvebu_mbus_save_cpu_target(u32 *store_addr)
+int mvebu_mbus_save_cpu_target(u32 __iomem *store_addr)
{
return mbus_state.soc->save_cpu_target(&mbus_state, store_addr);
}
diff --git a/include/linux/mbus.h b/include/linux/mbus.h
index ea34a86..d610232 100644
--- a/include/linux/mbus.h
+++ b/include/linux/mbus.h
@@ -66,7 +66,7 @@ static inline const struct mbus_dram_target_info *mv_mbus_dram_info_nooverlap(vo
}
#endif
-int mvebu_mbus_save_cpu_target(u32 *store_addr);
+int mvebu_mbus_save_cpu_target(u32 __iomem *store_addr);
void mvebu_mbus_get_pcie_mem_aperture(struct resource *res);
void mvebu_mbus_get_pcie_io_aperture(struct resource *res);
int mvebu_mbus_get_dram_win_info(phys_addr_t phyaddr, u8 *target, u8 *attr);
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] bus: mvebu-mbus: make mvebu_mbus_syscore_ops static
2016-06-21 15:16 [PATCH 1/2] bus: mvebu-mbus: fix __iomem on register pointers Ben Dooks
@ 2016-06-21 15:16 ` Ben Dooks
2016-06-21 15:31 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Ben Dooks @ 2016-06-21 15:16 UTC (permalink / raw)
To: linux-arm-kernel
Make mvebu_mbus_syscore_ops static as it does not get
used or declared outside mvebu-mbus.c to fix the following
sparse warning:
linux/drivers/bus/mvebu-mbus.c:1092:20: warning: symbol 'mvebu_mbus_syscore_ops' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Evan Wang <xswang@marvell.com>
Cc: linux-kernel at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
---
drivers/bus/mvebu-mbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
index 8cac3b8..c7f3969 100644
--- a/drivers/bus/mvebu-mbus.c
+++ b/drivers/bus/mvebu-mbus.c
@@ -1089,7 +1089,7 @@ static void mvebu_mbus_resume(void)
}
}
-struct syscore_ops mvebu_mbus_syscore_ops = {
+static struct syscore_ops mvebu_mbus_syscore_ops = {
.suspend = mvebu_mbus_suspend,
.resume = mvebu_mbus_resume,
};
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] bus: mvebu-mbus: make mvebu_mbus_syscore_ops static
2016-06-21 15:16 ` [PATCH 2/2] bus: mvebu-mbus: make mvebu_mbus_syscore_ops static Ben Dooks
@ 2016-06-21 15:31 ` Arnd Bergmann
2016-07-11 16:00 ` Gregory CLEMENT
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-06-21 15:31 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday, June 21, 2016 4:16:19 PM CEST Ben Dooks wrote:
>
> -struct syscore_ops mvebu_mbus_syscore_ops = {
> +static struct syscore_ops mvebu_mbus_syscore_ops = {
> .suspend = mvebu_mbus_suspend,
> .resume = mvebu_mbus_resume,
> };
>
Looks good, but I immediately thought it should be "const" as well.
Unfortunately there is a list_head in them, so that isn't easy,
but if anyone has an idea for how to make these all const, that
would be nice.
Anyway, that shouldn't stop your patch from getting merged, so
Acked-by: Arnd Bergmann <arnd@arndb.de>
(also for patch 1/2).
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] bus: mvebu-mbus: make mvebu_mbus_syscore_ops static
2016-06-21 15:31 ` Arnd Bergmann
@ 2016-07-11 16:00 ` Gregory CLEMENT
0 siblings, 0 replies; 4+ messages in thread
From: Gregory CLEMENT @ 2016-07-11 16:00 UTC (permalink / raw)
To: linux-arm-kernel
Hi Ben,
On mar., juin 21 2016, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday, June 21, 2016 4:16:19 PM CEST Ben Dooks wrote:
>>
>> -struct syscore_ops mvebu_mbus_syscore_ops = {
>> +static struct syscore_ops mvebu_mbus_syscore_ops = {
>> .suspend = mvebu_mbus_suspend,
>> .resume = mvebu_mbus_resume,
>> };
>>
>
>
> Looks good, but I immediately thought it should be "const" as well.
> Unfortunately there is a list_head in them, so that isn't easy,
> but if anyone has an idea for how to make these all const, that
> would be nice.
>
> Anyway, that shouldn't stop your patch from getting merged, so
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> (also for patch 1/2).
So I applied both patch in mvebu/cleanup
Thanks,
Gregory
>
> Arnd
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-11 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-21 15:16 [PATCH 1/2] bus: mvebu-mbus: fix __iomem on register pointers Ben Dooks
2016-06-21 15:16 ` [PATCH 2/2] bus: mvebu-mbus: make mvebu_mbus_syscore_ops static Ben Dooks
2016-06-21 15:31 ` Arnd Bergmann
2016-07-11 16:00 ` Gregory CLEMENT
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).