From: Domen Puncer <domen@coderock.org>
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: linux-fsdevel@vger.kernel.org, adobriyan@mail.ru
Subject: Re: [patch 6/6 with proper signed-off] fs/qnx4/*: fix sparse warnings
Date: Sun, 20 Mar 2005 12:55:55 +0100 [thread overview]
Message-ID: <20050320115555.GQ14273@nd47.coderock.org> (raw)
In-Reply-To: <20050319131841.3A73E1F1EE@trashy.coderock.org>
Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
kj-domen/fs/qnx4/dir.c | 2 +-
kj-domen/fs/qnx4/inode.c | 4 ++--
kj-domen/include/linux/qnx4_fs.h | 18 +++++++++---------
kj-domen/include/linux/qnxtypes.h | 16 ++++++++--------
4 files changed, 20 insertions(+), 20 deletions(-)
diff -puN fs/qnx4/dir.c~sparse-fs_qnx4_dir fs/qnx4/dir.c
--- kj/fs/qnx4/dir.c~sparse-fs_qnx4_dir 2005-03-20 12:11:29.000000000 +0100
+++ kj-domen/fs/qnx4/dir.c 2005-03-20 12:11:29.000000000 +0100
@@ -61,7 +61,7 @@ static int qnx4_readdir(struct file *fil
ino = blknum * QNX4_INODES_PER_BLOCK + ix - 1;
else {
le = (struct qnx4_link_info*)de;
- ino = ( le->dl_inode_blk - 1 ) *
+ ino = ( le32_to_cpu(le->dl_inode_blk) - 1 ) *
QNX4_INODES_PER_BLOCK +
le->dl_inode_ndx;
}
diff -puN fs/qnx4/inode.c~sparse-fs_qnx4_dir fs/qnx4/inode.c
--- kj/fs/qnx4/inode.c~sparse-fs_qnx4_dir 2005-03-20 12:11:29.000000000 +0100
+++ kj-domen/fs/qnx4/inode.c 2005-03-20 12:11:29.000000000 +0100
@@ -236,7 +236,7 @@ unsigned long qnx4_block_map( struct ino
struct buffer_head *bh = NULL;
struct qnx4_xblk *xblk = NULL;
struct qnx4_inode_entry *qnx4_inode = qnx4_raw_inode(inode);
- qnx4_nxtnt_t nxtnt = le16_to_cpu(qnx4_inode->di_num_xtnts);
+ u16 nxtnt = le16_to_cpu(qnx4_inode->di_num_xtnts);
if ( iblock < le32_to_cpu(qnx4_inode->di_first_xtnt.xtnt_size) ) {
// iblock is in the first extent. This is easy.
@@ -372,7 +372,7 @@ static int qnx4_fill_super(struct super_
printk("qnx4: unable to read the superblock\n");
goto outnobh;
}
- if ( le32_to_cpu( *(__u32*)bh->b_data ) != QNX4_SUPER_MAGIC ) {
+ if ( le32_to_cpup((__le32*) bh->b_data) != QNX4_SUPER_MAGIC ) {
if (!silent)
printk("qnx4: wrong fsid in superblock.\n");
goto out;
diff -puN include/linux/qnx4_fs.h~sparse-fs_qnx4_dir include/linux/qnx4_fs.h
--- kj/include/linux/qnx4_fs.h~sparse-fs_qnx4_dir 2005-03-20 12:11:29.000000000 +0100
+++ kj-domen/include/linux/qnx4_fs.h 2005-03-20 12:11:29.000000000 +0100
@@ -46,11 +46,11 @@ struct qnx4_inode_entry {
char di_fname[QNX4_SHORT_NAME_MAX];
qnx4_off_t di_size;
qnx4_xtnt_t di_first_xtnt;
- __u32 di_xblk;
- __s32 di_ftime;
- __s32 di_mtime;
- __s32 di_atime;
- __s32 di_ctime;
+ __le32 di_xblk;
+ __le32 di_ftime;
+ __le32 di_mtime;
+ __le32 di_atime;
+ __le32 di_ctime;
qnx4_nxtnt_t di_num_xtnts;
qnx4_mode_t di_mode;
qnx4_muid_t di_uid;
@@ -63,18 +63,18 @@ struct qnx4_inode_entry {
struct qnx4_link_info {
char dl_fname[QNX4_NAME_MAX];
- __u32 dl_inode_blk;
+ __le32 dl_inode_blk;
__u8 dl_inode_ndx;
__u8 dl_spare[10];
__u8 dl_status;
};
struct qnx4_xblk {
- __u32 xblk_next_xblk;
- __u32 xblk_prev_xblk;
+ __le32 xblk_next_xblk;
+ __le32 xblk_prev_xblk;
__u8 xblk_num_xtnts;
__u8 xblk_spare[3];
- __s32 xblk_num_blocks;
+ __le32 xblk_num_blocks;
qnx4_xtnt_t xblk_xtnts[QNX4_MAX_XTNTS_PER_XBLK];
char xblk_signature[8];
qnx4_xtnt_t xblk_first_xtnt;
diff -puN include/linux/qnxtypes.h~sparse-fs_qnx4_dir include/linux/qnxtypes.h
--- kj/include/linux/qnxtypes.h~sparse-fs_qnx4_dir 2005-03-20 12:11:29.000000000 +0100
+++ kj-domen/include/linux/qnxtypes.h 2005-03-20 12:11:29.000000000 +0100
@@ -12,18 +12,18 @@
#ifndef _QNX4TYPES_H
#define _QNX4TYPES_H
-typedef __u16 qnx4_nxtnt_t;
+typedef __le16 qnx4_nxtnt_t;
typedef __u8 qnx4_ftype_t;
typedef struct {
- __u32 xtnt_blk;
- __u32 xtnt_size;
+ __le32 xtnt_blk;
+ __le32 xtnt_size;
} qnx4_xtnt_t;
-typedef __u16 qnx4_mode_t;
-typedef __u16 qnx4_muid_t;
-typedef __u16 qnx4_mgid_t;
-typedef __u32 qnx4_off_t;
-typedef __u16 qnx4_nlink_t;
+typedef __le16 qnx4_mode_t;
+typedef __le16 qnx4_muid_t;
+typedef __le16 qnx4_mgid_t;
+typedef __le32 qnx4_off_t;
+typedef __le16 qnx4_nlink_t;
#endif
_
prev parent reply other threads:[~2005-03-20 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-19 13:18 [patch 6/6] fs/qnx4/*: fix sparse warnings domen
2005-03-20 11:55 ` Domen Puncer [this message]
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=20050320115555.GQ14273@nd47.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.