All of lore.kernel.org
 help / color / mirror / Atom feed
From: domen@coderock.org
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: linux-fsdevel@vger.kernel.org, domen@coderock.org, adobriyan@mail.ru
Subject: [patch 5/6] fs/hpfs/inode.c: fix sparse warnings
Date: Sat, 19 Mar 2005 14:18:38 +0100	[thread overview]
Message-ID: <20050319131838.5378C1ECA8@trashy.coderock.org> (raw)




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);
_

             reply	other threads:[~2005-03-19 13:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-19 13:18 domen [this message]
2005-03-20 11:55 ` [patch 5/6 with proper signed-off] fs/hpfs/inode.c: fix sparse warnings Domen Puncer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050319131838.5378C1ECA8@trashy.coderock.org \
    --to=domen@coderock.org \
    --cc=adobriyan@mail.ru \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.