From: Harvey Harrison <harvey.harrison@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 17/21] fs: remaining users of aligned-endian get/put helpers
Date: Tue, 20 May 2008 11:06:13 -0700 [thread overview]
Message-ID: <1211306773.5915.174.camel@brick> (raw)
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
fs/hfsplus/wrapper.c | 6 +++---
fs/isofs/compress.c | 4 ++--
fs/partitions/acorn.c | 2 +-
fs/qnx4/inode.c | 2 +-
fs/reiserfs/super.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 175d08e..0e2fd86 100644
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@@ -35,17 +35,17 @@ static int hfsplus_read_mdb(void *bufptr, struct hfsplus_wd *wd)
sig != cpu_to_be16(HFSPLUS_VOLHEAD_SIGX))
return 0;
- attrib = be16_to_cpu(*(__be16 *)(bufptr + HFSP_WRAPOFF_ATTRIB));
+ attrib = get_be16(bufptr + HFSP_WRAPOFF_ATTRIB);
if (!(attrib & HFSP_WRAP_ATTRIB_SLOCK) ||
!(attrib & HFSP_WRAP_ATTRIB_SPARED))
return 0;
- wd->ablk_size = be32_to_cpu(*(__be32 *)(bufptr + HFSP_WRAPOFF_ABLKSIZE));
+ wd->ablk_size = get_be32(bufptr + HFSP_WRAPOFF_ABLKSIZE);
if (wd->ablk_size < HFSPLUS_SECTOR_SIZE)
return 0;
if (wd->ablk_size % HFSPLUS_SECTOR_SIZE)
return 0;
- wd->ablk_start = be16_to_cpu(*(__be16 *)(bufptr + HFSP_WRAPOFF_ABLKSTART));
+ wd->ablk_start = get_be16(bufptr + HFSP_WRAPOFF_ABLKSTART);
extent = get_unaligned_be32(bufptr + HFSP_WRAPOFF_EMBEDEXT);
wd->embed_start = (extent >> 16) & 0xFFFF;
diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c
index defb932..d6b9f47 100644
--- a/fs/isofs/compress.c
+++ b/fs/isofs/compress.c
@@ -124,7 +124,7 @@ static int zisofs_readpage(struct file *file, struct page *page)
brelse(ptrbh[1]);
goto eio;
}
- cstart = le32_to_cpu(*(__le32 *)(bh->b_data + (blockptr & bufmask)));
+ cstart = get_le32(bh->b_data + (blockptr & bufmask));
if ( indexblocks == 2 ) {
/* We just crossed a block boundary. Switch to the next block */
@@ -136,7 +136,7 @@ static int zisofs_readpage(struct file *file, struct page *page)
goto eio;
}
}
- cend = le32_to_cpu(*(__le32 *)(bh->b_data + (blockendptr & bufmask)));
+ cend = get_le32(bh->b_data + (blockendptr & bufmask));
brelse(bh);
if (cstart > cend)
diff --git a/fs/partitions/acorn.c b/fs/partitions/acorn.c
index 3d3e166..45cbb3a 100644
--- a/fs/partitions/acorn.c
+++ b/fs/partitions/acorn.c
@@ -344,7 +344,7 @@ static inline int valid_ics_sector(const unsigned char *data)
for (i = 0, sum = 0x50617274; i < 508; i++)
sum += data[i];
- sum -= le32_to_cpu(*(__le32 *)(&data[508]));
+ sum -= get_le32(&data[508]);
return sum == 0;
}
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index b31ab78..80872f5 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -372,7 +372,7 @@ static int qnx4_fill_super(struct super_block *s, void *data, int silent)
printk("qnx4: unable to read the superblock\n");
goto outnobh;
}
- if ( le32_to_cpup((__le32*) bh->b_data) != QNX4_SUPER_MAGIC ) {
+ if (get_le32(bh->b_data) != QNX4_SUPER_MAGIC) {
if (!silent)
printk("qnx4: wrong fsid in superblock.\n");
goto out;
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index ed424d7..d7b0215 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -221,7 +221,7 @@ static int finish_unfinished(struct super_block *s)
/* reiserfs_iget needs k_dirid and k_objectid only */
item = B_I_PITEM(bh, ih);
- obj_key.on_disk_key.k_dir_id = le32_to_cpu(*(__le32 *) item);
+ obj_key.on_disk_key.k_dir_id = get_le32(item);
obj_key.on_disk_key.k_objectid =
le32_to_cpu(ih->ih_key.k_objectid);
obj_key.on_disk_key.k_offset = 0;
--
1.5.5.1.570.g26b5e
reply other threads:[~2008-05-20 18:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1211306773.5915.174.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®