aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/misc.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-02-08 07:20:41 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:35 -0500
commit5e0f001736651f6f859aeca95f895c829d223cdb (patch)
treea947fba71ee75b3d12f274c3663be82add9bf5df /fs/udf/misc.c
parent4daa1b87992ff210c19a6347cabde22335667004 (diff)
udf: convert byte order of constant instead of variable
convert byte order of constant instead of variable, which can be done at compile time (vs run time) Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Acked-by: Jan Kara <jack@suse.cz> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/udf/misc.c')
-rw-r--r--fs/udf/misc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/udf/misc.c b/fs/udf/misc.c
index 585e4eaed254..a3a513faddb0 100644
--- a/fs/udf/misc.c
+++ b/fs/udf/misc.c
@@ -74,8 +74,8 @@ struct genericFormat *udf_add_extendedattr(struct inode *inode, uint32_t size,
74 74
75 if (UDF_I_LENEATTR(inode)) { 75 if (UDF_I_LENEATTR(inode)) {
76 /* check checksum/crc */ 76 /* check checksum/crc */
77 if (le16_to_cpu(eahd->descTag.tagIdent) != 77 if (eahd->descTag.tagIdent !=
78 TAG_IDENT_EAHD || 78 cpu_to_le16(TAG_IDENT_EAHD) ||
79 le32_to_cpu(eahd->descTag.tagLocation) != 79 le32_to_cpu(eahd->descTag.tagLocation) !=
80 UDF_I_LOCATION(inode).logicalBlockNum) 80 UDF_I_LOCATION(inode).logicalBlockNum)
81 return NULL; 81 return NULL;
@@ -161,8 +161,8 @@ struct genericFormat *udf_get_extendedattr(struct inode *inode, uint32_t type,
161 eahd = (struct extendedAttrHeaderDesc *)ea; 161 eahd = (struct extendedAttrHeaderDesc *)ea;
162 162
163 /* check checksum/crc */ 163 /* check checksum/crc */
164 if (le16_to_cpu(eahd->descTag.tagIdent) != 164 if (eahd->descTag.tagIdent !=
165 TAG_IDENT_EAHD || 165 cpu_to_le16(TAG_IDENT_EAHD) ||
166 le32_to_cpu(eahd->descTag.tagLocation) != 166 le32_to_cpu(eahd->descTag.tagLocation) !=
167 UDF_I_LOCATION(inode).logicalBlockNum) 167 UDF_I_LOCATION(inode).logicalBlockNum)
168 return NULL; 168 return NULL;
@@ -233,8 +233,8 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
233 } 233 }
234 234
235 /* Verify the tag version */ 235 /* Verify the tag version */
236 if (le16_to_cpu(tag_p->descVersion) != 0x0002U && 236 if (tag_p->descVersion != cpu_to_le16(0x0002U) &&
237 le16_to_cpu(tag_p->descVersion) != 0x0003U) { 237 tag_p->descVersion != cpu_to_le16(0x0003U)) {
238 udf_debug("tag version 0x%04x != 0x0002 || 0x0003 block %d\n", 238 udf_debug("tag version 0x%04x != 0x0002 || 0x0003 block %d\n",
239 le16_to_cpu(tag_p->descVersion), block); 239 le16_to_cpu(tag_p->descVersion), block);
240 goto error_out; 240 goto error_out;