ntfs: remove private wrapper of endian helpers
PATCH 1/1 ntfs: remove private wrapper of endian helpers
The base versions handle constant folding now and are shorter than these private wrappers, use them directly.
Signed-off-by Harvey Harrison <[email protected]>
---
Anton, all of the pieces are in linus' mainline tree now. Please queue this for 2.6.30. All of this is direct replacement other than the small bits in mft.c/inode.c as we discussed back in December when I last sent this.
fs/ntfs/dir.c | 4 +- fs/ntfs/inode.c | 3 +- fs/ntfs/layout.h | 329 ++++++++++++++++++++++++++--------------------------- fs/ntfs/logfile.h | 6 +- fs/ntfs/mft.c | 2 +- fs/ntfs/super.c | 50 ++++---- fs/ntfs/usnjrnl.h | 48 ++++---- 7 files changed, 215 insertions(+), 227 deletions(-)
fs/ntfs/dir.c +2 -2
@@ -32,8 +32,8 @@/** * The little endian Unicode string $I30 as a global constant. */ -ntfschar I30 [5 ] = {const_cpu_to_le16 ('$' ),const_cpu_to_le16 ('I' ), -const_cpu_to_le16 ('3' ),const_cpu_to_le16 ('0' ),0 }; +ntfschar I30 [5 ] = {cpu_to_le16 ('$' ),cpu_to_le16 ('I' ), +cpu_to_le16 ('3' ),cpu_to_le16 ('0' ),0 };/** * ntfs_lookup_inode_by_name - find an inode in a directory given its name
fs/ntfs/inode.c +1 -2
@@ -1975,8 +1975,7 @@ int ntfs_read_inode_mount(struct inode *vi) goto em_put_err_out; next_al_entry = (ATTR_LIST_ENTRY *)((u8 *)al_entry +le16_to_cpu (al_entry->length)); -if (le32_to_cpu (al_entry->type) > -const_le32_to_cpu (AT_DATA )) +if (le32_to_cpu (al_entry->type) >le32_to_cpu (AT_DATA )) goto em_put_err_out;if (AT_DATA != al_entry->type)continue ;
fs/ntfs/layout.h +159 -170
581 lines not on this page · raw message
fs/ntfs/logfile.h +3 -3
@@ -104,7 +104,7 @@ typedef struct {* in this particular client array. Also inside the client records themselves, * this means that there are no client records preceding or following this one. */ -#define LOGFILE_NO_CLIENT const_cpu_to_le16(0xffff) +#define LOGFILE_NO_CLIENT cpu_to_le16(0xffff)#define LOGFILE_NO_CLIENT_CPU 0xffff/*
@@ -112,8 +112,8 @@ typedef struct {* information about the log file in which they are present. */ enum { -RESTART_VOLUME_IS_CLEAN =const_cpu_to_le16 (0x0002 ), -RESTART_SPACE_FILLER =const_cpu_to_le16 (0xffff ),/* gcc: Force enum bit width to 16. */ +RESTART_VOLUME_IS_CLEAN =cpu_to_le16 (0x0002 ), +RESTART_SPACE_FILLER =cpu_to_le16 (0xffff ),/* gcc: Force enum bit width to 16. */ } __attribute__ ((__packed__ ));typedef le16 RESTART_AREA_FLAGS ;
fs/ntfs/mft.c +1 -1
@@ -2839,7 +2839,7 @@ int ntfs_extent_mft_record_free(ntfs_inode *ni, MFT_RECORD *m)*/ /* Mark the mft record as not in use. */ - m->flags &=const_cpu_to_le16 (~const_le16_to_cpu (MFT_RECORD_IN_USE )); + m->flags &= ~MFT_RECORD_IN_USE ;/* Increment the sequence number, skipping zero, if it is not zero. */ old_seq_no = m->sequence_number;
fs/ntfs/super.c +25 -25
80 lines not on this page · raw message
fs/ntfs/usnjrnl.h +24 -24
60 lines not on this page · raw message
Signature · 1 line
1.6.2.rc0.218.gde7c