[PATCH] mostek bogus sparse annotations fixed
void * __iomem foo is not a pointer to iomem - it's an iomem variable containing void *. A pile of such guys in arch/sparc64/kernel/time.c, drivers/sbus/char/rtc.c and include/asm-sparc64/mostek.h turned into intended void __iomem *. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
DEFINE_SPINLOCK(mostek_lock);
|
DEFINE_SPINLOCK(mostek_lock);
|
||||||
DEFINE_SPINLOCK(rtc_lock);
|
DEFINE_SPINLOCK(rtc_lock);
|
||||||
void * __iomem mstk48t02_regs = 0UL;
|
void __iomem *mstk48t02_regs = NULL;
|
||||||
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
||||||
unsigned long ds1287_regs = 0UL;
|
unsigned long ds1287_regs = 0UL;
|
||||||
#endif
|
#endif
|
||||||
@@ -59,8 +59,8 @@ u64 jiffies_64 = INITIAL_JIFFIES;
|
|||||||
|
|
||||||
EXPORT_SYMBOL(jiffies_64);
|
EXPORT_SYMBOL(jiffies_64);
|
||||||
|
|
||||||
static void * __iomem mstk48t08_regs;
|
static void __iomem *mstk48t08_regs;
|
||||||
static void * __iomem mstk48t59_regs;
|
static void __iomem *mstk48t59_regs;
|
||||||
|
|
||||||
static int set_rtc_mmss(unsigned long);
|
static int set_rtc_mmss(unsigned long);
|
||||||
|
|
||||||
@@ -520,7 +520,7 @@ void timer_tick_interrupt(struct pt_regs *regs)
|
|||||||
/* Kick start a stopped clock (procedure from the Sun NVRAM/hostid FAQ). */
|
/* Kick start a stopped clock (procedure from the Sun NVRAM/hostid FAQ). */
|
||||||
static void __init kick_start_clock(void)
|
static void __init kick_start_clock(void)
|
||||||
{
|
{
|
||||||
void * __iomem regs = mstk48t02_regs;
|
void __iomem *regs = mstk48t02_regs;
|
||||||
u8 sec, tmp;
|
u8 sec, tmp;
|
||||||
int i, count;
|
int i, count;
|
||||||
|
|
||||||
@@ -604,7 +604,7 @@ static void __init kick_start_clock(void)
|
|||||||
/* Return nonzero if the clock chip battery is low. */
|
/* Return nonzero if the clock chip battery is low. */
|
||||||
static int __init has_low_battery(void)
|
static int __init has_low_battery(void)
|
||||||
{
|
{
|
||||||
void * __iomem regs = mstk48t02_regs;
|
void __iomem *regs = mstk48t02_regs;
|
||||||
u8 data1, data2;
|
u8 data1, data2;
|
||||||
|
|
||||||
spin_lock_irq(&mostek_lock);
|
spin_lock_irq(&mostek_lock);
|
||||||
@@ -623,7 +623,7 @@ static int __init has_low_battery(void)
|
|||||||
static void __init set_system_time(void)
|
static void __init set_system_time(void)
|
||||||
{
|
{
|
||||||
unsigned int year, mon, day, hour, min, sec;
|
unsigned int year, mon, day, hour, min, sec;
|
||||||
void * __iomem mregs = mstk48t02_regs;
|
void __iomem *mregs = mstk48t02_regs;
|
||||||
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
||||||
unsigned long dregs = ds1287_regs;
|
unsigned long dregs = ds1287_regs;
|
||||||
#else
|
#else
|
||||||
@@ -843,7 +843,7 @@ void __init clock_probe(void)
|
|||||||
!strcmp(model, "m5823")) {
|
!strcmp(model, "m5823")) {
|
||||||
ds1287_regs = edev->resource[0].start;
|
ds1287_regs = edev->resource[0].start;
|
||||||
} else {
|
} else {
|
||||||
mstk48t59_regs = (void * __iomem)
|
mstk48t59_regs = (void __iomem *)
|
||||||
edev->resource[0].start;
|
edev->resource[0].start;
|
||||||
mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02;
|
mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02;
|
||||||
}
|
}
|
||||||
@@ -866,7 +866,7 @@ try_isa_clock:
|
|||||||
!strcmp(model, "m5823")) {
|
!strcmp(model, "m5823")) {
|
||||||
ds1287_regs = isadev->resource.start;
|
ds1287_regs = isadev->resource.start;
|
||||||
} else {
|
} else {
|
||||||
mstk48t59_regs = (void * __iomem)
|
mstk48t59_regs = (void __iomem *)
|
||||||
isadev->resource.start;
|
isadev->resource.start;
|
||||||
mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02;
|
mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02;
|
||||||
}
|
}
|
||||||
@@ -895,16 +895,16 @@ try_isa_clock:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(model[5] == '0' && model[6] == '2') {
|
if(model[5] == '0' && model[6] == '2') {
|
||||||
mstk48t02_regs = (void * __iomem)
|
mstk48t02_regs = (void __iomem *)
|
||||||
(((u64)clk_reg[0].phys_addr) |
|
(((u64)clk_reg[0].phys_addr) |
|
||||||
(((u64)clk_reg[0].which_io)<<32UL));
|
(((u64)clk_reg[0].which_io)<<32UL));
|
||||||
} else if(model[5] == '0' && model[6] == '8') {
|
} else if(model[5] == '0' && model[6] == '8') {
|
||||||
mstk48t08_regs = (void * __iomem)
|
mstk48t08_regs = (void __iomem *)
|
||||||
(((u64)clk_reg[0].phys_addr) |
|
(((u64)clk_reg[0].phys_addr) |
|
||||||
(((u64)clk_reg[0].which_io)<<32UL));
|
(((u64)clk_reg[0].which_io)<<32UL));
|
||||||
mstk48t02_regs = mstk48t08_regs + MOSTEK_48T08_48T02;
|
mstk48t02_regs = mstk48t08_regs + MOSTEK_48T08_48T02;
|
||||||
} else {
|
} else {
|
||||||
mstk48t59_regs = (void * __iomem)
|
mstk48t59_regs = (void __iomem *)
|
||||||
(((u64)clk_reg[0].phys_addr) |
|
(((u64)clk_reg[0].phys_addr) |
|
||||||
(((u64)clk_reg[0].which_io)<<32UL));
|
(((u64)clk_reg[0].which_io)<<32UL));
|
||||||
mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02;
|
mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02;
|
||||||
@@ -1092,7 +1092,7 @@ unsigned long long sched_clock(void)
|
|||||||
static int set_rtc_mmss(unsigned long nowtime)
|
static int set_rtc_mmss(unsigned long nowtime)
|
||||||
{
|
{
|
||||||
int real_seconds, real_minutes, chip_minutes;
|
int real_seconds, real_minutes, chip_minutes;
|
||||||
void * __iomem mregs = mstk48t02_regs;
|
void __iomem *mregs = mstk48t02_regs;
|
||||||
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
||||||
unsigned long dregs = ds1287_regs;
|
unsigned long dregs = ds1287_regs;
|
||||||
#else
|
#else
|
||||||
|
@@ -67,7 +67,7 @@ struct rtc_time_generic {
|
|||||||
/* Retrieve the current date and time from the real time clock. */
|
/* Retrieve the current date and time from the real time clock. */
|
||||||
static void get_rtc_time(struct rtc_time *t)
|
static void get_rtc_time(struct rtc_time *t)
|
||||||
{
|
{
|
||||||
void * __iomem regs = mstk48t02_regs;
|
void __iomem *regs = mstk48t02_regs;
|
||||||
u8 tmp;
|
u8 tmp;
|
||||||
|
|
||||||
spin_lock_irq(&mostek_lock);
|
spin_lock_irq(&mostek_lock);
|
||||||
@@ -94,7 +94,7 @@ static void get_rtc_time(struct rtc_time *t)
|
|||||||
/* Set the current date and time inthe real time clock. */
|
/* Set the current date and time inthe real time clock. */
|
||||||
void set_rtc_time(struct rtc_time *t)
|
void set_rtc_time(struct rtc_time *t)
|
||||||
{
|
{
|
||||||
void * __iomem regs = mstk48t02_regs;
|
void __iomem *regs = mstk48t02_regs;
|
||||||
u8 tmp;
|
u8 tmp;
|
||||||
|
|
||||||
spin_lock_irq(&mostek_lock);
|
spin_lock_irq(&mostek_lock);
|
||||||
@@ -250,7 +250,7 @@ static int __init rtc_sun_init(void)
|
|||||||
/* It is possible we are being driven by some other RTC chip
|
/* It is possible we are being driven by some other RTC chip
|
||||||
* and thus another RTC driver is handling things.
|
* and thus another RTC driver is handling things.
|
||||||
*/
|
*/
|
||||||
if (mstk48t02_regs == 0)
|
if (!mstk48t02_regs)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
error = misc_register(&rtc_dev);
|
error = misc_register(&rtc_dev);
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
*
|
*
|
||||||
* We now deal with physical addresses for I/O to the chip. -DaveM
|
* We now deal with physical addresses for I/O to the chip. -DaveM
|
||||||
*/
|
*/
|
||||||
static __inline__ u8 mostek_read(void * __iomem addr)
|
static __inline__ u8 mostek_read(void __iomem *addr)
|
||||||
{
|
{
|
||||||
u8 ret;
|
u8 ret;
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ static __inline__ u8 mostek_read(void * __iomem addr)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline__ void mostek_write(void * __iomem addr, u8 val)
|
static __inline__ void mostek_write(void __iomem *addr, u8 val)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("stba %0, [%1] %2"
|
__asm__ __volatile__("stba %0, [%1] %2"
|
||||||
: /* no outputs */
|
: /* no outputs */
|
||||||
@@ -67,7 +67,7 @@ static __inline__ void mostek_write(void * __iomem addr, u8 val)
|
|||||||
#define MOSTEK_YEAR 0x07ffUL
|
#define MOSTEK_YEAR 0x07ffUL
|
||||||
|
|
||||||
extern spinlock_t mostek_lock;
|
extern spinlock_t mostek_lock;
|
||||||
extern void *__iomem mstk48t02_regs;
|
extern void __iomem *mstk48t02_regs;
|
||||||
|
|
||||||
/* Control register values. */
|
/* Control register values. */
|
||||||
#define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */
|
#define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */
|
||||||
|
Reference in New Issue
Block a user