aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/i4l/isdn_net.h
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-11-13 22:41:29 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-13 22:41:29 -0800
commit00bcd522ea0a62f5e2a9c6ad4924cbbd8d05b026 (patch)
treece16dea6960f9d745120941c6bd32b3ca5abe769 /drivers/isdn/i4l/isdn_net.h
parentnetdevice: safe convert to netdev_priv() #part-4 (diff)
downloadlinux-dev-00bcd522ea0a62f5e2a9c6ad4924cbbd8d05b026.tar.xz
linux-dev-00bcd522ea0a62f5e2a9c6ad4924cbbd8d05b026.zip
isdn: use %pI4, remove get_{u8/u16/u32} and put_{u8/u16/u32} inlines
They would have been better named as get_be16, put_be16, etc. as they were hiding an endian shift inside. They don't add much over explicitly coding the byteshifting and gcc sometimes has a problem with builtin_constant_p inside inline functions, so it may do a better job of byteswapping at compile time rather than runtime. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/isdn/i4l/isdn_net.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/isdn/i4l/isdn_net.h b/drivers/isdn/i4l/isdn_net.h
index be4949715d55..2a6c370ea87f 100644
--- a/drivers/isdn/i4l/isdn_net.h
+++ b/drivers/isdn/i4l/isdn_net.h
@@ -145,46 +145,3 @@ static __inline__ void isdn_net_rm_from_bundle(isdn_net_local *lp)
spin_unlock_irqrestore(&master_lp->netdev->queue_lock, flags);
}
-static inline int
-put_u8(unsigned char *p, u8 x)
-{
- *p = x;
- return 1;
-}
-
-static inline int
-put_u16(unsigned char *p, u16 x)
-{
- *((u16 *)p) = htons(x);
- return 2;
-}
-
-static inline int
-put_u32(unsigned char *p, u32 x)
-{
- *((u32 *)p) = htonl(x);
- return 4;
-}
-
-static inline int
-get_u8(unsigned char *p, u8 *x)
-{
- *x = *p;
- return 1;
-}
-
-static inline int
-get_u16(unsigned char *p, u16 *x)
-{
- *x = ntohs(*((u16 *)p));
- return 2;
-}
-
-static inline int
-get_u32(unsigned char *p, u32 *x)
-{
- *x = ntohl(*((u32 *)p));
- return 4;
-}
-
-