diff options
author | Christoph Hellwig <hch@infradead.org> | 2009-11-14 11:17:22 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2009-12-11 16:11:22 -0500 |
commit | b8f82a4a6fc79fcb4b2eb81252020e04c9b49da5 (patch) | |
tree | 4f6c6d123e39ea80d43927398c279f29ca1143ef /fs/xfs | |
parent | 5683f53e36235234f7861909fdff878ff1f1bb20 (diff) |
xfs: kill the STATIC_INLINE macro
Remove our own STATIC_INLINE macro. For small function inside
implementation files just use STATIC and let gcc inline it, and for
those in headers do the normal static inline - they are all small
enough to be inlined for debug builds, too.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 6 | ||||
-rw-r--r-- | fs/xfs/support/debug.h | 18 | ||||
-rw-r--r-- | fs/xfs/xfs_attr_leaf.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_bmap_btree.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_filestream.h | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.c | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.h | 4 |
9 files changed, 17 insertions, 36 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 616ee3febcbb..d6fc4ef727bb 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -337,7 +337,7 @@ xfs_map_blocks( | |||
337 | return -xfs_iomap(XFS_I(inode), offset, count, flags, mapp, &nmaps); | 337 | return -xfs_iomap(XFS_I(inode), offset, count, flags, mapp, &nmaps); |
338 | } | 338 | } |
339 | 339 | ||
340 | STATIC_INLINE int | 340 | STATIC int |
341 | xfs_iomap_valid( | 341 | xfs_iomap_valid( |
342 | xfs_iomap_t *iomapp, | 342 | xfs_iomap_t *iomapp, |
343 | loff_t offset) | 343 | loff_t offset) |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 811237480734..4ddc973aea7a 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -149,7 +149,7 @@ page_region_mask( | |||
149 | return mask; | 149 | return mask; |
150 | } | 150 | } |
151 | 151 | ||
152 | STATIC_INLINE void | 152 | STATIC void |
153 | set_page_region( | 153 | set_page_region( |
154 | struct page *page, | 154 | struct page *page, |
155 | size_t offset, | 155 | size_t offset, |
@@ -161,7 +161,7 @@ set_page_region( | |||
161 | SetPageUptodate(page); | 161 | SetPageUptodate(page); |
162 | } | 162 | } |
163 | 163 | ||
164 | STATIC_INLINE int | 164 | STATIC int |
165 | test_page_region( | 165 | test_page_region( |
166 | struct page *page, | 166 | struct page *page, |
167 | size_t offset, | 167 | size_t offset, |
@@ -1113,7 +1113,7 @@ xfs_bdwrite( | |||
1113 | xfs_buf_delwri_queue(bp, 1); | 1113 | xfs_buf_delwri_queue(bp, 1); |
1114 | } | 1114 | } |
1115 | 1115 | ||
1116 | STATIC_INLINE void | 1116 | STATIC void |
1117 | _xfs_buf_ioend( | 1117 | _xfs_buf_ioend( |
1118 | xfs_buf_t *bp, | 1118 | xfs_buf_t *bp, |
1119 | int schedule) | 1119 | int schedule) |
diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h index 6f4fd37c67af..d2d20462fd4f 100644 --- a/fs/xfs/support/debug.h +++ b/fs/xfs/support/debug.h | |||
@@ -41,10 +41,6 @@ extern void assfail(char *expr, char *f, int l); | |||
41 | # define STATIC static noinline | 41 | # define STATIC static noinline |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #ifndef STATIC_INLINE | ||
45 | # define STATIC_INLINE static inline | ||
46 | #endif | ||
47 | |||
48 | #else /* DEBUG */ | 44 | #else /* DEBUG */ |
49 | 45 | ||
50 | #define ASSERT(expr) \ | 46 | #define ASSERT(expr) \ |
@@ -54,19 +50,5 @@ extern void assfail(char *expr, char *f, int l); | |||
54 | # define STATIC noinline | 50 | # define STATIC noinline |
55 | #endif | 51 | #endif |
56 | 52 | ||
57 | /* | ||
58 | * We stop inlining of inline functions in debug mode. | ||
59 | * Unfortunately, this means static inline in header files | ||
60 | * get multiple definitions, so they need to remain static. | ||
61 | * This then gives tonnes of warnings about unused but defined | ||
62 | * functions, so we need to add the unused attribute to prevent | ||
63 | * these spurious warnings. | ||
64 | */ | ||
65 | #ifndef STATIC_INLINE | ||
66 | # define STATIC_INLINE static __attribute__ ((unused)) noinline | ||
67 | #endif | ||
68 | |||
69 | #endif /* DEBUG */ | 53 | #endif /* DEBUG */ |
70 | |||
71 | |||
72 | #endif /* __XFS_SUPPORT_DEBUG_H__ */ | 54 | #endif /* __XFS_SUPPORT_DEBUG_H__ */ |
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index afdc8911637d..0b687351293f 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c | |||
@@ -98,7 +98,7 @@ STATIC int xfs_attr_leaf_entsize(xfs_attr_leafblock_t *leaf, int index); | |||
98 | * If namespace bits don't match return 0. | 98 | * If namespace bits don't match return 0. |
99 | * If all match then return 1. | 99 | * If all match then return 1. |
100 | */ | 100 | */ |
101 | STATIC_INLINE int | 101 | STATIC int |
102 | xfs_attr_namesp_match(int arg_flags, int ondisk_flags) | 102 | xfs_attr_namesp_match(int arg_flags, int ondisk_flags) |
103 | { | 103 | { |
104 | return XFS_ATTR_NSP_ONDISK(ondisk_flags) == XFS_ATTR_NSP_ARGS_TO_ONDISK(arg_flags); | 104 | return XFS_ATTR_NSP_ONDISK(ondisk_flags) == XFS_ATTR_NSP_ARGS_TO_ONDISK(arg_flags); |
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c index eb7b702d0690..6f5ccede63f9 100644 --- a/fs/xfs/xfs_bmap_btree.c +++ b/fs/xfs/xfs_bmap_btree.c | |||
@@ -98,8 +98,7 @@ xfs_bmdr_to_bmbt( | |||
98 | * This code must be in sync with the routines xfs_bmbt_get_startoff, | 98 | * This code must be in sync with the routines xfs_bmbt_get_startoff, |
99 | * xfs_bmbt_get_startblock, xfs_bmbt_get_blockcount and xfs_bmbt_get_state. | 99 | * xfs_bmbt_get_startblock, xfs_bmbt_get_blockcount and xfs_bmbt_get_state. |
100 | */ | 100 | */ |
101 | 101 | STATIC void | |
102 | STATIC_INLINE void | ||
103 | __xfs_bmbt_get_all( | 102 | __xfs_bmbt_get_all( |
104 | __uint64_t l0, | 103 | __uint64_t l0, |
105 | __uint64_t l1, | 104 | __uint64_t l1, |
diff --git a/fs/xfs/xfs_filestream.h b/fs/xfs/xfs_filestream.h index f655f7dc334c..4aba67c5f64f 100644 --- a/fs/xfs/xfs_filestream.h +++ b/fs/xfs/xfs_filestream.h | |||
@@ -79,7 +79,7 @@ extern ktrace_t *xfs_filestreams_trace_buf; | |||
79 | * the cache that reference per-ag array elements that have since been | 79 | * the cache that reference per-ag array elements that have since been |
80 | * reallocated. | 80 | * reallocated. |
81 | */ | 81 | */ |
82 | STATIC_INLINE int | 82 | static inline int |
83 | xfs_filestream_peek_ag( | 83 | xfs_filestream_peek_ag( |
84 | xfs_mount_t *mp, | 84 | xfs_mount_t *mp, |
85 | xfs_agnumber_t agno) | 85 | xfs_agnumber_t agno) |
@@ -87,7 +87,7 @@ xfs_filestream_peek_ag( | |||
87 | return atomic_read(&mp->m_perag[agno].pagf_fstrms); | 87 | return atomic_read(&mp->m_perag[agno].pagf_fstrms); |
88 | } | 88 | } |
89 | 89 | ||
90 | STATIC_INLINE int | 90 | static inline int |
91 | xfs_filestream_get_ag( | 91 | xfs_filestream_get_ag( |
92 | xfs_mount_t *mp, | 92 | xfs_mount_t *mp, |
93 | xfs_agnumber_t agno) | 93 | xfs_agnumber_t agno) |
@@ -95,7 +95,7 @@ xfs_filestream_get_ag( | |||
95 | return atomic_inc_return(&mp->m_perag[agno].pagf_fstrms); | 95 | return atomic_inc_return(&mp->m_perag[agno].pagf_fstrms); |
96 | } | 96 | } |
97 | 97 | ||
98 | STATIC_INLINE int | 98 | static inline int |
99 | xfs_filestream_put_ag( | 99 | xfs_filestream_put_ag( |
100 | xfs_mount_t *mp, | 100 | xfs_mount_t *mp, |
101 | xfs_agnumber_t agno) | 101 | xfs_agnumber_t agno) |
@@ -122,7 +122,7 @@ int xfs_filestream_new_ag(struct xfs_bmalloca *ap, xfs_agnumber_t *agp); | |||
122 | 122 | ||
123 | 123 | ||
124 | /* filestreams for the inode? */ | 124 | /* filestreams for the inode? */ |
125 | STATIC_INLINE int | 125 | static inline int |
126 | xfs_inode_is_filestream( | 126 | xfs_inode_is_filestream( |
127 | struct xfs_inode *ip) | 127 | struct xfs_inode *ip) |
128 | { | 128 | { |
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 0785797db828..cb907ba69c4c 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -425,7 +425,7 @@ xfs_ialloc_ag_alloc( | |||
425 | return 0; | 425 | return 0; |
426 | } | 426 | } |
427 | 427 | ||
428 | STATIC_INLINE xfs_agnumber_t | 428 | STATIC xfs_agnumber_t |
429 | xfs_ialloc_next_ag( | 429 | xfs_ialloc_next_ag( |
430 | xfs_mount_t *mp) | 430 | xfs_mount_t *mp) |
431 | { | 431 | { |
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 7b14f0a0a5d8..66a888a9ad6f 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -2123,7 +2123,7 @@ xfs_icsb_destroy_counters( | |||
2123 | mutex_destroy(&mp->m_icsb_mutex); | 2123 | mutex_destroy(&mp->m_icsb_mutex); |
2124 | } | 2124 | } |
2125 | 2125 | ||
2126 | STATIC_INLINE void | 2126 | STATIC void |
2127 | xfs_icsb_lock_cntr( | 2127 | xfs_icsb_lock_cntr( |
2128 | xfs_icsb_cnts_t *icsbp) | 2128 | xfs_icsb_cnts_t *icsbp) |
2129 | { | 2129 | { |
@@ -2132,7 +2132,7 @@ xfs_icsb_lock_cntr( | |||
2132 | } | 2132 | } |
2133 | } | 2133 | } |
2134 | 2134 | ||
2135 | STATIC_INLINE void | 2135 | STATIC void |
2136 | xfs_icsb_unlock_cntr( | 2136 | xfs_icsb_unlock_cntr( |
2137 | xfs_icsb_cnts_t *icsbp) | 2137 | xfs_icsb_cnts_t *icsbp) |
2138 | { | 2138 | { |
@@ -2140,7 +2140,7 @@ xfs_icsb_unlock_cntr( | |||
2140 | } | 2140 | } |
2141 | 2141 | ||
2142 | 2142 | ||
2143 | STATIC_INLINE void | 2143 | STATIC void |
2144 | xfs_icsb_lock_all_counters( | 2144 | xfs_icsb_lock_all_counters( |
2145 | xfs_mount_t *mp) | 2145 | xfs_mount_t *mp) |
2146 | { | 2146 | { |
@@ -2153,7 +2153,7 @@ xfs_icsb_lock_all_counters( | |||
2153 | } | 2153 | } |
2154 | } | 2154 | } |
2155 | 2155 | ||
2156 | STATIC_INLINE void | 2156 | STATIC void |
2157 | xfs_icsb_unlock_all_counters( | 2157 | xfs_icsb_unlock_all_counters( |
2158 | xfs_mount_t *mp) | 2158 | xfs_mount_t *mp) |
2159 | { | 2159 | { |
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index a6c023bc0fb2..23bf246fa85a 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -387,13 +387,13 @@ xfs_put_perag(struct xfs_mount *mp, xfs_perag_t *pag) | |||
387 | * Per-cpu superblock locking functions | 387 | * Per-cpu superblock locking functions |
388 | */ | 388 | */ |
389 | #ifdef HAVE_PERCPU_SB | 389 | #ifdef HAVE_PERCPU_SB |
390 | STATIC_INLINE void | 390 | static inline void |
391 | xfs_icsb_lock(xfs_mount_t *mp) | 391 | xfs_icsb_lock(xfs_mount_t *mp) |
392 | { | 392 | { |
393 | mutex_lock(&mp->m_icsb_mutex); | 393 | mutex_lock(&mp->m_icsb_mutex); |
394 | } | 394 | } |
395 | 395 | ||
396 | STATIC_INLINE void | 396 | static inline void |
397 | xfs_icsb_unlock(xfs_mount_t *mp) | 397 | xfs_icsb_unlock(xfs_mount_t *mp) |
398 | { | 398 | { |
399 | mutex_unlock(&mp->m_icsb_mutex); | 399 | mutex_unlock(&mp->m_icsb_mutex); |