Skip to content

Commit 077a6cc

Browse files
committed
Merge tag 'm68k-for-v5.15-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k fixes from Geert Uytterhoeven: - Warning fixes to mitigate CONFIG_WERROR=y * tag 'm68k-for-v5.15-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: mvme: Remove overdue #warnings in RTC handling m68k: Double cast io functions to unsigned long
2 parents ff1ffd7 + a7b68ed commit 077a6cc

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

arch/m68k/include/asm/raw_io.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
* two accesses to memory, which may be undesirable for some devices.
1818
*/
1919
#define in_8(addr) \
20-
({ u8 __v = (*(__force volatile u8 *) (addr)); __v; })
20+
({ u8 __v = (*(__force volatile u8 *) (unsigned long)(addr)); __v; })
2121
#define in_be16(addr) \
22-
({ u16 __v = (*(__force volatile u16 *) (addr)); __v; })
22+
({ u16 __v = (*(__force volatile u16 *) (unsigned long)(addr)); __v; })
2323
#define in_be32(addr) \
24-
({ u32 __v = (*(__force volatile u32 *) (addr)); __v; })
24+
({ u32 __v = (*(__force volatile u32 *) (unsigned long)(addr)); __v; })
2525
#define in_le16(addr) \
26-
({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (addr)); __v; })
26+
({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (unsigned long)(addr)); __v; })
2727
#define in_le32(addr) \
28-
({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (addr)); __v; })
28+
({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (unsigned long)(addr)); __v; })
2929

30-
#define out_8(addr,b) (void)((*(__force volatile u8 *) (addr)) = (b))
31-
#define out_be16(addr,w) (void)((*(__force volatile u16 *) (addr)) = (w))
32-
#define out_be32(addr,l) (void)((*(__force volatile u32 *) (addr)) = (l))
33-
#define out_le16(addr,w) (void)((*(__force volatile __le16 *) (addr)) = cpu_to_le16(w))
34-
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l))
30+
#define out_8(addr,b) (void)((*(__force volatile u8 *) (unsigned long)(addr)) = (b))
31+
#define out_be16(addr,w) (void)((*(__force volatile u16 *) (unsigned long)(addr)) = (w))
32+
#define out_be32(addr,l) (void)((*(__force volatile u32 *) (unsigned long)(addr)) = (l))
33+
#define out_le16(addr,w) (void)((*(__force volatile __le16 *) (unsigned long)(addr)) = cpu_to_le16(w))
34+
#define out_le32(addr,l) (void)((*(__force volatile __le32 *) (unsigned long)(addr)) = cpu_to_le32(l))
3535

3636
#define raw_inb in_8
3737
#define raw_inw in_be16

arch/m68k/mvme147/config.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ static int bcd2int (unsigned char b)
171171

172172
int mvme147_hwclk(int op, struct rtc_time *t)
173173
{
174-
#warning check me!
175174
if (!op) {
176175
m147_rtc->ctrl = RTC_READ;
177176
t->tm_year = bcd2int (m147_rtc->bcd_year);
@@ -183,6 +182,9 @@ int mvme147_hwclk(int op, struct rtc_time *t)
183182
m147_rtc->ctrl = 0;
184183
if (t->tm_year < 70)
185184
t->tm_year += 100;
185+
} else {
186+
/* FIXME Setting the time is not yet supported */
187+
return -EOPNOTSUPP;
186188
}
187189
return 0;
188190
}

arch/m68k/mvme16x/config.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ int bcd2int (unsigned char b)
436436

437437
int mvme16x_hwclk(int op, struct rtc_time *t)
438438
{
439-
#warning check me!
440439
if (!op) {
441440
rtc->ctrl = RTC_READ;
442441
t->tm_year = bcd2int (rtc->bcd_year);
@@ -448,6 +447,9 @@ int mvme16x_hwclk(int op, struct rtc_time *t)
448447
rtc->ctrl = 0;
449448
if (t->tm_year < 70)
450449
t->tm_year += 100;
450+
} else {
451+
/* FIXME Setting the time is not yet supported */
452+
return -EOPNOTSUPP;
451453
}
452454
return 0;
453455
}

0 commit comments

Comments
 (0)