17
17
* two accesses to memory, which may be undesirable for some devices.
18
18
*/
19
19
#define in_8 (addr ) \
20
- ({ u8 __v = (*(__force volatile u8 *) (unsigned long)(addr)); __v; })
20
+ ({ u8 __v = (*(__force const volatile u8 *) (unsigned long)(addr)); __v; })
21
21
#define in_be16 (addr ) \
22
- ({ u16 __v = (*(__force volatile u16 *) (unsigned long)(addr)); __v; })
22
+ ({ u16 __v = (*(__force const volatile u16 *) (unsigned long)(addr)); __v; })
23
23
#define in_be32 (addr ) \
24
- ({ u32 __v = (*(__force volatile u32 *) (unsigned long)(addr)); __v; })
24
+ ({ u32 __v = (*(__force const volatile u32 *) (unsigned long)(addr)); __v; })
25
25
#define in_le16 (addr ) \
26
- ({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (unsigned long)(addr)); __v; })
26
+ ({ u16 __v = le16_to_cpu(*(__force const volatile __le16 *) (unsigned long)(addr)); __v; })
27
27
#define in_le32 (addr ) \
28
- ({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (unsigned long)(addr)); __v; })
28
+ ({ u32 __v = le32_to_cpu(*(__force const volatile __le32 *) (unsigned long)(addr)); __v; })
29
29
30
30
#define out_8 (addr ,b ) (void)((*(__force volatile u8 *) (unsigned long)(addr)) = (b))
31
31
#define out_be16 (addr ,w ) (void)((*(__force volatile u16 *) (unsigned long)(addr)) = (w))
73
73
74
74
#if defined(CONFIG_ATARI_ROM_ISA )
75
75
#define rom_in_8 (addr ) \
76
- ({ u16 __v = (*(__force volatile u16 *) (addr)); __v >>= 8; __v; })
76
+ ({ u16 __v = (*(__force const volatile u16 *) (addr)); __v >>= 8; __v; })
77
77
#define rom_in_be16 (addr ) \
78
- ({ u16 __v = (*(__force volatile u16 *) (addr)); __v; })
78
+ ({ u16 __v = (*(__force const volatile u16 *) (addr)); __v; })
79
79
#define rom_in_le16 (addr ) \
80
- ({ u16 __v = le16_to_cpu(*(__force volatile u16 *) (addr)); __v; })
80
+ ({ u16 __v = le16_to_cpu(*(__force const volatile u16 *) (addr)); __v; })
81
81
82
82
#define rom_out_8 (addr , b ) \
83
83
(void)({u8 __maybe_unused __w, __v = (b); u32 _addr = ((u32) (addr)); \
98
98
#define raw_rom_outw (val , port ) rom_out_be16((port), (val))
99
99
#endif /* CONFIG_ATARI_ROM_ISA */
100
100
101
- static inline void raw_insb (volatile u8 __iomem * port , u8 * buf , unsigned int len )
101
+ static inline void raw_insb (const volatile u8 __iomem * port , u8 * buf ,
102
+ unsigned int len )
102
103
{
103
104
unsigned int i ;
104
105
@@ -146,7 +147,7 @@ static inline void raw_outsb(volatile u8 __iomem *port, const u8 *buf,
146
147
}
147
148
}
148
149
149
- static inline void raw_insw (volatile u16 __iomem * port , u16 * buf , unsigned int nr )
150
+ static inline void raw_insw (volatile const u16 __iomem * port , u16 * buf , unsigned int nr )
150
151
{
151
152
unsigned int tmp ;
152
153
@@ -225,7 +226,7 @@ static inline void raw_outsw(volatile u16 __iomem *port, const u16 *buf,
225
226
}
226
227
}
227
228
228
- static inline void raw_insl (volatile u32 __iomem * port , u32 * buf , unsigned int nr )
229
+ static inline void raw_insl (const volatile u32 __iomem * port , u32 * buf , unsigned int nr )
229
230
{
230
231
unsigned int tmp ;
231
232
@@ -305,7 +306,7 @@ static inline void raw_outsl(volatile u32 __iomem *port, const u32 *buf,
305
306
}
306
307
307
308
308
- static inline void raw_insw_swapw (volatile u16 __iomem * port , u16 * buf ,
309
+ static inline void raw_insw_swapw (const volatile u16 __iomem * port , u16 * buf ,
309
310
unsigned int nr )
310
311
{
311
312
if ((nr ) % 8 )
@@ -413,7 +414,8 @@ static inline void raw_outsw_swapw(volatile u16 __iomem *port, const u16 *buf,
413
414
414
415
415
416
#if defined(CONFIG_ATARI_ROM_ISA )
416
- static inline void raw_rom_insb (volatile u8 __iomem * port , u8 * buf , unsigned int len )
417
+ static inline void raw_rom_insb (const volatile u8 __iomem * port , u8 * buf ,
418
+ unsigned int len )
417
419
{
418
420
unsigned int i ;
419
421
@@ -430,7 +432,7 @@ static inline void raw_rom_outsb(volatile u8 __iomem *port, const u8 *buf,
430
432
rom_out_8 (port , * buf ++ );
431
433
}
432
434
433
- static inline void raw_rom_insw (volatile u16 __iomem * port , u16 * buf ,
435
+ static inline void raw_rom_insw (const volatile u16 __iomem * port , u16 * buf ,
434
436
unsigned int nr )
435
437
{
436
438
unsigned int i ;
@@ -448,7 +450,7 @@ static inline void raw_rom_outsw(volatile u16 __iomem *port, const u16 *buf,
448
450
rom_out_be16 (port , * buf ++ );
449
451
}
450
452
451
- static inline void raw_rom_insw_swapw (volatile u16 __iomem * port , u16 * buf ,
453
+ static inline void raw_rom_insw_swapw (const volatile u16 __iomem * port , u16 * buf ,
452
454
unsigned int nr )
453
455
{
454
456
unsigned int i ;
0 commit comments