* [patch 5/6] fs/hpfs/inode.c: fix sparse warnings
@ 2005-03-19 13:18 domen
2005-03-20 11:55 ` [patch 5/6 with proper signed-off] " Domen Puncer
0 siblings, 1 reply; 2+ messages in thread
From: domen @ 2005-03-19 13:18 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel, domen, adobriyan
Signed-off-by: Domen Puncer <domen@coderock.org>
---
kj-domen/fs/hpfs/inode.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff -puN fs/hpfs/inode.c~sparse-fs_hpfs_inode fs/hpfs/inode.c
--- kj/fs/hpfs/inode.c~sparse-fs_hpfs_inode 2005-03-18 20:05:29.000000000 +0100
+++ kj-domen/fs/hpfs/inode.c 2005-03-18 20:05:29.000000000 +0100
@@ -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] 2+ messages in thread* Re: [patch 5/6 with proper signed-off] fs/hpfs/inode.c: fix sparse warnings
2005-03-19 13:18 [patch 5/6] fs/hpfs/inode.c: fix sparse warnings domen
@ 2005-03-20 11:55 ` Domen Puncer
0 siblings, 0 replies; 2+ messages in thread
From: Domen Puncer @ 2005-03-20 11:55 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel, adobriyan
Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
kj-domen/fs/hpfs/inode.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff -puN fs/hpfs/inode.c~sparse-fs_hpfs_inode fs/hpfs/inode.c
--- kj/fs/hpfs/inode.c~sparse-fs_hpfs_inode 2005-03-20 12:11:28.000000000 +0100
+++ kj-domen/fs/hpfs/inode.c 2005-03-20 12:11:28.000000000 +0100
@@ -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] 2+ messages in thread
end of thread, other threads:[~2005-03-20 11:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-19 13:18 [patch 5/6] fs/hpfs/inode.c: fix sparse warnings domen
2005-03-20 11:55 ` [patch 5/6 with proper signed-off] " Domen Puncer
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.