All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/1] fs/hpfs/inode.c: fix sparse warnings
@ 2005-06-20 21:56 domen
  0 siblings, 0 replies; only message in thread
From: domen @ 2005-06-20 21:56 UTC (permalink / raw)
  To: mikulas; +Cc: linux-fsdevel, Alexey Dobriyan, domen

[-- Attachment #1: sparse-fs_hpfs_inode.patch --]
[-- Type: text/plain, Size: 1893 bytes --]

From: Alexey Dobriyan <adobriyan@mail.ru>


Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
 inode.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Index: quilt/fs/hpfs/inode.c
===================================================================
--- quilt.orig/fs/hpfs/inode.c
+++ quilt/fs/hpfs/inode.c
@@ -61,14 +61,14 @@ void hpfs_read_inode(struct inode *i)
 	if (hpfs_sb(i->i_sb)->sb_eas) {
 		if ((ea = hpfs_get_ea(i->i_sb, fnode, "UID", &ea_size))) {
 			if (ea_size == 2) {
-				i->i_uid = le16_to_cpu(*(u16*)ea);
+				i->i_uid = le16_to_cpup((__le16*)ea);
 				hpfs_inode->i_ea_uid = 1;
 			}
 			kfree(ea);
 		}
 		if ((ea = hpfs_get_ea(i->i_sb, fnode, "GID", &ea_size))) {
 			if (ea_size == 2) {
-				i->i_gid = le16_to_cpu(*(u16*)ea);
+				i->i_gid = le16_to_cpup((__le16*)ea);
 				hpfs_inode->i_ea_gid = 1;
 			}
 			kfree(ea);
@@ -88,7 +88,7 @@ void hpfs_read_inode(struct inode *i)
 			int rdev = 0;
 			umode_t mode = hpfs_sb(sb)->sb_mode;
 			if (ea_size == 2) {
-				mode = le16_to_cpu(*(u16*)ea);
+				mode = le16_to_cpup((__le16*)ea);
 				hpfs_inode->i_ea_mode = 1;
 			}
 			kfree(ea);
@@ -96,7 +96,7 @@ void hpfs_read_inode(struct inode *i)
 			if (S_ISBLK(mode) || S_ISCHR(mode)) {
 				if ((ea = hpfs_get_ea(i->i_sb, fnode, "DEV", &ea_size))) {
 					if (ea_size == 4)
-						rdev = le32_to_cpu(*(u32*)ea);
+						rdev = le32_to_cpup((__le32*)ea);
 					kfree(ea);
 				}
 			}
@@ -149,7 +149,7 @@ static void hpfs_write_inode_ea(struct i
 		   we'd better not overwrite them
 		hpfs_error(i->i_sb, "fnode %08x has some unknown HPFS386 stuctures", i->i_ino);
 	} else*/ if (hpfs_sb(i->i_sb)->sb_eas >= 2) {
-		u32 ea;
+		__le32 ea;
 		if ((i->i_uid != hpfs_sb(i->i_sb)->sb_uid) || hpfs_inode->i_ea_uid) {
 			ea = cpu_to_le32(i->i_uid);
 			hpfs_set_ea(i, fnode, "UID", (char*)&ea, 2);

--

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

only message in thread, other threads:[~2005-06-20 22:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-20 21:56 [patch 1/1] fs/hpfs/inode.c: fix sparse warnings domen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.