Skip to contentSkip to conversation

hfsplus: fix warning [next:akpm 357/436] fs/hfsplus/xattr.c:363:23: sparse: cast to restricted __be32

PATCH New Vyacheslav Dubeyko 1 participant 1 message Nov 28, 2012

Subsystems (2)
lore
Share & tools
lore

Vyacheslav Dubeyko

author maintainer
#0 lore raw

PATCH 1/1 hfsplus: fix warning [next:akpm 357/436] fs/hfsplus/xattr.c:363:23: sparse: cast to restricted __be32

Hi,

This patch fixes warning in [next:akpm 357/436] fs/hfsplus/xattr.c:363:23: sparse: cast to restricted __be32.

With the best regards,
Vyacheslav Dubeyko.
--
From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH] hfsplus: fix warning [next:akpm 357/436] fs/hfsplus/xattr.c:363:23: sparse: cast to restricted __be32

The patch fixes warning in [next:akpm 357/436] fs/hfsplus/xattr.c:363:23: sparse: cast to restricted __be32.

Cc Fengguang Wu <[email protected]>
Cc Andrew Morton <[email protected]>
---
 fs/hfsplus/xattr.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
fs/hfsplus/xattr.c +4 -3
index 11ad3b4..e8a4b08 100644
@@ -310,6 +310,7 @@ ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
 	struct inode *inode = dentry->d_inode;
 	struct hfs_find_data fd;
 	hfsplus_attr_entry *entry;
+	__be32 xattr_record_type;
 	u32 record_type;
 	u16 record_length = 0;
 	ssize_t res = 0;
@@ -358,9 +359,9 @@ ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
 		goto out;
 	}
 
-	hfs_bnode_read(fd.bnode, &record_type,
-			fd.entryoffset, sizeof(record_type));
-	record_type = be32_to_cpu(record_type);
+	hfs_bnode_read(fd.bnode, &xattr_record_type,
+			fd.entryoffset, sizeof(xattr_record_type));
+	record_type = be32_to_cpu(xattr_record_type);
 	if (record_type == HFSPLUS_ATTR_INLINE_DATA) {
 		record_length = hfs_bnode_read_u16(fd.bnode,
 				fd.entryoffset +
Signature · 1 line
1.7.9.5