Commit b8f82a4a6fc79fcb4b2eb81252020e04c9b49da5
Committed by
Alex Elder
1 parent
5683f53e36
Exists in
master
and in
39 other branches
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>
Showing 9 changed files with 17 additions and 36 deletions Side-by-side Diff
fs/xfs/linux-2.6/xfs_aops.c
fs/xfs/linux-2.6/xfs_buf.c
... | ... | @@ -149,7 +149,7 @@ |
149 | 149 | return mask; |
150 | 150 | } |
151 | 151 | |
152 | -STATIC_INLINE void | |
152 | +STATIC void | |
153 | 153 | set_page_region( |
154 | 154 | struct page *page, |
155 | 155 | size_t offset, |
... | ... | @@ -161,7 +161,7 @@ |
161 | 161 | SetPageUptodate(page); |
162 | 162 | } |
163 | 163 | |
164 | -STATIC_INLINE int | |
164 | +STATIC int | |
165 | 165 | test_page_region( |
166 | 166 | struct page *page, |
167 | 167 | size_t offset, |
... | ... | @@ -1113,7 +1113,7 @@ |
1113 | 1113 | xfs_buf_delwri_queue(bp, 1); |
1114 | 1114 | } |
1115 | 1115 | |
1116 | -STATIC_INLINE void | |
1116 | +STATIC void | |
1117 | 1117 | _xfs_buf_ioend( |
1118 | 1118 | xfs_buf_t *bp, |
1119 | 1119 | int schedule) |
fs/xfs/support/debug.h
... | ... | @@ -41,10 +41,6 @@ |
41 | 41 | # define STATIC static noinline |
42 | 42 | #endif |
43 | 43 | |
44 | -#ifndef STATIC_INLINE | |
45 | -# define STATIC_INLINE static inline | |
46 | -#endif | |
47 | - | |
48 | 44 | #else /* DEBUG */ |
49 | 45 | |
50 | 46 | #define ASSERT(expr) \ |
51 | 47 | |
... | ... | @@ -54,20 +50,6 @@ |
54 | 50 | # define STATIC noinline |
55 | 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 | 53 | #endif /* DEBUG */ |
70 | - | |
71 | - | |
72 | 54 | #endif /* __XFS_SUPPORT_DEBUG_H__ */ |
fs/xfs/xfs_attr_leaf.c
... | ... | @@ -98,7 +98,7 @@ |
98 | 98 | * If namespace bits don't match return 0. |
99 | 99 | * If all match then return 1. |
100 | 100 | */ |
101 | -STATIC_INLINE int | |
101 | +STATIC int | |
102 | 102 | xfs_attr_namesp_match(int arg_flags, int ondisk_flags) |
103 | 103 | { |
104 | 104 | return XFS_ATTR_NSP_ONDISK(ondisk_flags) == XFS_ATTR_NSP_ARGS_TO_ONDISK(arg_flags); |
fs/xfs/xfs_bmap_btree.c
... | ... | @@ -98,8 +98,7 @@ |
98 | 98 | * This code must be in sync with the routines xfs_bmbt_get_startoff, |
99 | 99 | * xfs_bmbt_get_startblock, xfs_bmbt_get_blockcount and xfs_bmbt_get_state. |
100 | 100 | */ |
101 | - | |
102 | -STATIC_INLINE void | |
101 | +STATIC void | |
103 | 102 | __xfs_bmbt_get_all( |
104 | 103 | __uint64_t l0, |
105 | 104 | __uint64_t l1, |
fs/xfs/xfs_filestream.h
... | ... | @@ -79,7 +79,7 @@ |
79 | 79 | * the cache that reference per-ag array elements that have since been |
80 | 80 | * reallocated. |
81 | 81 | */ |
82 | -STATIC_INLINE int | |
82 | +static inline int | |
83 | 83 | xfs_filestream_peek_ag( |
84 | 84 | xfs_mount_t *mp, |
85 | 85 | xfs_agnumber_t agno) |
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 | return atomic_read(&mp->m_perag[agno].pagf_fstrms); |
88 | 88 | } |
89 | 89 | |
90 | -STATIC_INLINE int | |
90 | +static inline int | |
91 | 91 | xfs_filestream_get_ag( |
92 | 92 | xfs_mount_t *mp, |
93 | 93 | xfs_agnumber_t agno) |
... | ... | @@ -95,7 +95,7 @@ |
95 | 95 | return atomic_inc_return(&mp->m_perag[agno].pagf_fstrms); |
96 | 96 | } |
97 | 97 | |
98 | -STATIC_INLINE int | |
98 | +static inline int | |
99 | 99 | xfs_filestream_put_ag( |
100 | 100 | xfs_mount_t *mp, |
101 | 101 | xfs_agnumber_t agno) |
... | ... | @@ -122,7 +122,7 @@ |
122 | 122 | |
123 | 123 | |
124 | 124 | /* filestreams for the inode? */ |
125 | -STATIC_INLINE int | |
125 | +static inline int | |
126 | 126 | xfs_inode_is_filestream( |
127 | 127 | struct xfs_inode *ip) |
128 | 128 | { |
fs/xfs/xfs_ialloc.c
fs/xfs/xfs_mount.c
... | ... | @@ -2123,7 +2123,7 @@ |
2123 | 2123 | mutex_destroy(&mp->m_icsb_mutex); |
2124 | 2124 | } |
2125 | 2125 | |
2126 | -STATIC_INLINE void | |
2126 | +STATIC void | |
2127 | 2127 | xfs_icsb_lock_cntr( |
2128 | 2128 | xfs_icsb_cnts_t *icsbp) |
2129 | 2129 | { |
... | ... | @@ -2132,7 +2132,7 @@ |
2132 | 2132 | } |
2133 | 2133 | } |
2134 | 2134 | |
2135 | -STATIC_INLINE void | |
2135 | +STATIC void | |
2136 | 2136 | xfs_icsb_unlock_cntr( |
2137 | 2137 | xfs_icsb_cnts_t *icsbp) |
2138 | 2138 | { |
... | ... | @@ -2140,7 +2140,7 @@ |
2140 | 2140 | } |
2141 | 2141 | |
2142 | 2142 | |
2143 | -STATIC_INLINE void | |
2143 | +STATIC void | |
2144 | 2144 | xfs_icsb_lock_all_counters( |
2145 | 2145 | xfs_mount_t *mp) |
2146 | 2146 | { |
... | ... | @@ -2153,7 +2153,7 @@ |
2153 | 2153 | } |
2154 | 2154 | } |
2155 | 2155 | |
2156 | -STATIC_INLINE void | |
2156 | +STATIC void | |
2157 | 2157 | xfs_icsb_unlock_all_counters( |
2158 | 2158 | xfs_mount_t *mp) |
2159 | 2159 | { |
fs/xfs/xfs_mount.h
... | ... | @@ -387,13 +387,13 @@ |
387 | 387 | * Per-cpu superblock locking functions |
388 | 388 | */ |
389 | 389 | #ifdef HAVE_PERCPU_SB |
390 | -STATIC_INLINE void | |
390 | +static inline void | |
391 | 391 | xfs_icsb_lock(xfs_mount_t *mp) |
392 | 392 | { |
393 | 393 | mutex_lock(&mp->m_icsb_mutex); |
394 | 394 | } |
395 | 395 | |
396 | -STATIC_INLINE void | |
396 | +static inline void | |
397 | 397 | xfs_icsb_unlock(xfs_mount_t *mp) |
398 | 398 | { |
399 | 399 | mutex_unlock(&mp->m_icsb_mutex); |