From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vyacheslav Dubeyko Subject: [PATCH] hfsplus: fix warning [next:akpm 357/436] fs/hfsplus/xattr.c:363:23: sparse: cast to restricted __be32 Date: Wed, 28 Nov 2012 16:18:07 +0400 Message-ID: <1354105087.2017.3.camel@slavad-ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Andrew Morton , Fengguang Wu To: linux-fsdevel@vger.kernel.org Return-path: Received: from oproxy8-pub.bluehost.com ([69.89.22.20]:56405 "HELO oproxy8-pub.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754510Ab2K1MSR (ORCPT ); Wed, 28 Nov 2012 07:18:17 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 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 Cc: Fengguang Wu Cc: Andrew Morton --- 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