Skip to content

Commit

Permalink
powerpc: Remove unused st_le*() and ld_le* functions
Browse files Browse the repository at this point in the history
The powerpc specific st_le*() and ld_le*() functions in
arch/powerpc/asm/swab.h no longer have any users.  They are also
misleadingly named, since they always byteswap, even on a little-endian
host.

This patch removes them.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
David Gibson authored and Benjamin Herrenschmidt committed Mar 24, 2015
1 parent d078eed commit 0eebf9b
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions arch/powerpc/include/asm/swab.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,4 @@

#include <uapi/asm/swab.h>

static __inline__ __u16 ld_le16(const volatile __u16 *addr)
{
__u16 val;

__asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr));
return val;
}

static __inline__ void st_le16(volatile __u16 *addr, const __u16 val)
{
__asm__ __volatile__ ("sthbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr));
}

static __inline__ __u32 ld_le32(const volatile __u32 *addr)
{
__u32 val;

__asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr));
return val;
}

static __inline__ void st_le32(volatile __u32 *addr, const __u32 val)
{
__asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr));
}

#endif /* _ASM_POWERPC_SWAB_H */

0 comments on commit 0eebf9b

Please sign in to comment.