arch: use aligned-endian get/put helpers
Subsystems (2)
PATCH 21/21 arch: use aligned-endian get/put helpers
Signed-off-by Harvey Harrison <[email protected]>
--- arch/parisc/lib/iomap.c | 4 ++-- arch/powerpc/sysdev/qe_lib/qe.c | 2 +- arch/sparc64/kernel/unaligned.c | 8 ++++---- arch/sparc64/lib/PeeCeeI.c | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-)
arch/parisc/lib/iomap.c +2 -2
@@ -278,7 +278,7 @@ unsigned int ioread16(void __iomem *addr) {if (unlikely (INDIRECT_ADDR (addr)))return iomap_ops[ADDR_TO_REGION (addr)]->read16 (addr); -return le16_to_cpup ((u16 *)addr); +return get_le16 (addr); }unsigned int ioread16be (void __iomem *addr)
@@ -292,7 +292,7 @@ unsigned int ioread32(void __iomem *addr) {if (unlikely (INDIRECT_ADDR (addr)))return iomap_ops[ADDR_TO_REGION (addr)]->read32 (addr); -return le32_to_cpup ((u32 *)addr); +return get_le32 (addr); }unsigned int ioread32be (void __iomem *addr)
arch/powerpc/sysdev/qe_lib/qe.c +1 -1
@@ -528,7 +528,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware) }/* Validate the CRC */ - crc =be32_to_cpu (*(__be32 *)((void *)firmware + calc_size)); + crc =get_be32 ((void *)firmware + calc_size);if (crc !=crc32 (0 , firmware, calc_size)) {printk (KERN_ERR "qe-firmware: firmware CRC is invalid\n" );return -EIO ;
arch/sparc64/kernel/unaligned.c +4 -4
@@ -535,11 +535,11 @@ int handle_ldf_stq(u32 insn, struct pt_regs *regs)u64 tmp;switch (size) { -case 1 : data[0 ] =le32_to_cpup (data +0 );break ; -default :*(u64 *)(data +0 ) =le64_to_cpup ((u64 *)(data +0 )); +case 1 : data[0 ] =get_le32 (data +0 );break ; + default:*(u64 *)(data + 0) = get_le64(data + 0));break ; -case 4 : tmp =le64_to_cpup ((u64 *)(data +0 )); - *(u64 *)(data +0 ) =le64_to_cpup ((u64 *)(data +2 )); +case 4 : tmp =get_le64 (data +0 ); + *(u64 *)(data +0 ) =get_le64 (data +2 ); *(u64 *)(data +2 ) = tmp;break ; }
arch/sparc64/lib/PeeCeeI.c +3 -3
@@ -25,14 +25,14 @@ void outsw(unsigned long __addr, const void *src, unsigned long count)u32 *pi;if (((u64 )src) &0x2 ) { -u16 val =le16_to_cpup (ps); +u16 val =get_le16 (ps);outw (val, addr); ps++; count--; } pi = (u32 *)ps;while (count >=2 ) { -u32 w =le32_to_cpup (pi); +u32 w =get_le32 (pi); pi++;outw (w >>0 , addr);
@@ -41,7 +41,7 @@ void outsw(unsigned long __addr, const void *src, unsigned long count) } ps = (u16 *)pi;if (count) { -u16 val =le16_to_cpup (ps); +u16 val =get_le16 (ps);outw (val, addr); } }
Signature · 1 line
1.5.5.1.570.g26b5e