Skip to contentSkip to conversation

omfs: sparse annotations

PATCH In review Harvey Harrison 2 participants 2 messages Jul 29, 2008 Omfs filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omfs: sparse annotations

Missing cpu_to_be64 on some constant assignments. fs/omfs/dir.c:107:16: warning: incorrect type in assignment (different base types)
fs/omfs/dir.c:107:16: expected restricted __be64 [usertype] i_sibling
fs/omfs/dir.c:107:16: got unsigned long long
fs/omfs/file.c:33:13: warning: incorrect type in assignment (different base types)
fs/omfs/file.c:33:13: expected restricted __be64 [usertype] e_next
fs/omfs/file.c:33:13: got unsigned long long
fs/omfs/file.c:36:24: warning: incorrect type in assignment (different base types)
fs/omfs/file.c:36:24: expected restricted __be64 [usertype] e_cluster
fs/omfs/file.c:36:24: got unsigned long long
fs/omfs/file.c:37:23: warning: incorrect type in assignment (different base types)
fs/omfs/file.c:37:23: expected restricted __be64 [usertype] e_blocks
fs/omfs/file.c:37:23: got unsigned long long

---
 fs/omfs/dir.c  |    2 +-
 fs/omfs/file.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
fs/omfs/dir.c +1 -1
index 05a5bc3..c0757e9 100644
@@ -104,7 +104,7 @@ int omfs_make_empty(struct inode *inode, struct super_block *sb)
 
 	oi = (struct omfs_inode *) bh->b_data;
 	oi->i_head.h_self = cpu_to_be64(inode->i_ino);
-	oi->i_sibling = ~0ULL;
+	oi->i_sibling = ~cpu_to_be64(0ULL);
 
 	mark_buffer_dirty(bh);
 	brelse(bh);
fs/omfs/file.c +3 -3
index 66e01fa..7e24990 100644
@@ -30,11 +30,11 @@ void omfs_make_empty_table(struct buffer_head *bh, int offset)
 {
 	struct omfs_extent *oe = (struct omfs_extent *) &bh->b_data[offset];
 
-	oe->e_next = ~0ULL;
+	oe->e_next = ~cpu_to_be64(0ULL);
 	oe->e_extent_count = cpu_to_be32(1),
 	oe->e_fill = cpu_to_be32(0x22),
-	oe->e_entry.e_cluster = ~0ULL;
-	oe->e_entry.e_blocks = ~0ULL;
+	oe->e_entry.e_cluster = ~cpu_to_be64(0ULL);
+	oe->e_entry.e_blocks = ~cpu_to_be64(0ULL);
 }
 
 int omfs_shrink_inode(struct inode *inode)
Signature · 1 line
1.6.0.rc1.154.ge3fc
maintainer Acked-by on v1 1/1
#1 lore raw

fs/omfs/dir.c int omfs_make_empty(struct inode *inode, struct super_block *sb) · line 107

Quoted 4 lines · Harvey Harrison

Missing cpu_to_be64 on some constant assignments.

fs/omfs/dir.c +1 -1
-	oi->i_sibling = ~0ULL;
+	oi->i_sibling = ~cpu_to_be64(0ULL);

Thanks, I saw these sparse warnings before but wasn't sure how to fix them.

Signature · 1 line
Bob Copeland %% www.bobcopeland.com