linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hfsplus: fix warning [next:akpm 357/436] fs/hfsplus/xattr.c:363:23: sparse: cast to restricted __be32
@ 2012-11-28 12:18 Vyacheslav Dubeyko
  0 siblings, 0 replies; only message in thread
From: Vyacheslav Dubeyko @ 2012-11-28 12:18 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Andrew Morton, Fengguang Wu

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 <slava@dubeyko.com>
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.

Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 fs/hfsplus/xattr.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c
index 11ad3b4..e8a4b08 100644
--- a/fs/hfsplus/xattr.c
+++ b/fs/hfsplus/xattr.c
@@ -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 +
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-28 12:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 12:18 [PATCH] hfsplus: fix warning [next:akpm 357/436] fs/hfsplus/xattr.c:363:23: sparse: cast to restricted __be32 Vyacheslav Dubeyko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).