ocfs2: fix sparse warnings in fs/ocfs2/cluster
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5fdf1e677127cb460c38733b9586b772d657be43 Commit: 5fdf1e677127cb460c38733b9586b772d657be43 Parent: a7d25539fdd43fe962a0654542ba96e889ac62b5 Author: Mark Fasheh <[EMAIL PROTECTED]> AuthorDate: Fri Apr 27 16:50:03 2007 -0700 Committer: Mark Fasheh <[EMAIL PROTECTED]> CommitDate: Wed May 2 15:08:23 2007 -0700 ocfs2: fix sparse warnings in fs/ocfs2/cluster Signed-off-by: Mark Fasheh <[EMAIL PROTECTED]> --- fs/ocfs2/cluster/heartbeat.c |2 +- fs/ocfs2/cluster/tcp.c | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index eba282d..9791134 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -438,7 +438,7 @@ static inline void o2hb_prepare_block(struct o2hb_region *reg, hb_block)); mlog(ML_HB_BIO, "our node generation = 0x%llx, cksum = 0x%x\n", -(long long)cpu_to_le64(generation), +(long long)generation, le32_to_cpu(hb_block->hb_cksum)); } diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 69caf3e..0b229a9 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c @@ -1496,7 +1496,7 @@ static void o2net_start_connect(struct work_struct *work) sock->sk->sk_allocation = GFP_ATOMIC; myaddr.sin_family = AF_INET; - myaddr.sin_addr.s_addr = (__force u32)mynode->nd_ipv4_address; + myaddr.sin_addr.s_addr = mynode->nd_ipv4_address; myaddr.sin_port = (__force u16)htons(0); /* any port */ ret = sock->ops->bind(sock, (struct sockaddr *)&myaddr, @@ -1521,8 +1521,8 @@ static void o2net_start_connect(struct work_struct *work) spin_unlock(&nn->nn_lock); remoteaddr.sin_family = AF_INET; - remoteaddr.sin_addr.s_addr = (__force u32)node->nd_ipv4_address; - remoteaddr.sin_port = (__force u16)node->nd_ipv4_port; + remoteaddr.sin_addr.s_addr = node->nd_ipv4_address; + remoteaddr.sin_port = node->nd_ipv4_port; ret = sc->sc_sock->ops->connect(sc->sc_sock, (struct sockaddr *)&remoteaddr, @@ -1810,8 +1810,8 @@ static int o2net_open_listening_sock(__be32 addr, __be16 port) int ret; struct sockaddr_in sin = { .sin_family = PF_INET, - .sin_addr = { .s_addr = (__force u32)addr }, - .sin_port = (__force u16)port, + .sin_addr = { .s_addr = addr }, + .sin_port = port, }; ret = sock_create(PF_INET, SOCK_STREAM, IPPROTO_TCP, &sock); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ocfs2: fix sparse warnings in fs/ocfs2/dlm
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a7d25539fdd43fe962a0654542ba96e889ac62b5 Commit: a7d25539fdd43fe962a0654542ba96e889ac62b5 Parent: 1ca1a111b1e6be843c9ce5245dcd570312998d94 Author: Mark Fasheh <[EMAIL PROTECTED]> AuthorDate: Fri Apr 27 16:49:20 2007 -0700 Committer: Mark Fasheh <[EMAIL PROTECTED]> CommitDate: Wed May 2 15:08:15 2007 -0700 ocfs2: fix sparse warnings in fs/ocfs2/dlm Signed-off-by: Mark Fasheh <[EMAIL PROTECTED]> --- fs/ocfs2/dlm/dlmast.c | 12 ++-- fs/ocfs2/dlm/dlmrecovery.c |4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index 241cad3..2fd8bde 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c @@ -312,8 +312,8 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data, past->type != DLM_BAST) { mlog(ML_ERROR, "Unknown ast type! %d, cookie=%u:%llu" "name=%.*s\n", past->type, -dlm_get_lock_cookie_node(be64_to_cpu(cookie)), -dlm_get_lock_cookie_seq(be64_to_cpu(cookie)), +dlm_get_lock_cookie_node(cookie), +dlm_get_lock_cookie_seq(cookie), locklen, name); ret = DLM_IVLOCKID; goto leave; @@ -324,8 +324,8 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data, mlog(0, "got %sast for unknown lockres! " "cookie=%u:%llu, name=%.*s, namelen=%u\n", past->type == DLM_AST ? "" : "b", -dlm_get_lock_cookie_node(be64_to_cpu(cookie)), -dlm_get_lock_cookie_seq(be64_to_cpu(cookie)), +dlm_get_lock_cookie_node(cookie), +dlm_get_lock_cookie_seq(cookie), locklen, name, locklen); ret = DLM_IVLOCKID; goto leave; @@ -370,8 +370,8 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data, mlog(0, "got %sast for unknown lock! cookie=%u:%llu, " "name=%.*s, namelen=%u\n", past->type == DLM_AST ? "" : "b", -dlm_get_lock_cookie_node(be64_to_cpu(cookie)), -dlm_get_lock_cookie_seq(be64_to_cpu(cookie)), +dlm_get_lock_cookie_node(cookie), +dlm_get_lock_cookie_seq(cookie), locklen, name, locklen); ret = DLM_NORMAL; diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index c1807a4..671c4ed 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c @@ -1769,7 +1769,7 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, /* lock is always created locally first, and * destroyed locally last. it must be on the list */ if (!lock) { - u64 c = ml->cookie; + __be64 c = ml->cookie; mlog(ML_ERROR, "could not find local lock " "with cookie %u:%llu!\n", dlm_get_lock_cookie_node(be64_to_cpu(c)), @@ -1878,7 +1878,7 @@ skip_lvb: spin_lock(&res->spinlock); list_for_each_entry(lock, queue, list) { if (lock->ml.cookie == ml->cookie) { - u64 c = lock->ml.cookie; + __be64 c = lock->ml.cookie; mlog(ML_ERROR, "%s:%.*s: %u:%llu: lock already " "exists on this lockres!\n", dlm->name, res->lockname.len, res->lockname.name, - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ocfs2: fix sparse warnings in fs/ocfs2
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ca1a111b1e6be843c9ce5245dcd570312998d94 Commit: 1ca1a111b1e6be843c9ce5245dcd570312998d94 Parent: 6e4b0d5692cd27d3c9be893a9f5939a9cafbb09f Author: Mark Fasheh <[EMAIL PROTECTED]> AuthorDate: Fri Apr 27 16:01:25 2007 -0700 Committer: Mark Fasheh <[EMAIL PROTECTED]> CommitDate: Wed May 2 15:08:08 2007 -0700 ocfs2: fix sparse warnings in fs/ocfs2 None of these are actually harmful, but the noise makes looking for real problems difficult. Signed-off-by: Mark Fasheh <[EMAIL PROTECTED]> --- fs/ocfs2/alloc.c|6 +++--- fs/ocfs2/aops.c |3 ++- fs/ocfs2/export.c |6 -- fs/ocfs2/file.c |3 ++- fs/ocfs2/inode.c| 13 +++-- fs/ocfs2/journal.c |7 --- fs/ocfs2/namei.c|5 +++-- fs/ocfs2/ocfs2.h| 12 ++-- fs/ocfs2/suballoc.c | 10 +- fs/ocfs2/super.c|2 +- 10 files changed, 37 insertions(+), 30 deletions(-) diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index a0c8667..19712a7 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -2869,7 +2869,7 @@ int ocfs2_complete_truncate_log_recovery(struct ocfs2_super *osb, tl = &tl_copy->id2.i_dealloc; num_recs = le16_to_cpu(tl->tl_used); mlog(0, "cleanup %u records from %llu\n", num_recs, -(unsigned long long)tl_copy->i_blkno); +(unsigned long long)le64_to_cpu(tl_copy->i_blkno)); mutex_lock(&tl_inode->i_mutex); for(i = 0; i < num_recs; i++) { @@ -3801,8 +3801,8 @@ int ocfs2_prepare_truncate(struct ocfs2_super *osb, fe = (struct ocfs2_dinode *) fe_bh->b_data; mlog(0, "fe->i_clusters = %u, new_i_clusters = %u, fe->i_size =" -"%llu\n", fe->i_clusters, new_i_clusters, -(unsigned long long)fe->i_size); +"%llu\n", le32_to_cpu(fe->i_clusters), new_i_clusters, +(unsigned long long)le64_to_cpu(fe->i_size)); *tc = kzalloc(sizeof(struct ocfs2_truncate_context), GFP_KERNEL); if (!(*tc)) { diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index d76de38..36b3d2a 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -78,7 +78,8 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock, if (!OCFS2_IS_VALID_DINODE(fe)) { mlog(ML_ERROR, "Invalid dinode #%llu: signature = %.*s\n", -(unsigned long long)fe->i_blkno, 7, fe->i_signature); +(unsigned long long)le64_to_cpu(fe->i_blkno), 7, +fe->i_signature); goto bail; } diff --git a/fs/ocfs2/export.c b/fs/ocfs2/export.c index 56e1fef..bc48177 100644 --- a/fs/ocfs2/export.c +++ b/fs/ocfs2/export.c @@ -140,7 +140,7 @@ bail: return parent; } -static int ocfs2_encode_fh(struct dentry *dentry, __be32 *fh, int *max_len, +static int ocfs2_encode_fh(struct dentry *dentry, u32 *fh_in, int *max_len, int connectable) { struct inode *inode = dentry->d_inode; @@ -148,6 +148,7 @@ static int ocfs2_encode_fh(struct dentry *dentry, __be32 *fh, int *max_len, int type = 1; u64 blkno; u32 generation; + __le32 *fh = (__force __le32 *) fh_in; mlog_entry("(0x%p, '%.*s', 0x%p, %d, %d)\n", dentry, dentry->d_name.len, dentry->d_name.name, @@ -199,7 +200,7 @@ bail: return type; } -static struct dentry *ocfs2_decode_fh(struct super_block *sb, __be32 *fh, +static struct dentry *ocfs2_decode_fh(struct super_block *sb, u32 *fh_in, int fh_len, int fileid_type, int (*acceptable)(void *context, struct dentry *de), @@ -207,6 +208,7 @@ static struct dentry *ocfs2_decode_fh(struct super_block *sb, __be32 *fh, { struct ocfs2_inode_handle handle, parent; struct dentry *ret = NULL; + __le32 *fh = (__force __le32 *) fh_in; mlog_entry("(0x%p, 0x%p, %d, %d, 0x%p, 0x%p)\n", sb, fh, fh_len, fileid_type, acceptable, context); diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 7c7b568..9395b4f 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -713,7 +713,8 @@ restarted_transaction: } mlog(0, "fe: i_clusters = %u, i_size=%llu\n", -fe->i_clusters, (unsigned long long)fe->i_size); +le32_to_cpu(fe->i_clusters), +(unsigned long long)le64_to_cpu(fe->i_size)); mlog(0, "inode: ip_clusters=%u, i_size=%lld\n", OCFS2_I(inode)->ip_clusters, i_size_read(inode)); diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index b6cfc5c..bc844bf 1