Commit ef0299bf8e868c09bff13e6f3c4fc9b835f60471

Authored by Al Viro
Committed by Linus Torvalds
1 parent fdca124a1b

[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>

Showing 3 changed files with 18 additions and 18 deletions Side-by-side Diff

arch/sparc64/kernel/time.c
... ... @@ -48,7 +48,7 @@
48 48  
49 49 DEFINE_SPINLOCK(mostek_lock);
50 50 DEFINE_SPINLOCK(rtc_lock);
51   -void * __iomem mstk48t02_regs = 0UL;
  51 +void __iomem *mstk48t02_regs = NULL;
52 52 #ifdef CONFIG_PCI
53 53 unsigned long ds1287_regs = 0UL;
54 54 #endif
... ... @@ -59,8 +59,8 @@
59 59  
60 60 EXPORT_SYMBOL(jiffies_64);
61 61  
62   -static void * __iomem mstk48t08_regs;
63   -static void * __iomem mstk48t59_regs;
  62 +static void __iomem *mstk48t08_regs;
  63 +static void __iomem *mstk48t59_regs;
64 64  
65 65 static int set_rtc_mmss(unsigned long);
66 66  
... ... @@ -520,7 +520,7 @@
520 520 /* Kick start a stopped clock (procedure from the Sun NVRAM/hostid FAQ). */
521 521 static void __init kick_start_clock(void)
522 522 {
523   - void * __iomem regs = mstk48t02_regs;
  523 + void __iomem *regs = mstk48t02_regs;
524 524 u8 sec, tmp;
525 525 int i, count;
526 526  
... ... @@ -604,7 +604,7 @@
604 604 /* Return nonzero if the clock chip battery is low. */
605 605 static int __init has_low_battery(void)
606 606 {
607   - void * __iomem regs = mstk48t02_regs;
  607 + void __iomem *regs = mstk48t02_regs;
608 608 u8 data1, data2;
609 609  
610 610 spin_lock_irq(&mostek_lock);
... ... @@ -623,7 +623,7 @@
623 623 static void __init set_system_time(void)
624 624 {
625 625 unsigned int year, mon, day, hour, min, sec;
626   - void * __iomem mregs = mstk48t02_regs;
  626 + void __iomem *mregs = mstk48t02_regs;
627 627 #ifdef CONFIG_PCI
628 628 unsigned long dregs = ds1287_regs;
629 629 #else
... ... @@ -843,7 +843,7 @@
843 843 !strcmp(model, "m5823")) {
844 844 ds1287_regs = edev->resource[0].start;
845 845 } else {
846   - mstk48t59_regs = (void * __iomem)
  846 + mstk48t59_regs = (void __iomem *)
847 847 edev->resource[0].start;
848 848 mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02;
849 849 }
... ... @@ -866,7 +866,7 @@
866 866 !strcmp(model, "m5823")) {
867 867 ds1287_regs = isadev->resource.start;
868 868 } else {
869   - mstk48t59_regs = (void * __iomem)
  869 + mstk48t59_regs = (void __iomem *)
870 870 isadev->resource.start;
871 871 mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02;
872 872 }
873 873  
874 874  
... ... @@ -895,16 +895,16 @@
895 895 }
896 896  
897 897 if(model[5] == '0' && model[6] == '2') {
898   - mstk48t02_regs = (void * __iomem)
  898 + mstk48t02_regs = (void __iomem *)
899 899 (((u64)clk_reg[0].phys_addr) |
900 900 (((u64)clk_reg[0].which_io)<<32UL));
901 901 } else if(model[5] == '0' && model[6] == '8') {
902   - mstk48t08_regs = (void * __iomem)
  902 + mstk48t08_regs = (void __iomem *)
903 903 (((u64)clk_reg[0].phys_addr) |
904 904 (((u64)clk_reg[0].which_io)<<32UL));
905 905 mstk48t02_regs = mstk48t08_regs + MOSTEK_48T08_48T02;
906 906 } else {
907   - mstk48t59_regs = (void * __iomem)
  907 + mstk48t59_regs = (void __iomem *)
908 908 (((u64)clk_reg[0].phys_addr) |
909 909 (((u64)clk_reg[0].which_io)<<32UL));
910 910 mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02;
... ... @@ -1092,7 +1092,7 @@
1092 1092 static int set_rtc_mmss(unsigned long nowtime)
1093 1093 {
1094 1094 int real_seconds, real_minutes, chip_minutes;
1095   - void * __iomem mregs = mstk48t02_regs;
  1095 + void __iomem *mregs = mstk48t02_regs;
1096 1096 #ifdef CONFIG_PCI
1097 1097 unsigned long dregs = ds1287_regs;
1098 1098 #else
drivers/sbus/char/rtc.c
... ... @@ -67,7 +67,7 @@
67 67 /* Retrieve the current date and time from the real time clock. */
68 68 static void get_rtc_time(struct rtc_time *t)
69 69 {
70   - void * __iomem regs = mstk48t02_regs;
  70 + void __iomem *regs = mstk48t02_regs;
71 71 u8 tmp;
72 72  
73 73 spin_lock_irq(&mostek_lock);
... ... @@ -94,7 +94,7 @@
94 94 /* Set the current date and time inthe real time clock. */
95 95 void set_rtc_time(struct rtc_time *t)
96 96 {
97   - void * __iomem regs = mstk48t02_regs;
  97 + void __iomem *regs = mstk48t02_regs;
98 98 u8 tmp;
99 99  
100 100 spin_lock_irq(&mostek_lock);
... ... @@ -250,7 +250,7 @@
250 250 /* It is possible we are being driven by some other RTC chip
251 251 * and thus another RTC driver is handling things.
252 252 */
253   - if (mstk48t02_regs == 0)
  253 + if (!mstk48t02_regs)
254 254 return -ENODEV;
255 255  
256 256 error = misc_register(&rtc_dev);
include/asm-sparc64/mostek.h
... ... @@ -38,7 +38,7 @@
38 38 *
39 39 * We now deal with physical addresses for I/O to the chip. -DaveM
40 40 */
41   -static __inline__ u8 mostek_read(void * __iomem addr)
  41 +static __inline__ u8 mostek_read(void __iomem *addr)
42 42 {
43 43 u8 ret;
44 44  
... ... @@ -48,7 +48,7 @@
48 48 return ret;
49 49 }
50 50  
51   -static __inline__ void mostek_write(void * __iomem addr, u8 val)
  51 +static __inline__ void mostek_write(void __iomem *addr, u8 val)
52 52 {
53 53 __asm__ __volatile__("stba %0, [%1] %2"
54 54 : /* no outputs */
... ... @@ -67,7 +67,7 @@
67 67 #define MOSTEK_YEAR 0x07ffUL
68 68  
69 69 extern spinlock_t mostek_lock;
70   -extern void *__iomem mstk48t02_regs;
  70 +extern void __iomem *mstk48t02_regs;
71 71  
72 72 /* Control register values. */
73 73 #define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */