summaryrefslogtreecommitdiffstats
path: root/fs/jfs/endian24.h
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2014-12-19 06:51:26 +0000
committerDave Kleikamp <dave.kleikamp@oracle.com>2014-12-23 17:01:24 -0600
commite1f1fe798d2f2eab904624125ba924d08205f960 (patch)
tree7da293aa0c88034b38b03afeb7e46823a7f87751 /fs/jfs/endian24.h
parent53262d12d1658669029ab39a63e3d314108abe66 (diff)
downloadop-kernel-dev-e1f1fe798d2f2eab904624125ba924d08205f960.zip
op-kernel-dev-e1f1fe798d2f2eab904624125ba924d08205f960.tar.gz
jfs: get rid of homegrown endianness helpers
Get rid of le24 stuff, along with the bitfields use - all that stuff can be done with standard stuff, in sparse-verifiable manner. Moreover, that way (shift-and-mask) often generates better code - gcc optimizer sucks on bitfields... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> ----
Diffstat (limited to 'fs/jfs/endian24.h')
-rw-r--r--fs/jfs/endian24.h49
1 files changed, 0 insertions, 49 deletions
diff --git a/fs/jfs/endian24.h b/fs/jfs/endian24.h
deleted file mode 100644
index fa92f7f1..0000000
--- a/fs/jfs/endian24.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef _H_ENDIAN24
-#define _H_ENDIAN24
-
-/*
- * endian24.h:
- *
- * Endian conversion for 24-byte data
- *
- */
-#define __swab24(x) \
-({ \
- __u32 __x = (x); \
- ((__u32)( \
- ((__x & (__u32)0x000000ffUL) << 16) | \
- (__x & (__u32)0x0000ff00UL) | \
- ((__x & (__u32)0x00ff0000UL) >> 16) )); \
-})
-
-#if (defined(__KERNEL__) && defined(__LITTLE_ENDIAN)) || (defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN))
- #define __cpu_to_le24(x) ((__u32)(x))
- #define __le24_to_cpu(x) ((__u32)(x))
-#else
- #define __cpu_to_le24(x) __swab24(x)
- #define __le24_to_cpu(x) __swab24(x)
-#endif
-
-#ifdef __KERNEL__
- #define cpu_to_le24 __cpu_to_le24
- #define le24_to_cpu __le24_to_cpu
-#endif
-
-#endif /* !_H_ENDIAN24 */
OpenPOWER on IntegriCloud