From 5e0f001736651f6f859aeca95f895c829d223cdb Mon Sep 17 00:00:00 2001 From: Marcin Slusarz Date: Fri, 8 Feb 2008 04:20:41 -0800 Subject: 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 Acked-by: Jan Kara Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/udf/super.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'fs/udf/super.c') diff --git a/fs/udf/super.c b/fs/udf/super.c index 12fb91d..b102958 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -1014,20 +1014,20 @@ static int udf_load_partdesc(struct super_block *sb, struct buffer_head *bh) le32_to_cpu(p->partitionLength); /* blocks */ map->s_partition_root = le32_to_cpu(p->partitionStartingLocation); - if (le32_to_cpu(p->accessType) == - PD_ACCESS_TYPE_READ_ONLY) + if (p->accessType == + cpu_to_le32(PD_ACCESS_TYPE_READ_ONLY)) map->s_partition_flags |= UDF_PART_FLAG_READ_ONLY; - if (le32_to_cpu(p->accessType) == - PD_ACCESS_TYPE_WRITE_ONCE) + if (p->accessType == + cpu_to_le32(PD_ACCESS_TYPE_WRITE_ONCE)) map->s_partition_flags |= UDF_PART_FLAG_WRITE_ONCE; - if (le32_to_cpu(p->accessType) == - PD_ACCESS_TYPE_REWRITABLE) + if (p->accessType == + cpu_to_le32(PD_ACCESS_TYPE_REWRITABLE)) map->s_partition_flags |= UDF_PART_FLAG_REWRITABLE; - if (le32_to_cpu(p->accessType) == - PD_ACCESS_TYPE_OVERWRITABLE) + if (p->accessType == + cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE)) map->s_partition_flags |= UDF_PART_FLAG_OVERWRITABLE; -- cgit v1.1