Skip to contentSkip to conversation

libxfs: use structure initializers for cache_operations

PATCH In review Eric Sandeen 2 participants 2 messages Sep 19, 2014 – Sep 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxfs: use structure initializers for cache_operations

This makes it a lot easier for cscope etc.

Surely all modern compilers can cope?

---

libxfs/rdwr.c +6 -6
index 9ee89d3..80de6fa 100644
@@ -1088,12 +1088,12 @@ libxfs_bcache_overflowed(void)
 }
 
 struct cache_operations libxfs_bcache_operations = {
-	/* .hash */	libxfs_bhash,
-	/* .alloc */	libxfs_balloc,
-	/* .flush */	libxfs_bflush,
-	/* .relse */	libxfs_brelse,
-	/* .compare */	libxfs_bcompare,
-	/* .bulkrelse */libxfs_bulkrelse
+	.hash		= libxfs_bhash,
+	.alloc		= libxfs_balloc,
+	.flush		= libxfs_bflush,
+	.relse		= libxfs_brelse,
+	.compare	= libxfs_bcompare,
+	.bulkrelse	= libxfs_bulkrelse
 };
 
 

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Eric Sandeen

This makes it a lot easier for cscope etc.

Surely all modern compilers can cope?

---

Seems reasonable to me.

Quoted 25 lines
libxfs/rdwr.c +6 -6
index 9ee89d3..80de6fa 100644
@@ -1088,12 +1088,12 @@ libxfs_bcache_overflowed(void)
 }
 
 struct cache_operations libxfs_bcache_operations = {
-	/* .hash */	libxfs_bhash,
-	/* .alloc */	libxfs_balloc,
-	/* .flush */	libxfs_bflush,
-	/* .relse */	libxfs_brelse,
-	/* .compare */	libxfs_bcompare,
-	/* .bulkrelse */libxfs_bulkrelse
+	.hash		= libxfs_bhash,
+	.alloc		= libxfs_balloc,
+	.flush		= libxfs_bflush,
+	.relse		= libxfs_brelse,
+	.compare	= libxfs_bcompare,
+	.bulkrelse	= libxfs_bulkrelse
 };
 
 
Quoted 4 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs